forked from anxzhu/segment-lcd-with-ht1621
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from valerionew/character-display
Character display
- Loading branch information
Showing
7 changed files
with
351 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#include <HT1621.h> | ||
#define LCD_CS_PIN 6 | ||
#define LCD_WR_PIN 7 | ||
#define LCD_DATA_PIN 8 | ||
#define DELAY_SINK 1000 | ||
|
||
HT1621 lcd; | ||
void setup() { | ||
lcd.begin(LCD_CS_PIN, LCD_WR_PIN, LCD_DATA_PIN); | ||
lcd.backlight(); | ||
lcd.clear(); | ||
lcd.setBatteryLevel(3); | ||
} | ||
|
||
void loop(){ | ||
lcd.clear(); | ||
lcd.print("AaBbCc"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("DdEeFf"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("GgHhIi"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("JjKkLl"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("MmNnOo"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("PpQqRr"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("SsTtUu"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("VvWwXx"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("YyZz "); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("123456"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("7890", true); // left padded | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print(" _-|*"); // Spaces | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("HELLO"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("HT1621"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("bye"); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print("123*", true); // Degrees | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print((long)123456); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print(1234.10, 2); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print(999.123234); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print(1250.0, 3); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.print(111.1111, 3); | ||
delay(DELAY_SINK); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <HT1621.h> | ||
#define LCD_CS_PIN 6 | ||
#define LCD_WR_PIN 7 | ||
#define LCD_DATA_PIN 8 | ||
#define DELAY_SINK 6000 | ||
|
||
// #define HT1621_DEBUG | ||
|
||
HT1621 lcd; | ||
void setup() { | ||
lcd.begin(LCD_CS_PIN, LCD_WR_PIN, LCD_DATA_PIN); | ||
lcd.backlight(); | ||
lcd.clear(); | ||
} | ||
|
||
void loop(){ | ||
lcd.clear(); | ||
lcd.printCelsius(0.1); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.printCelsius(10); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.printCelsius(11111.1); // saturates at 9999 | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.printCelsius(-1111.1); // saturates at -999 | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.printCelsius(-0.1); | ||
delay(DELAY_SINK); | ||
lcd.clear(); | ||
lcd.printCelsius(-12.57); | ||
delay(DELAY_SINK); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.