On 25Sep2017 09:29, Phil <phil_...@bigpond.com> wrote:
[...]
Just for interest I amended my code to use what you provided and tried it under IDLE. There aren't any errors but but my Arduino is not responding. However, if I enter python3 mycode.py then it works perfectly. I'm sure there's an explanation for this.

Just to this. If your serial file handle is a normal buffered one, you may also need to call .flush(). When you run from the command line as "python3 mycode.py" is done automatically at programme exit. In the IDE, the programme has not exited, so your bytes may be lurking in the buffer, unsent.

Cheers,
Cameron Simpson <c...@cskk.id.au> (formerly c...@zip.com.au)
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to