67
ODROID C1 USER MANUAL
Install the Device Tree Compiler (DTC) using the command:
$ sudo apt-get install device-tree-compiler
Then, enable the sensors on the device tree using the commands:
$ sudo fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
bmp085@77
$ sudo fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si702x@40
$ sudo fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si1132@60
$ sudo fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
bmp085@77 compatible “bosch,bmp085”
$ sudo fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si702x@40 compatible “silab,si702x”
$ sudo fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si1132@60 compatible “silab,si1132”
$ sudo fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
bmp085@77 reg 0x77
$ sudo fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si702x@40 reg 0x40
$ sudo fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/
si1132@60 reg 0x60
Enable the i2c module to auto-load on boot-up:
$ sudo echo aml_i2c >> /etc/modules
Ensure the WiringPi is installed as described earlier. Power
down the system. Attach the weather-board to 16x2 display, then
power up the whole system. Next, download the wb_si702x.c sample
source file from http://bit.ly/1HIes6U, then build and launch it:
$ cd ~ && mkdir wb && cd wb
$ mv ~/Downloads/wb_si702x.c .
$ gcc -o wb_si702x wb_si702x.c -lWiringPi -lWiringPiDev -lpthread
$ ./wb_si702x.c
You should see the LCD module display the current ambient
temperature and humidity, as shown in the following image.
Chapter 4