preparation to move the command execution to another function
parent
181aa3c9de
commit
8827530a3b
|
@ -101,8 +101,11 @@ String waitForSerialInput(uint8_t bytes){
|
|||
return string;
|
||||
}
|
||||
|
||||
void runCommand(char command, String argument){
|
||||
|
||||
void runCommand(){
|
||||
}
|
||||
|
||||
void getAndRunCommand(){
|
||||
uint8_t command = Serial.read();
|
||||
int analogPin;
|
||||
String mode;
|
||||
|
@ -124,7 +127,8 @@ void runCommand(){
|
|||
" <data>\n\r"
|
||||
" s success\n\r"
|
||||
" e error\n\r"
|
||||
" \\r\\n ready (this message uses \n\r to not show up as \"ready\" after the first line)\n\r"
|
||||
" \\n\\r data separator\n\r"
|
||||
" \\r\\n ready\n\r"
|
||||
"commands (input to serial line)\n\r"
|
||||
" R pseudo-reset\n\r"
|
||||
" run setup again\n\r"
|
||||
|
@ -285,7 +289,7 @@ void setup(){
|
|||
void loop(){
|
||||
while (true){
|
||||
if(Serial.available() > 0) {
|
||||
runCommand();
|
||||
getAndRunCommand();
|
||||
Serial.print("\r\n"); // send "ready" status information
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue