Closed mccada closed 9 years ago
The library now has code to auto select the raspi i2c device based on the board revision. I hope it works on the rev 1 Pi. If the board is not a Pi, it defaults to i2c-0.
Works for my revision 1 board. Nice work, thank you.
In the htu21dflib.c file there is a line that is hard coded to the Raspbery V2 i2c value.
static const char I2CDEV[] = "/dev/i2c-1"; // raspberry pi
The version 1 Pi uses the i2c-0 address for the bus. You could maybe add a check for what version it is running on, and set the value accordingly.
Otherwise great code that works well!