We're no longer updating This wiki!!

This is an old revision of the document!


WEATHER-BOARD with shifter shield on ODROID-XU4

The WEATHER-BOARD can use one of three I2C buses on the SHIFTER-SHIELD.

Directly connecting WEATHER-BOARD to ODROID-XU4


H/W I2C CH-A

Kernel 3.10.y
(node name)
Kernel 4.9.y
(node name)
Net Name Export Number Description
/dev/i2c-4 /dev/i2c-1 GPB3[2](I2C_1.SDA) 209 SDA
GPB3[3](I2C_1.SCL) 210 SCL

H/W I2C CH-B(HS-I2C)

Kernel 3.10.y
(node name)
Kernel 4.9.y
(node name)
Net Name Export Number Description
/dev/i2c-1 /dev/i2c-5 GPA2[2](I2C_5.SDA) 187 SDA
GPA2[3](I2C_5.SCL) 188 SCL

How to check WEATHER-BOARD with i2c-tools.

Install i2c-tools pakage.

sudo apt-get install i2c-tools

Weather board check command

odroid@odroid:~$ sudo i2cdetect -y -r [i2c-dev node number]

Weather board rev 0.1 output

odroid@odroid:~$ sudo i2cdetect -y -r 1

    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                             
00:          -- -- -- -- -- -- -- -- -- -- -- -- --                             
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
70: -- -- -- -- -- -- -- 77

odroid@odroid:~$ 

Weather board rev 0.2 output

odroid@odroid:~$ sudo i2cdetect -y -r 1

    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                             
00:          -- -- -- -- -- -- -- -- -- -- -- -- --                             
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                             
70: -- -- -- -- -- -- -- 76

odroid@odroid:~$ 

Pure C code

Install git package

odroid@odroid:~$ sudo apt-get install git

Get the WEATHER-BOARD source code.

git clone https://github.com/hardkernel/WEATHER-BOARD.git
cd WEATHER-BOARD/c_weather
make

Check your I2C node, and run the program.

sudo ./weather_board [i2c node name : default /dev/i2c-1]

I2C-4

sudo ./weather_board /dev/i2c-4

I2C-10
i2c-gpio-custom driver option : bus0=id,sda,scl[,udelay,timeout,sda_open,scl_open,scl_outonly]

sudo modprobe i2c-gpio-custom bus0=10,33,23,10,10
sudo ./weather_board /dev/i2c-10

I2C-1

sudo ./weather_board /dev/i2c-1

WiringPi

If you want to get the WEATHER-BOARD source code using wiringPi library.

git clone https://github.com/hardkernel/wiringPi
cd wiringPi
./build

git clone https://github.com/john1117/WEATHER-BOARD.git
cd WEATHER-BOARD/c_weather/wiringPi
make

sudo ./weather_board [/dev/i2c-number]

for Android

Change the permissions for /dev/i2c-1 node.

shell@odroidxu3:/ $ su
root@odroidxu3:/ # mount -o rw,remount /
[ 2147.583574] [c6] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
root@odroidxu3:/ # vi /uevent.odroidxu3.rc

Add this line and must reboot system.

/dev/i2c-1                0666   system     system

source code

git clone https://github.com/codewalkerster/weatherboard

en/wb_xu4_shifter_shield.1493113205.txt.gz · Last modified: 2017/04/25 18:10 by charles.park
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0