|
|
@@ -38,8 +38,6 @@ void loop() |
|
|
|
if(Serial.available() > 0) |
|
|
|
{ |
|
|
|
SerialData = Serial.read(); |
|
|
|
Serial.print("...Received Data: "); |
|
|
|
Serial.println(SerialData, DEC); |
|
|
|
} |
|
|
|
|
|
|
|
processSerialData(SerialData); |
|
|
@@ -89,27 +87,33 @@ void processSerialData(char SerialData) |
|
|
|
break; |
|
|
|
case '1': |
|
|
|
digitalWrite(TAC1, !digitalRead(TAC1)); |
|
|
|
Serial.println("Tactilo 1"); |
|
|
|
Serial.print("Tactilo 1: "); |
|
|
|
Serial.println(digitalRead(TAC1)); |
|
|
|
break; |
|
|
|
case '2': |
|
|
|
digitalWrite(TAC2, !digitalRead(TAC2)); |
|
|
|
Serial.println("Tactilo 2"); |
|
|
|
Serial.print("Tactilo 2: "); |
|
|
|
Serial.println(digitalRead(TAC2)); |
|
|
|
break; |
|
|
|
case '3': |
|
|
|
digitalWrite(TAC3, !digitalRead(TAC3)); |
|
|
|
Serial.println("Tactilo 3"); |
|
|
|
Serial.print("Tactilo 3: "); |
|
|
|
Serial.println(digitalRead(TAC3)); |
|
|
|
break; |
|
|
|
case '4': |
|
|
|
digitalWrite(TAC4, !digitalRead(TAC4)); |
|
|
|
Serial.println("Tactilo 4"); |
|
|
|
Serial.print("Tactilo 4: "); |
|
|
|
Serial.println(digitalRead(TAC4)); |
|
|
|
break; |
|
|
|
case '5': |
|
|
|
digitalWrite(TAC5, !digitalRead(TAC5)); |
|
|
|
Serial.println("Tactilo 5"); |
|
|
|
Serial.print("Tactilo 5: "); |
|
|
|
Serial.println(digitalRead(TAC5)); |
|
|
|
break; |
|
|
|
case '6': |
|
|
|
digitalWrite(TAC6, !digitalRead(TAC6)); |
|
|
|
Serial.println("Tactilo 6"); |
|
|
|
Serial.print("Tactilo 6: "); |
|
|
|
Serial.println(digitalRead(TAC6)); |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |