I am making my first steps with an Itsy Bitsy 32u4. I wrote a test program that reads a string from Serial but it looks very slow compared to other devices. Using the Arduino IDE Serial monitor, I have to wait approximately 1 second to get the answer. Am I doing something wrong ?
Code: Select all
// Testing the Itsy bitsy 5V
#define TEST_PIN 9
String s;
bool on;
void setup() {
Serial.begin(115200);
pinMode(13, OUTPUT);
delay(3000);
Serial.println("Program start");
digitalWrite(13, HIGH);
}
void loop() {
//to look at the frequency on a scope
on = !on ;
digitalWrite(TEST_PIN, on);
if ( Serial.available() > 0) {
s = Serial.readString();
Serial.print("You wrote: ");
Serial.println(s);
}
}
Thank you in advance,
Cedric