We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:c_lcdio [2016/02/26 14:31]
john1117 created
en:c_lcdio [2017/07/24 11:39] (current)
john1117 [Tutorials]
Line 1: Line 1:
-====== 16x2 LCD + IO Shield on ODROID-C2 ======+====== 16x2 LCD + IO Shield on ODROID-======
  
 {{http://​dn.odroid.com/​homebackup/​16x2LCDIOKitH.jpg?​500|}} {{http://​dn.odroid.com/​homebackup/​16x2LCDIOKitH.jpg?​500|}}
Line 11: Line 11:
  
 === LCD pins === === LCD pins ===
-^Pin name^Export GPIO num^wiringPi num+^Pin name^wiringPi num^Export GPIO num^
-|LCD_RS|#249|7| +^:::​^:::​^C0/​C1/​C1+^C2
-|LCD_EN|#247|0| +|LCD_RS| ​ #7  ​| ​ #83   ​| ​ #​249  ​
-|LCD_D4|#239|2| +|LCD_EN| ​ #0  ​| ​ #88   ​| ​ #​247  ​
-|LCD_D5|#237|3| +|LCD_D4| ​ #2  ​| ​ #116  |  #​239  ​
-|LCD_D6|#238|1| +|LCD_D5| ​ #3  ​| ​ #115  |  #​237  ​
-|LCD_D7|#236|4|+|LCD_D6| ​ #1  ​| ​ #87   ​| ​ #​238  ​
 +|LCD_D7| ​ #4  ​| ​ #104  |  #​236  ​|
  
-====== ​Use to LCD with wiringPi on ubuntu ​ ======+====== ​Build the wiringPi on ubuntu ​ ====== 
 +<WRAP center round important 100%> 
 +**Note** 
 +  * Before starting this guide, you should check whether the 1-wire module is loaded or not. Because 1-wire and LCD_RS share the GPIOX_21 pin. 
 +<​code>​ 
 +odroid@odroid64:​~$ lsmod 
 +Module ​                 Size  Used by 
 +w1_gpio ​                ​3785 ​ 0 
 +wire                   ​25687 ​ 1 w1_gpio 
 +(...) 
 +</​code>​ 
 +  * If 1-wire module is loaded, then please unload the 1-wire modules. 
 +</​WRAP>​ 
 +To use the LCD-IO Shield with wiringPi you build the wiringPi library first.
  
 1. Get the wiringPi library compatible **ODROID Series**. 1. Get the wiringPi library compatible **ODROID Series**.
Line 25: Line 39:
  
 2. Build the library 2. Build the library
- 
   cd wiringPi   cd wiringPi
   ./build   ./build
- 
 ====== Tutorials ====== ====== Tutorials ======
 === Basic example === === Basic example ===
 {{http://​dn.odroid.com/​homebackup/​16x2LCDIOKitH.jpg?​300|}} {{http://​dn.odroid.com/​homebackup/​16x2LCDIOKitH.jpg?​300|}}
 +
 +1. Get a source code.\\
 +{{http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​example-lcd.c|example-lcd.c}}
   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​example-lcd.c   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​example-lcd.c
 +2. Compile & Run
   gcc -o example-lcd example-lcd.c -lwiringPi -lwiringPiDev -lpthread   gcc -o example-lcd example-lcd.c -lwiringPi -lwiringPiDev -lpthread
   sudo ./​example-lcd   sudo ./​example-lcd
Line 38: Line 54:
 === Display System Time === === Display System Time ===
 {{:​en:​c1:​16x2lcd_time.jpg?​300|}} {{:​en:​c1:​16x2lcd_time.jpg?​300|}}
 +
 +1. Get a source code.\\
 +{{http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​lcd_time.c|lcd_time.c}}
   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​lcd_time.c   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​lcd_time.c
-  ​gcc -o lcd_time lcd_time.c -lwiringPi -lpthread+2. Compile & Run 
 +  ​gcc -o lcd_time lcd_time.c -lwiringPi ​-lwiringPiDev ​-lpthread
   sudo ./lcd_time   sudo ./lcd_time
 === Interrupt example === === Interrupt example ===
 +1. Get a source code.\\
 +{{http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​wiring_isr.c|wiring_isr.c}}
   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​wiring_isr.c   wget http://​dn.odroid.com/​source_peripherals/​16x2lcdio/​wiring_isr.c
-  ​gcc -o wiring_isr wiring_isr.c -lwiringPi -lpthread +2. Compile & Run 
-Push your SW1 on 16x2lcd board+  ​gcc -o wiring_isr wiring_isr.c -lwiringPi ​-lwiringPiDev ​-lpthread
   sudo ./​wiring_isr   sudo ./​wiring_isr
 +3. Push the SW1 on 16x2lcd board
  
 === Display sensors value with Weather-Board === === Display sensors value with Weather-Board ===
  
  
-  * [[c1_wb_16x2lcd ​| Display sensors value with Weather-Board]]+  * [[en:​wb_c_16x2lcd ​| Display sensors value with Weather-Board]]
en/c_lcdio.1456466497.txt.gz · Last modified: 2016/02/26 14:31 by john1117
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0