• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscapheguic翻訳omegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revisiona5af38b1b0066428f44110d6701a80d8f4f482ba (tree)
Time2020-10-14 23:44:59
AuthorSatoshi Yasuda <7m3tjz@jarl...>
CommiterSatoshi Yasuda

Log Message

new file: rpt_conn_lcd.c

Change Summary

Incremental Difference

--- /dev/null
+++ b/rpt_conn_lcd.c
@@ -0,0 +1,33 @@
1+#include "rpt_conn.h"
2+
3+//USE WIRINGPI PIN NUMBERS
4+#define LCD_RS 10 //Register select pin GPIO10
5+#define LCD_E 9 //Enable Pin GPIO9
6+#define LCD_D4 11 //Data pin 4 GPIO11
7+#define LCD_D5 25 //Data pin 5 GPIO25
8+#define LCD_D6 8 //Data pin 6 GPIO8
9+#define LCD_D7 7 //Data pin 7 GPIO7
10+
11+void lcdPosition (int handle, int x, int y);
12+
13+void lcd_init()
14+{
15+ lcd = lcdInit (4, 20, 4, LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7,
16+ 0, 0, 0, 0);
17+ usleep (50);
18+ lcdClear (lcd);
19+ usleep (3000);
20+}
21+
22+void lcd_write (void)
23+{
24+ if (lcd_type == LCD_20x4)
25+ {
26+ lcdPosition (lcd, 0, 3);
27+ msg_temp [20] = 0x00;
28+ lcdPuts (lcd, msg_temp);
29+ }
30+ else if (lcd_type == LCD_16x2)
31+ {
32+ }
33+}