void zeichenfolge_auswerten() { string_to_array(zeile); // --> strs[] , strs_length if (strs[0]=="m") { ausgabe("Motor"); if (strs_length==2) { motor1.run(-strs[1].toInt()); //linker Motor motor2.run( strs[1].toInt()); } else if (strs_length==3) { motor1.run(-strs[1].toInt()); //linker Motor motor2.run(strs[2].toInt()); } } else if (strs[0]=="ml") { // Motor links ausgabe("motor links"); motor1.run( -strs[1].toInt() ); } else if (strs[0]=="mr") { // Motor rechts ausgabe("motor rechts"); motor2.run( strs[1].toInt() ); } else if (strs[0]=="rgb") { /// RGB-LEDs if (strs_length==2) { led.setColor(strs[1].toInt(),strs[1].toInt(), strs[1].toInt()); } else if (strs_length==4) { led.setColor(strs[1].toInt(),strs[2].toInt(), strs[3].toInt()); } led.show(); } if (strs[0]=="rgbr") { /// RGB-LEDs if (strs_length==2) { led.setColorAt(0, strs[1].toInt(),strs[1].toInt(), strs[1].toInt()); } else if (strs_length==4) { led.setColorAt(0, strs[1].toInt(),strs[2].toInt(), strs[3].toInt()); } led.show(); } if (strs[0]=="rgbl") { /// RGB-LEDs if (strs_length==2) { led.setColorAt(1, strs[1].toInt(),strs[1].toInt(), strs[1].toInt()); } else if (strs_length==4) { led.setColorAt(1, strs[1].toInt(),strs[2].toInt(), strs[3].toInt()); } led.show(); } if (strs[0]=="x") { /// RGB-LEDs char *s = " "; strs[1].toCharArray(s, 4); ledMx.drawStr(0,7,s); } } // Ende zeichenfolge_auswerten()