I2C.SPIThe board we are talking about here is the Barometric Pressure/Temperature/Altitude Sensor - 5V ready.
i2cdetect should produce an output like this:
Prompt> sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
Notice the rendered address, 0x77.
|
|
|
I2C.SPI.AdafruitBMP180. Run it from a script like this:
#!/bin/bash
PI4J_HOME=/home/pi/pi4j/pi4j-distribution/target/distro-contents
CP=./classes
CP=$CP:$PI4J_HOME/lib/pi4j-core.jar
sudo java -cp $CP adafruiti2c.AdafruitBMP180
The output would look like this:
Temperature: 22.50 C
Pressure : 1019.32 hPa
Altitude : 00.50 m