Sending rs232 when button is high

Hello, I'm new to Arduino,

I have to send a serial hex string when I set pin2 HIGH, and another serial hex string when pin3 HIGH.
I have a Arduino UNO and a MAX233CPP to convert TTL to RS232.
Is there an example I can use?

Thanks

I have to send a serial hex string

Which one? To what?

Is there an example I can use?

Yes.

PaulS:
Which one? To what?

button 1 -
02 00 00 00 00 02
wait 300000 ms
02 03 00 00 02 01 01 09
wait 5000 ms
02 0F 00 00 02 05 00 18

button 2 -
02 01 00 00 00 03

baud 38400 bps
data length 8 bits
no parity
stop bit one bit

videoprojector NEC
[/quote]

PaulS:
Yes.

Wher can I find it?

Thanks

The serial examples :slight_smile:

septillion:
The serial examples :slight_smile:

Nice help.

The hard thing is to try all examples and understand what they do, in contrast to what you have in mind.

I guess your "real problem" is to (probably) only send each string once when the button is pressed (or released, who knows ?)

Buttons bounce and Humans are slow but don't want to wait.

What do you want the "MAX233CPP to convert TTL to RS232" for ?
If you really need it, that's a separate task "How to wire up a MAX233CPP ( 20 Pins ! )"

While waiting for those 5 minutes after a button 1 trigger, you want to be able to send the second sequence as often as you want, in parallel. Right ?

That's a nice task, which you solve easier by learning basics, instead of searching for examples, IMO.
There are lots of open questions in your task description, however.

michael_x:
While waiting for those 5 minutes after a button 1 trigger, you want to be able to send the second sequence as often as you want, in parallel. Right ?

No, button 1 turns on the videoprojector, after 5 min selects the right input, then adjust the image.
Button 2 turns off the videoprojector, I don't need it to be working while the other tasks are in pregress.

Thanks