for israel

Dependencies:   mbed SerialLCD

Committer:
noamnahum
Date:
Thu Apr 22 10:47:19 2021 +0000
Revision:
2:5e42a3c4fd80
Parent:
1:f8372f3df8d2
fornadav;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
noamnahum 0:c2b3b055cc8e 1 #include "mbed.h"
noamnahum 2:5e42a3c4fd80 2 #include "SerialLCD.h"
noamnahum 2:5e42a3c4fd80 3
noamnahum 2:5e42a3c4fd80 4 SerialLCD lcd(PA_9);
noamnahum 2:5e42a3c4fd80 5
noamnahum 2:5e42a3c4fd80 6 uint8_t smiley[8] = {
noamnahum 2:5e42a3c4fd80 7 0x00,
noamnahum 2:5e42a3c4fd80 8 0x11,
noamnahum 2:5e42a3c4fd80 9 0x00,
noamnahum 2:5e42a3c4fd80 10 0x00,
noamnahum 2:5e42a3c4fd80 11 0x11,
noamnahum 2:5e42a3c4fd80 12 0x0E,
noamnahum 2:5e42a3c4fd80 13 0x00
noamnahum 2:5e42a3c4fd80 14 };
noamnahum 2:5e42a3c4fd80 15
noamnahum 2:5e42a3c4fd80 16 int main() {
noamnahum 2:5e42a3c4fd80 17 lcd.clear();
noamnahum 0:c2b3b055cc8e 18
noamnahum 2:5e42a3c4fd80 19 while(true) {
noamnahum 2:5e42a3c4fd80 20 /// Test code ///
noamnahum 2:5e42a3c4fd80 21 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 22 lcd.printf("Full Bright Test");
noamnahum 2:5e42a3c4fd80 23 lcd.setBrightness(30);
noamnahum 2:5e42a3c4fd80 24 wait(3);
noamnahum 2:5e42a3c4fd80 25
noamnahum 2:5e42a3c4fd80 26 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 27 lcd.printf("Blink Test");
noamnahum 2:5e42a3c4fd80 28 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 29 lcd.printf("Blinking");
noamnahum 2:5e42a3c4fd80 30 lcd.blink();
noamnahum 2:5e42a3c4fd80 31 wait(3);
noamnahum 2:5e42a3c4fd80 32
noamnahum 2:5e42a3c4fd80 33 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 34 lcd.printf("Clear Test");
noamnahum 2:5e42a3c4fd80 35 wait(2);
noamnahum 2:5e42a3c4fd80 36 lcd.clear();
noamnahum 2:5e42a3c4fd80 37 wait(3);
noamnahum 2:5e42a3c4fd80 38
noamnahum 2:5e42a3c4fd80 39 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 40 lcd.printf("New Char Test");
noamnahum 2:5e42a3c4fd80 41 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 42 lcd.createChar(1, smiley);
noamnahum 2:5e42a3c4fd80 43 lcd.printCustomChar(1);
noamnahum 2:5e42a3c4fd80 44 wait(3);
noamnahum 2:5e42a3c4fd80 45
noamnahum 2:5e42a3c4fd80 46 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 47 lcd.printf("Cursor Test");
noamnahum 2:5e42a3c4fd80 48 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 49 lcd.cursor();
noamnahum 2:5e42a3c4fd80 50 wait(3);
noamnahum 0:c2b3b055cc8e 51
noamnahum 2:5e42a3c4fd80 52 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 53 lcd.printf("Display Test");
noamnahum 2:5e42a3c4fd80 54 lcd.noDisplay();
noamnahum 2:5e42a3c4fd80 55 wait(2);
noamnahum 2:5e42a3c4fd80 56 lcd.display();
noamnahum 2:5e42a3c4fd80 57 wait(3);
noamnahum 2:5e42a3c4fd80 58
noamnahum 2:5e42a3c4fd80 59 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 60 lcd.printf("Home Test");
noamnahum 2:5e42a3c4fd80 61 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 62 lcd.home();
noamnahum 2:5e42a3c4fd80 63 lcd.printf("Got home");
noamnahum 2:5e42a3c4fd80 64 wait(3);
noamnahum 2:5e42a3c4fd80 65
noamnahum 2:5e42a3c4fd80 66 lcd.leftToRight();
noamnahum 2:5e42a3c4fd80 67 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 68 lcd.printf("LeftToRight Test");
noamnahum 2:5e42a3c4fd80 69 wait(3);
noamnahum 0:c2b3b055cc8e 70
noamnahum 2:5e42a3c4fd80 71 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 72 lcd.printf("noBlink Test");
noamnahum 2:5e42a3c4fd80 73 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 74 lcd.noBlink();
noamnahum 2:5e42a3c4fd80 75 wait(3);
noamnahum 2:5e42a3c4fd80 76
noamnahum 2:5e42a3c4fd80 77 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 78 lcd.printf("noCursor Test");
noamnahum 2:5e42a3c4fd80 79 lcd.setCursor(2, 1);
noamnahum 2:5e42a3c4fd80 80 lcd.noCursor();
noamnahum 2:5e42a3c4fd80 81 wait(3);
noamnahum 2:5e42a3c4fd80 82
noamnahum 2:5e42a3c4fd80 83 lcd.rightToLeft();
noamnahum 2:5e42a3c4fd80 84 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 85 lcd.printf("rightToLeft Test");
noamnahum 2:5e42a3c4fd80 86 wait(3);
noamnahum 2:5e42a3c4fd80 87
noamnahum 2:5e42a3c4fd80 88 lcd.clearLine(1);
noamnahum 2:5e42a3c4fd80 89 lcd.printf("Half Bright Test");
noamnahum 2:5e42a3c4fd80 90 lcd.setBrightness(15);
noamnahum 2:5e42a3c4fd80 91 wait(3);
noamnahum 2:5e42a3c4fd80 92 }
noamnahum 0:c2b3b055cc8e 93 }