SO, I've started a small project that uses RF (@434 Mhz) to transmit a small amount of data (1 byte), and it doesn't seem to be sending the correct data.
byte toSend; // this is what will be sent: sample code = simple name
byte sent; // the sent by
void setup(){
//2400 baud for the 434 model
Serial.begin(2400);
toSend = 00000011;// initializing the variables...
sent = 00000000;
}
void loop(){
Serial.println (toSend);// sending the first byte
sent = Serial.read(); //reads the incoming byte
Serial.println (sent); //displays incoming byte
delay(5000);
}
After the program uploads, I reconnect Rx and Tx, and open the COM viewer.
it just prints out (repeatedly):
9
255
That's all it prints out, shouldn't it print:
3
3
?
Could someone help me with this?