- Wed Jan 07, 2009 3:34 pm
#62942
Hey i'm real sorry to post this on multiple forums and link em, but i wouldn't think this would be a hard question.
http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1231284644
i'm trying to get a simple no error correction serial connection, but my RX pin is high on the receiver arduino.... but it works over wires, so the program is working.
original message:
http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1231284644
i'm trying to get a simple no error correction serial connection, but my RX pin is high on the receiver arduino.... but it works over wires, so the program is working.
original message:
Alright so i'm trying to send some serial data over wireless (yes not using much error correction right now... just doing a checksum)
i have these two wireless modules
http://www.sparkfun.com/commerce/produc ... ts_id=8945
http://www.sparkfun.com/commerce/produc ... ts_id=8948
transmitter is connected to 5v power, gnd, and tx pin.
receiver is connected to power, ground, and rx pin on the client. I'm just simply sending a short serial message over a 1200 baud. If i connect the tx -> rx and gnd of the two arduinos it works fine... so the program is running fine. I can't get anything at all over the wireless though.
When i connect an led to gnd and data pin on the reciever it blinks when i send the message on transmistter (so it's getting data.) Here is where i believe my problem is.. When i then leave the LED on the reciever and connect it to the receiver arduino the LED turns on... (so the RX pin on receiver arduino is high? why?)
here is the transmitter and receiver program
trans:Code: Select allreceiver:int ledPin = 13; void setup() { Serial.begin(1200); Serial.println("setup"); pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); Serial.println("2222"); digitalWrite(ledPin, LOW); delay(1000); }
Code: Select allint ledPin = 13; int inByte = 0; long blinkTimer = 0; int blinkInterval = 1000; void setup() { Serial.begin(1200); // Debugging only Serial.println("setup"); pinMode(ledPin, OUTPUT); } void loop() { if (Serial.available() > 0){ inByte = Serial.read(); Serial.print(inByte,BYTE); } if (millis() - blinkTimer>= blinkInterval/2){ digitalWrite(ledPin,HIGH); } if (millis() - blinkTimer>= blinkInterval){ digitalWrite(ledPin,LOW); blinkTimer = millis(); } }