Good morning! Recently I bought an Arduino board to make sort of \"light control\" in my room. Here is the code of the firmware I wrote:
int control = 0;
int
I think it's probably a race condition between when the serial port is opened and when the data are sent. I'd probably stick a sleep in between the open and the write calls.
Alternatively, instead of using this library "serial" you might want to just open and write directly to the device, perhaps it's doing something funny (see the double open mentioned in other posts)