I want to build an RS232 interface that transmits commands to my RS232 enabled TV. Currently I can type the codes into Hyperterminal using a PC and I can control any function on the TV. But what I would like to do is build something that has 6-8 dry input circuits so that when I close one of the circuits (with a momentary button) it will transmit a command to my TV via RS232 from the arduino. Essentially each hardwired button will be assigned to a permanent RS232 command (e.g. On/Off, volume, etc).
Any ideas? Can anyone point me in the right direction? I have somewhat of an understanding of how Arduino works but I didn't need to build something until now. So I figure this would be the perfect time to start learning.
The fact that you already have RS232 to the TV working should make this process straight forward.
Start by wiring one momentary button to the Arduinio and just loop printing out if the button is pressed or not.
Once you have that working add the other buttons and for each button just print the code you want to send to the TV.
Now add an RS232 shield as suggested by @horace. Do not connect RS232 directly to the Arduino, the voltages are wrong and you will damage it.
You might want to connect the RS232 to your hyperterminal on your PC, then as you press the buttons connected to the Arduino you should see the correct commands being sent. Once you are happy that is working connect the RS232 to the TV.
horace:
what baudrate is the RS232? if it is 38400baud or less you could use software serial on a UNO otherwise you would require hardware serial, e.g. a Mega
It's the standard 9600,8,N,1
So my second question is how do I program in the "print" command? It is a straight forward thing using the arduino software? Or do I have to do some coding? I understand programming enough to look at what someone has already done and modify it. But I wouldn't know where to begin if I had an UNO, and an RS232 Shield. I have no problem with powering it up and making the connections but from that point I'm a little lost. I keep watching the tutorial videos and I am gaining more clarity but the code itself is my biggest stumbling block.
What I do understand is that once I create my code, I compile it and load it into the UNO but that's about the extent of my knowledge as a beginner.
if you run two port receive (modifyy baud rate/pins etc) commands you type on the Arduino serial monitor will be transmitted to the TV and any response displayed on the monitor