Clyde R. Schrank Posted October 26, 2019 Posted October 26, 2019 Hello, i was trying to connect sensors via i2c, and neither wiringPi.h nor i2c-dev.h are comiting Read/Write comands. The file descriptor is given a value, so i think the connection worked, but functions like : i2c_smbus_read_byte_data(FILEDESCRIPTOR, (u_int8_t)REGISTERADRESS) just pop errors. Do you guys have any idea? Thanks for any help! edit: i have also included /linux/i2c.h and the function error persists. "I2C_SMBUS_READ_BYTE_DATA was not declared in this scope"
Igor Posted October 28, 2019 Posted October 28, 2019 On 10/26/2019 at 9:04 PM, Clyde R. Schrank said: Do you guys have any idea? I can only assure you that I2C works. If you enable it in the armbian-config -> hardware. I use it. But software you are trying to use (wiringpi) has nothing to do with Armbian. But I read around people use it on Armbian so its possible, but perhaps you need to adjust some things ...
Recommended Posts