Go Down

Topic: Using RX and TX pins. (Read 510 times) previous topic - next topic


Oct 21, 2008, 06:32 am Last Edit: Oct 21, 2008, 06:36 am by Poohshoes Reason: 1
I have a mosaur transmitter reveiver pair and one arduino decillima for each.

I have been trying to get my transmitter-receiver pair working for a while and was having problems uploading sketches to my receiver board (some avrdude error).  I then relaized that if I remove the pin going into RX the board starts working (though not receiving signals).  So A little searching later and I found that adding a 10K resistor to the input into RX stops the board from stopping working.

Does this also stop the board from receiving signals?  Should the sending board also have a resistor somewhere?

Heres the code on my receiving board:
Code: [Select]

void setup() {

 // for a motor
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);
 //I am running a motor though an H-bridge, this starts the motor turning
 digitalWrite(2,  LOW);
 digitalWrite(3,  HIGH);

void loop() {
 //if we receive any signal
 if(Serial.available() > 0)
   //consume the serial input so there is no more available
   //stop the motor for one second
   digitalWrite(2,  HIGH);
   digitalWrite(2,  LOW);

With the above code the motor will run IF the RX wire is not connected or there is a 10K resistor on it.

And the code on my transmitting board:
Code: [Select]

void setup() {

void loop() {

I'm not sure if the above transmitter code is working, I am not sure how to debug it and have made it as simple as possible.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131