====== Use to Weather-Board on ubuntu ======
{{:en:c1:16x2lcd_bmp180.jpg?250|}}
{{:en:c1:16x2lcd_si702x.jpg?250|}}
{{:en:c1:16x2lcd_si1132.jpg?250|}}
This is a good example to let you know how to access the I2C bus on the 40-Pin GPIO of **ODROID-C1**.
=== Preparations ===
* [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143703355573|ODROID-C1]]
* [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G141637550797|16x2 LCD + IO Shield]]
* [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G144533067183|Weather Board]]
* [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G141628490396|8GB eMMC Module C1 Linux]]
If you have the **Weather Board 2**, use the updated guide in this link.\\
[[en:weather-board|Weather Board 2]]
===== How to run =====
=== Add to Sensors to the fdt(device tree source) ===
1. Install one dependency.
sudo apt-get install device-tree-compiler
2. Enable Sensors on device tree.
If you want to use I2C-B, you change I2C address to c11087c0.\\
I2C-A : c1108500\\
I2C-B : c11087c0\\
ex) fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c11087c0/bmp085@77
sudo -s
fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/bmp085@77
fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si702x@40
fdtput -c /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si1132@60
fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/bmp085@77 compatible "bosch,bmp085"
fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si702x@40 compatible "silab,si702x"
fdtput -t s /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si1132@60 compatible "silab,si1132"
fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/bmp085@77 reg 0x77
fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si702x@40 reg 0x40
fdtput -t x /media/boot/meson8b_odroidc.dtb /i2c@c1108500/si1132@60 reg 0x60
3. Enable i2c module to autoload on boot.
echo aml_i2c >> /etc/modules
4. Now reboot your board.
=== Install wiringPi library. ===
1. Get the wiringPi library compatible **ODROID-C1**
git clone https://github.com/hardkernel/wiringPi
2. Build the library
cd wiringPi
./build
=== Compile & Run ===
gcc -o