WIP Terminal interface with commands
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user