Noam Nahum
/
ForOfek
Lcd display
Communicator.cpp
- Committer:
- noamnahum
- Date:
- 2021-06-07
- Revision:
- 3:4c564ed930fc
- Parent:
- 2:5e42a3c4fd80
File content as of revision 3:4c564ed930fc:
#include "mbed.h" #include "SerialLCD.h" SerialLCD lcd(PA_9); int main() { lcd.clear(); while(true) { /// Test code /// lcd.clearLine(1); lcd.printf("Full Bright Test"); lcd.setBrightness(30); wait(3); lcd.clearLine(1); lcd.printf("Blink Test"); lcd.setCursor(2, 1); lcd.printf("Blinking"); lcd.blink(); wait(3); lcd.clearLine(1); lcd.printf("Clear Test"); wait(2); lcd.clear(); wait(3); lcd.clearLine(1); lcd.printf("Cursor Test"); lcd.setCursor(2, 1); lcd.cursor(); wait(3); lcd.clearLine(1); lcd.printf("Display Test"); lcd.noDisplay(); wait(2); lcd.display(); wait(3); lcd.clearLine(1); lcd.printf("Home Test"); lcd.setCursor(2, 1); lcd.home(); lcd.printf("Got home"); wait(3); lcd.leftToRight(); lcd.clearLine(1); lcd.printf("LeftToRight Test"); wait(3); lcd.clearLine(1); lcd.printf("noBlink Test"); lcd.setCursor(2, 1); lcd.noBlink(); wait(3); lcd.clearLine(1); lcd.printf("noCursor Test"); lcd.setCursor(2, 1); lcd.noCursor(); wait(3); lcd.rightToLeft(); lcd.clearLine(1); lcd.printf("rightToLeft Test"); wait(3); lcd.clearLine(1); lcd.printf("Half Bright Test"); lcd.setBrightness(15); wait(3); } }