public class I2CExample
extends Object
This example code demonstrates how to perform simple I2C
communication on the Odroid-C1/C1+. For this example we will
connect to a 'TSL2561' LUX sensor.
Data Sheet:
https://www.adafruit.com/datasheets/TSL256x.pdf
You should get something similar printed in the console
when executing this program:
> <--Pi4J--> I2C Example ... started.
> ... reading ID register from TSL2561
> TSL2561 ID = 0x50 (should be 0x50)
> ... powering up TSL2561
> ... reading DATA registers from TSL2561
> TSL2561 DATA 0 = 0x1e
> TSL2561 DATA 1 = 0x04
> ... powering down TSL2561
> Exiting I2CExample
- Author:
- Robert Savage