I2c touch sensor

Hi there,
I’m trying to use grovepi+ with i2c touch sensor.
Is there any working sample for these to work?
Still trying to port ino to wiringPi without much success.
(Got some unstable reading, could be timing or something)
Thanks.

Hey,
We don;t have the support for the I2C touch sensor right now. It’s compatible with the GrovePi but we don;t have a library for it right now. Also, what is the problem that you are having with the library. Can you share the library that you have right now, maybe we would be able to offer some help.

-Karan

I got it resolved. (although not sure what the cause was…)
I check my GrovePi+ firmware, it was 255.255.255
So I run the firmware update script, the firmware now says 1.2.2
You know what?!, when I run my program again (the very same program) suddenly it work! Isn’t the grovepi+ i2c connect directly to rpi i2c? what the firmware has to do with it?

Uh, the test program is just simply a porting from Seed’s sample library (arduino), into raspi C program using wiringPi.
(only change the i2c write/read func to use wiringPi func)
I could shared it if somebody interested.
And BTW I saw a thread on wiringPi forum that say the second register read might not work (but I currently only use the included 4 touch sensor so it’s not a problem for now.)

Thanks Karan (at least for trying to help)

Hey devsar,
Glad to hear that it worked for you. I The GrovePi+ is indeed connected directly to the Raspberry Pi I2C pins and I am also not sure what changed and why the firmware update did solve the problem.

What I meant earlier with “we don;t have the support for the I2C touch sensor right now”, was that the we did not have a library that could work with Raspberry Pi. Glad to hear that you were able to get the sensor to work. Could you share the library and/or the examples for the sensor so that they could be useful to others too.

-Karan

Attaching the test program.
Feel free to do anything with it. Header file is from Seed’s sample on github and the program itself is a port from those sample also.

  • be sure to update your firmware at least to 1.2.2
  • attach your i2c touch sensor to any grovepi+ i2c socket
  • make
  • run the program (touchtest)
    Read value is logged out. Comment it out if necessary.

Happy hacking.

Uh, .tgz not allowed for security reason…lol
Trying zip, if this failed I’m giving up.

Sorry for the troubles. I think the forums don’t allow that. Can you upload the scripts directly or rename the zip with some extension like 123 or maybe just send a pull request to an appropriate folder here: https://github.com/DexterInd/GrovePi/tree/master/Software.

-Karan