using the RX TX

Hi, need your help in programing my Arduino duemilanove please I need to gat digital data on the "RX" and "read" it every 3 sec, if the data is for example 0011 I need to keep checking, but if the data is 1111 I need to send a 5V to an external buzzer from leg "TX" and to keep sending the 5V from this leg until I will press on the "reset" button on the board. Hope you can answer me fast.

if (Serial.available()) {
    int c = Serial.read();
    switch (c) {
          case 3:
               // do stuff
               break;
          case 15:
               // do other stuff
               break;
 }

Start with something like that and let us know when you have a program that compiles.


Rob

I need to gat digital data on the "RX" and "read" it every 3 sec,

Why? It should read continuously, shouldn't it?

I need to send a 5V to an external buzzer from leg "TX"

Do you want to use RX and TX for serial communication or for the buzzer? Both is the wrong answer. So is yes.

Hope you can answer me fast.

Of course. But, probably not the answers you wanted.

thanks for the fast replay. i will get a serial communication data from an external item to the RX, the buzzer is not need to be serial communication, only need to send it "1" or "0" if the data i will get will be 1111 or 0011. and how i will check the reset button if it press or not?

only need to send it "1" or "0" if the data i will get will be 1111 or 0011.

So, what's the problem?

and how i will check the reset button if it press or not?

You can't. Pressing the reset button resets the Arduino, stopping your code from running.

When you say you want to get

digital data on the "RX" and "read" it every 3 sec, if the data is for example 0011 ...

I wonder if the device at the other end is actually sending serial data in the sense that the USART expects - with a baud rate, start and stop bits etc.

If it is just sending a series of 1s and 0s then you can "read" that on any of the digital pins if you write a program that checks whether the pin is HIGH or LOW at suitable intervals.

Tell us what is sending the data and preferably provide a link to the datasheet for it.

...R

i need to "read" the data from this: http://www.or-e.co.il/rf-link-receiver-4800bps-434mhz.html it need to send me digital data, by the data i will gat from it i will know if to tern on the buzzer or turn on a led

Have you studied the software that is available on that page you linked to?

Does it not do what you want?

...R