WIP Terminal interface with commands

This commit is contained in:
Daniele Verducci (ZenPenguin)
2021-01-02 07:56:11 +01:00
parent 4d9fd83cdd
commit ff4823b3ad
2 changed files with 21 additions and 11 deletions

View File

@ -41,9 +41,10 @@ void setup() {
}
void loop() {
if (Serial.available() > 0) {
if (Serial.available() > 1) {
switch (Serial.read()) {
case COMMAND_WRITE:
while (Serial.available() < 1) {} // Waits for the second byte
incomingBuffer = Serial.read();
availableBytes = 1; // TODO: Implement a 256 byte buffer and store the avail bytes number in this var
break;