File tree 2 files changed +59
-13
lines changed
examples/Example14-ShowFirmwareVersion
2 files changed +59
-13
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ SerLCD Library - Show the firmware version
3
+ Gaston Williams - August 29, 2018
4
+
5
+ This sketch prints the device's firmware version to the screen.
6
+
7
+ The circuit:
8
+ SparkFun RGB OpenLCD Serial display connected through
9
+ a Sparkfun Qwiic adpater to an Ardruino with a
10
+ Qwiic shield or a Sparkfun Blackboard with Qwiic built in.
11
+
12
+ The Qwiic adapter should be attached to the display as follows:
13
+ Display / Qwiic Cable Color
14
+ GND / Black
15
+ RAW / Red
16
+ SDA / Blue
17
+ SCL / Yellow
18
+
19
+ Note: If you connect directly to a 5V Arduino instead, you *MUST* use
20
+ a level-shifter to convert the i2c voltage levels down to 3.3V for the display.
21
+
22
+ This code is based on the LiquidCrystal code originally by David A. Mellis
23
+ and the OpenLCD code by Nathan Seidle at SparkFun.
24
+
25
+ License: This example code is in the public domain.
26
+ */
27
+
28
+ #include < Wire.h>
29
+
30
+ #include < SerLCD.h> // Click here to get the library: http://librarymanager/All#SparkFun_SerLCD
31
+ SerLCD lcd; // Initialize the library with default I2C address 0x72
32
+
33
+ void setup () {
34
+ Wire.begin ();
35
+
36
+ lcd.begin (Wire); // Set up the LCD for I2C
37
+ }
38
+
39
+ void loop () {
40
+ lcd.command (' ,' ); // Send the comma to display the firmware version
41
+ // Firmware will be displayed for 500ms so keep re-printing it
42
+ delay (500 );
43
+ }
44
+
Original file line number Diff line number Diff line change @@ -15,29 +15,31 @@ SerLCD KEYWORD1
15
15
begin KEYWORD2
16
16
clear KEYWORD2
17
17
home KEYWORD2
18
- print KEYWORD2
19
- write KEYWORD2
20
18
setCursor KEYWORD2
21
- cursor KEYWORD2
19
+ createChar KEYWORD2
20
+ writeChar KEYWORD2
21
+ write KEYWORD2
22
+ noDisplay KEYWORD2
23
+ display KEYWORD2
22
24
noCursor KEYWORD2
23
- blink KEYWORD2
25
+ cursor KEYWORD2
24
26
noBlink KEYWORD2
25
- display KEYWORD2
26
- noDisplay KEYWORD2
27
- autoscroll KEYWORD2
28
- noAutoscroll KEYWORD2
29
- leftToRight KEYWORD2
30
- rightToLeft KEYWORD2
27
+ blink KEYWORD2
31
28
scrollDisplayLeft KEYWORD2
32
29
scrollDisplayRight KEYWORD2
33
- createChar KEYWORD2
34
- writeChar KEYWORD2
35
30
moveCursorLeft KEYWORD2
36
31
moveCursorRight KEYWORD2
37
32
setBacklight KEYWORD2
38
33
setFastBacklight KEYWORD2
34
+ leftToRight KEYWORD2
35
+ rightToLeft KEYWORD2
36
+ autoscroll KEYWORD2
37
+ noAutoscroll KEYWORD2
38
+ setContrast KEYWORD2
39
+ setAddress KEYWORD2
40
+ command KEYWORD2
41
+ specialCommand KEYWORD2
39
42
40
43
#######################################
41
44
# Constants (LITERAL1)
42
45
#######################################
43
-
You can’t perform that action at this time.
0 commit comments