So I’m writing against this C API with GrovePi and Raspberry Pi to control some of the more complicated sensors, using the grovepi.py i2c_write_block commands as a reference but having really no luck.
These commands work fine:
#define dRead_cmd 1
#define dWrite_cmd 2
#define aRead_cmd 3
#define aWrite_cmd 4
#define pMode_cmd 5
But if i try to use one of the others, for example:
#define ultrasonicRead_cmd 7
The value returned is always zero. The commands are just being written to the i2c_smbus whether its over python or C. So why can’t I retrieve any of this data?
I’ve follow the python code as closely as I can with regards to time delays etc.
I’ve also tried:
#define dht_temp_cmd 40
This also didn’t work, neither did using digitalWrite to try and manually pull the pin down up down up. So I moved on to try and use the bcm3825 lib to control the pins manually and got another problem: I can’t find any reference to map the Grove Pi port numbers with the literal Raspberry Pi 3 GPIO numbers? Would D4 = GPIO 4 ?
In a time constraint so any information would be greatly appreciated!