//this program blinks the internal led on a Seeeduino XIAO //it uses serial communication to send a keypress to the Seeeduino //the Seeeduino blinks once if the keypress is ´1´ and twice if the keypress is ´2´ etc. void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); } void loop() { while (Serial.available() == 0) { } int key = Serial.parseInt(); if (key >= 1 && key <= 9) { Serial.print("You pressed: "); Serial.println(key); for (int i = 0; i < key; i++) { digitalWrite(LED_BUILTIN, HIGH); delay(500); digitalWrite(LED_BUILTIN, LOW); delay(500); } Serial.println("Press a number on your Keyboard"); } }