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
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:
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);
}
receiver:
int 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();
}
}