Erste Seite Zurück Weiter Letzte Seite Übersicht Bild

Der Arduino serial Code

void loop() {

// if there's any serial available, read it:

while (Serial.available() > 0) {

// look for the next valid integer in the incoming serial stream:

int red = Serial.parseInt();

int green = Serial.parseInt();

int blue = Serial.parseInt();

int relais=Serial.parseInt();

int musik=Serial.parseInt();

int remote=Serial.parseInt();

// look for the newline. That's the end of your sentence:

if (Serial.read() == '\n') {…}

…}…}