I need to acces to grove sensor thrue grovePI in C or C++.
The github repository provide Python lib but I don’t find C lib.
I’m looking for sample or lib in C for the raspberryPi/GrovePi
Hi,
The GrovePi currently does not have a C library.
The easiest way to make the sensors work with C would be to create a socket connections between the Python program and your C program.
The GrovePi is essentially an I2C device that you can send commands to. If you have a look at the Python examples, you’ll see its just a bunch of reading and writing I2C blocks.
C++ API for I2C, SPI, GPIO, etc:
http://www.raspberrypi.org/forums/viewtopic.php?f=33&t=43725
It should be pretty straight forward sending matching I2C blocks using the C++ examples.
If you manage to get something working, can you contribute with a pull request to https://github.com/DexterInd/GrovePi
Contributing would be awesome: we could use some C on this project!