Update: The code works only with an Arduino board (specifically, Arduino UNO). But with other boards (like a local one, gizDuino), it does error.
Edit: Is there any way I can detect when the Arduino is disconnected?
Update: The code works only with an Arduino board (specifically, Arduino UNO). But with other boards (like a local one, gizDuino), it does error.
Edit: Is there any way I can detect when the Arduino is disconnected?