WEATHER-BOARD2 on ODROID-N2/C4

Make sure that you have these products:

For the wiring, you should wire a total of four lines, GND, 3V3, SCL and SDA.
The GND and 3V3 pin can be used like the following pin you want.

GND : 6, 9, 14, 20, 25, 34, 39
3V3 : 1, 17

ODROID-N2

J2 - 2x20 PINS

WE SHOULD CHECK THE PIN MAP!!!

Default Pin State GPIO & Export No Net Name Pin Number Pin Number Net Name GPIO & Export No Default Pin State
- - 3.3V 1 2 5.0V - -
I(P/D) GPIOX.17 (#493) I2C0_SDA 3 4 5.0V - -
I(P/U) GPIOX.18 (#494) I2C0_SCL 5 6 GND - -
I(P/D) GPIOA.13 (#473) 7 8 TXD1 GPIOX.12 (#488) I(P/U)
- - GND 9 10 RXD1 GPIOX.13 (#489) I(P/U)
I(P/U) GPIOX.3 (#479) 11 12 PWM_E GPIOX.16 (#492) I(P/U)
I(P/U) GPIOX.4 (#480) 13 14 GND - -
I(P/U) GPIOX.7 (#483) 15 16 GPIOX.0 (#476) I(P/U)
- - 3.3V 17 18 GPIOX.1 (#477) I(P/U)
I(P/U) GPIOX.8 (#484) SPI0_MOSI 19 20 GND - -
I(P/U) GPIOX.9 (#485) SPI0_MISO 21 22 GPIOX.2 (#478) I(P/U)
I(P/U) GPIOX.11 (#487) SPI0_CLK 23 24 SPI0_SS0 GPIOX.10 (#486) I(P/U)
- - GND 25 26 SPI0_SS1 GPIOA.4 (#464) I(P/D)
I(P/U) GPIOA.14 (#474) I2C1_SDA 27 28 I2C1_SCL GPIOA.15 (#475) I(P/U)
I(P/U) GPIOX.14 (#490) 29 30 GND - -
I(P/U) GPIOX.15 (#491) 31 32 GPIOA.12 (#472) I(P/D)
I(P/U) GPIOX.5 (#481) 33 34 GND - -
I(P/D) GPIOX.6 (#482) 35 36 GPIOX.19 (#495) -
ADC.AIN3 37 38 REF 1.8V
- - GND 39 40 ADC.AIN2

2018/12/17 12:20 · luke.go

ODROID-C4

J2 - 2x20 PINS

Default Pin State GPIO & Export No Net Name Pin Number Pin Number Net Name GPIO & Export No Default Pin State
- - 3.3V 1 2 5.0V - -
I(P/D) GPIOX.17 (#493) I2C0_SDA 3 4 5.0V - -
I(P/U) GPIOX.18 (#494) I2C0_SCL 5 6 GND - -
I(P/D) GPIOX.5 (#481) PWM_C 7 8 TXD1 GPIOX.12 (#488) I(P/U)
- - GND 9 10 RXD1 GPIOX.13 (#489) I(P/U)
I(P/U) GPIOX.3 (#479) PWM_D 11 12 PWM_E GPIOX.16 (#492) I(P/U)
I(P/U) GPIOX.4 (#480) 13 14 GND - -
I(P/U) GPIOX.7 (#483) 15 16 GPIOX.0 (#476) I(P/U)
- - 3.3V 17 18 GPIOX.1 (#477) I(P/U)
I(P/U) GPIOX.8 (#484) SPI0_MOSI 19 20 GND - -
I(P/U) GPIOX.9 (#485) SPI0_MISO 21 22 GPIOX.2 (#478) I(P/U)
I(P/U) GPIOX.11 (#487) SPI0_SCLK 23 24 SPI0_CS0 GPIOX.10 (#486) I(P/U)
- - GND 25 26 SPI0_CS1 GPIOH.6 (#433) I(P/D)
I(P/U) GPIOA.14 (#474) I2C1_SDA 27 28 I2C1_SCL GPIOA.15 (#475) I(P/U)
I(P/U) GPIOX.14 (#490) 29 30 GND - -
I(P/U) GPIOX.15 (#491) 31 32 GPIOH.7 (#434) I(P/D)
I(P/U) GPIOX.6 (#482) PWM_A 33 34 GND - -
I(P/D) GPIOX.19 (#495) PWM_B 35 36 PWM_F GPIOH.5 (#432) -
ADC.AIN2 37 38 REF 1.8V
- - GND 39 40 ADC.AIN0

2019/10/29 16:27 · luke.go

I2C-2

Pin NumberNet NameExport Number
3I2C-2 SDA493
5I2C-2 SCL494


I2C-3

Pin NumberNet NameExport Number
27I2C-3 SDA474
28I2C-3 SCL475


Download fritzing about the wiring
- ODROID-N2 part ☞ ODROID-N2 Fritzing part
- ODROID-C4 part ☞ ODROID-C4 Fritzing part
- WEATHER-BOARD2 part ☞ Weather-board2 Fritzing part
- Wiring parts ☞ wb2_n2.fzz

odroid@odroid:~$ sudo apt install i2c-tools
odroid@odroid:~$ sudo i2cdetect -y -r 2
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- 76 --

or

odroid@odroid:~$ sudo i2cdetect -y -r 3
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- 76 --

If you don't find any i2c node on “/dev/”, please check this I2C setting.
Setting the I2C on ODROID-N2

Python

$ sudo apt install python3-smbus
$ git clone https://github.com/hardkernel/WEATHER-BOARD.git
$ cd WEATHER-BOARD/python_weather
$ sudo python3 weather_board.py /dev/i2c-2

or

$ sudo python3 weather_board.py /dev/i2c-3

Pure C code

$ sudo apt install git
$ git clone https://github.com/hardkernel/WEATHER-BOARD.git
$ cd WEATHER-BOARD/c_weather
$ make
$ sudo ./weather_board /dev/i2c-2

or

$ sudo ./weather_board /dev/i2c-3

WiringPi

$ git clone https://github.com/hardkernel/wiringPi
$ cd wiringPi
$ ./build
 
$ git clone https://github.com/hardkernel/WEATHER-BOARD.git
$ cd WEATHER-BOARD/c_weather/wiringPi
$ make
$ sudo ./weather_board /dev/i2c-2

or

$ sudo ./weather_board /dev/i2c-3