Hey,
One way of debugging your scripts is to use Serial.println commands. After you get the script right, those may
be deleted or commented out.
It would be great if there were a buttom with which you can comment on/off (delete) Serial.println cmd (also the famous while (! Serial))
Tkx
Leo