Timeline for Pyserial serial.write() doesn't work
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Dec 13, 2017 at 9:59 | history | suggested | Sonali_B | CC BY-SA 3.0 |
fixed grammar
|
| Dec 13, 2017 at 7:29 | review | Suggested edits | |||
| S Dec 13, 2017 at 9:59 | |||||
| Dec 13, 2017 at 3:54 | comment | added | jsotola | @voidUpdate, please delete your comment, it has nothing to do with the question that was asked, and nobody will answer it ... please post your own question instead | |
| Dec 12, 2017 at 17:03 | comment | added | voidUpdate | I'm having a similar problem with my raspberry pi, where sometimes it will work, sometimes it won't. I'm trying to send the sys.argv array, minus the first element, and display it on a screen, which I thought would be simple, but sometimes it will work and sometimes not. Code on the pi: import serial import sys ser = serial.Serial('/dev/ttyACM0',9600) args = str(' '.join(sys.argv[1:])) args = args.replace("'","") ser.write("test".encode()) print(args) Code on the arduino: String incomingByte; #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); //l | |
| Sep 21, 2015 at 19:49 | comment | added | Stefan Krüger s-light |
i think that your readString() can't reliably get all three AAAs in one catch - you have to send them at the right moment - otherwise it will read only first or last part or something else...
|
|
| Sep 21, 2015 at 7:21 | comment | added | Stefan Krüger s-light | please append what you did that worked - so the steps you did in the 'console' - | |
| Sep 20, 2015 at 23:03 | comment | added | Nick Gammon♦ | Cross posted on Arduino Forum and a second time. | |
| Sep 20, 2015 at 22:16 | comment | added | Nick Gammon♦ |
Your subject is Pyserial serial.write() doesn't work but you follow up by saying it runs fine from the console. So, the serial.write does in fact work. Try to stop using the words "doesn't work" and describe in more detail what is happening.
|
|
| Sep 20, 2015 at 22:02 | answer | added | Nick Gammon♦ | timeline score: 2 | |
| Sep 20, 2015 at 21:51 | history | asked | Leo Ervin | CC BY-SA 3.0 |