0
votes

I have an Arduino with a shield communicating with a motor controller over RS-232/Serial. During communications when I receive a response from the motor controller there are random characters / irregular responses.

The commands and responses are simple ASCII strings.

I have no problem communicating over serial between my PC and the arduino, and no problem connecting over serial between my PC and the motor controller, but together these two don't want to get along. Can anyone think of a reason why this would be the case?

Same baud rate (9600), standard settings: 8 bits, 1 stop bit no parity on all devices.

On the Arduino I'm using SoftwareSerial to communicate with the motor controller and the Serial Monitor to enter commands.

Any ideas?

1
What motor controller? Adding your code and some of the bad data could help identify the real problem.slash-dev

1 Answers

0
votes

SoftwareSerial is very susceptible to interrupts from other sources. If pins 8&9 are available, you should use AltSoftSerial. If not, and the motor controller sends plain text responses, you should use a library I posted on github, NeoSWSerial.