Explorer HAT


Today I was able to connect LCD without using shift register,.
The problem was TX, RX pin number was wrong.
If I use TX-15, RX-14 pin number then, it just worked fine.

I connected like this image and Inited with
lcdInit(2, 16, 4, 15, 14, 10, 9, 11, 8, 0,0,0,0);


Yes, the RX/TX labeling on the Explorer HAT Pro is reversed- this makes little sense if you’re used to reversing RX/TX, or if you want to know which pin corresponds to which. D’oh!


I was able to make some class to access touch. Due to your information above.
Thank you very much.
Like this…
int Touch::read()
if(wiringPiI2CReadReg8(fd, 0) == 1) {
int v = wiringPiI2CReadReg8(fd, 3);
wiringPiI2CWriteReg8(fd, 0, 0);
wiringPiI2CWriteReg8(fd, 3, 0);

	switch(v) {
		case 0x10: return 1;
		case 0x20: return 2;
		case 0x40: return 3;
		case 0x80: return 4;
		case 0x1: return 5;
		case 0x2: return 6;
		case 0x4: return 7;
		default: return 8;
return 0;


And can you show me how to access analogue input?
I want to use wiringPi library…
I only know that the I2C address is 0x48.
But there are 4 analogue input &&&…
Please help.


now you’re really stretching my understanding of those things ;-)

The analog inputs are controlled by a ADS1015, digging into the Explorer repo/library you can find the channel mapping here:


You seem to know what you’re doing so hopefully that’s all you need. If not we’ll have to put out a call for @gadgetoid , the Pizorro of coding!


Can you give more specific infomation like before…:
ie)Read from register 3 to retrieve button states. These will latch until register 0 is cleared.
Register 0 will show an 0x01,

I suppose channel map 0 is Analogue 0? Then I should read what register ?
I thought analog is a voltage value at one moment.
But, assuming from 'samples per second ', is it not?
I cannot understand the meanings…

The source you linked have more specific info. I need bit operation.
I will try to analyse it.
I should write to 0x00 register with bit-masked bytes.
Then, I can read from 0x01 register.
Is it right?
I am sorry to bother you but if you have time, please tesch me howto.


You should be able to glean all of the information you need from the datasheet. In fact the datasheet should be your first point of call in all cases, and learning to read and digest them is a useful skill. The datasheet for the ADS1015 can be found here, and contains all the answers to your questions:

Your second point of reference should be the Arduino code for the Ads1015. Since WiringPi is designed to make porting Arduino-like examples simple, it makes sense to reference Arduino code as your canonical implementation example: https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp

Datasheets should always come first, but an example implementation in your target language is invaluable.

Sorry for the vague answer, but in these cases I very strongly believe I should “teach a man to fish”.

Good luck!