Need a few pointers to make sure I'm heading in the right direction.
I have a servo controller with 15 pre-programmed routines (controls a animatronic fortune teller).
I have one trigger switch.
My problem is I need to communicate via RS232 to the servo controller on which routine to play.
The servo controller expects commands as simple as "Play 0", "Play 1" and so on to "Play 15".
I've not used a RS232 shield yet. I've only programmed the UNO in the past.
So is my best choice the UNO and the RS232 shield.
I expect the UNO will keep count of the routines so on completion of "Play 15" it goes back to "Play 1"
Thanks for any advice, and RS232 code examples since I haven't purchased a shield yet.
Dan
Not sure if you need a shield. Do you have actual RS 232 data? The arduino looks like a serial port to a PC so I don't see the need for a shield unless you have an actual RS232 device somewhere in the setup. It is not clear from your post where this is.
To send or recieve data just use the Serial commands.
The servo controller is expecting commands via RS232 to play the servo routines. Standard RS232 19200 baud 8 data bits, no parity, 1 stop bit, X-on/X-off flow control
Again I only have to send the words "Play 1" up to "Play 15" via RS232 to the servo controller no other handshaking is required.
Ok thanks, then yes you will need something to convert serial into RS232, you can buy a shield or make one. Look for RS232 to TTL converters.
Now you just need a spare serial port to connect it to. The best would be to use an Arduino Mega as that has four ports, or a Learnodo or micro as they both have a free serial port. Do you know about Xon / Xoff protocol? That is not normally supported on the Arduino and you will need some special software or a libary to support that.
Another method of flow control (software flow control) uses special characters such as XON/XOFF to control the flow of data. The XON/XOFF characters are sent by the receiver to the sender to control when the sender will send data, that is, these characters go in the opposite direction to the data being sent. The circuit starts in the "sending allowed" state. When the receiver's buffers approach capacity, the receiver sends the XOFF character to tell the sender to stop sending data. Later, after the receiver has emptied its buffers, it sends an XON character to tell the sender to resume transmission. These are non-printing characters and are interpreted as handshake signals by printers, terminals, and computer systems.