// Xiao RP2040 Echo Program // by Fabacademy instructor #define bufsize 25 char buf[bufsize]; int count = 0; void setup() { Serial.begin(9600); //must put in 9600 baudrate for the program to load into RP2040 successfully } void loop() { char chr; // // check for a char // if (Serial.available()) { // // read, save, and send char // chr = Serial.read(); buf[count] = chr; count += 1; buf[count] = 0; if (count == (bufsize - 1)) count = 0; Serial.print("hello.RP2040-XIAO.blink-echo.ino: you typed "); Serial.println(buf); } }