MAPID/CP: Added LCDON/LCDOFF
This commit is contained in:
parent
8f54104f5c
commit
8a7d7a4980
2 changed files with 36 additions and 4 deletions
|
@ -37,6 +37,9 @@ void setup() {
|
|||
SCmd.addCommand("ON", ledOn);
|
||||
SCmd.addCommand("OFF", ledOff);
|
||||
// LCD
|
||||
SCmd.addCommand("LCDON", lcdOn);
|
||||
SCmd.addCommand("LCDOFF", lcdOff);
|
||||
|
||||
SCmd.addCommand("ECHO", lcdEcho);
|
||||
SCmd.addCommand("CLS", lcdClear);
|
||||
SCmd.addCommand("LINE", lcdLine);
|
||||
|
@ -171,11 +174,16 @@ void help() {
|
|||
Serial.println(" VER");
|
||||
Serial.println(" GETTY");
|
||||
Serial.println(" HELP");
|
||||
Serial.println(" CLS");
|
||||
Serial.println(" ON");
|
||||
Serial.println(" OFF");
|
||||
Serial.println(" LCDON");
|
||||
Serial.println(" LCDOFF");
|
||||
Serial.println(" ECHO Text");
|
||||
Serial.println(" CLS");
|
||||
Serial.println(" LINE i");
|
||||
#ifdef README_PROGMEM
|
||||
Serial.println(" README");
|
||||
#endif
|
||||
|
||||
// Show prompt again
|
||||
Serial.println();
|
||||
|
@ -184,8 +192,8 @@ void help() {
|
|||
|
||||
void ledOn() {
|
||||
Serial.println("");
|
||||
Serial.println("Turning LED to *ON*");
|
||||
|
||||
Serial.println("Turning LED to *ON*");
|
||||
//lcd.println("LED on");
|
||||
digitalWrite(PIN_LED, HIGH);
|
||||
|
||||
|
@ -195,11 +203,35 @@ void ledOn() {
|
|||
|
||||
void ledOff() {
|
||||
Serial.println("");
|
||||
Serial.println("Turning LED to *OFF*");
|
||||
|
||||
Serial.println("Turning LED to *OFF*");
|
||||
//lcd.println("LED off");
|
||||
digitalWrite(PIN_LED, LOW);
|
||||
|
||||
// Show prompt again
|
||||
Serial.print(TTY_PROMPT);
|
||||
}
|
||||
|
||||
void lcdOn() {
|
||||
Serial.println("");
|
||||
|
||||
// Turn display on
|
||||
Serial.println("Turning LCD screen to *ON*");
|
||||
lcd.display();
|
||||
lcd.setBrightness(30);
|
||||
|
||||
// Show prompt again
|
||||
Serial.print(TTY_PROMPT);
|
||||
}
|
||||
|
||||
void lcdOff() {
|
||||
Serial.println("");
|
||||
|
||||
// Turn display on
|
||||
Serial.println("Turning LCD screen to *OFF*");
|
||||
lcd.noDisplay();
|
||||
lcd.setBrightness(1);
|
||||
|
||||
// Show prompt again
|
||||
Serial.print(TTY_PROMPT);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define _CONFIG_H_
|
||||
|
||||
#define OS_NAME "MAPID/CP"
|
||||
#define OS_VERSION 4
|
||||
#define OS_VERSION 5
|
||||
|
||||
#define PIN_LED LED_BUILTIN
|
||||
#define PIN_LCD 2
|
||||
|
|
Loading…
Reference in a new issue