hello fellow hackers
I have a problem I am trying to send radio data across 2 radio links.The connection is fine. Only thing is that i want the receiving end of the code to compare the signal thats coming in with the signal that was sent out.
I want to know how much the signals accuracy was affected by covering the radio links with different thing. I'm sending out abc...z(this could be any thing)then the receiving end might get some anomoles (like "abd...z")because of signal blocking.heres are the code i am using right now.
#include <SoftwareSerial.h>
//Radio receiver
#define rxPin 2
#define txPin 3
byte incomingByte = 0;
SoftwareSerial rfSerial = SoftwareSerial(rxPin, txPin);
void setup() {
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
rfSerial.begin(2400);
Serial.begin(2400);
}
void loop() {
incomingByte = rfSerial.read();
Serial.println(incomingByte, DEC);
incomingByte = 0;
delay (500);
}
#include <SoftwareSerial.h>
//Radio Transmitter
#define rxPin 2
#define txPin 3
SoftwareSerial rfSerial = SoftwareSerial(rxPin, txPin);
byte outgoingByte = 0;
void setup() {
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
rfSerial.begin(2400);
Serial.begin(2400);
}
void loop() {
Serial.println(outgoingByte, DEC);
rfSerial.println(outgoingByte, BYTE);
outgoingByte++; //add 1 each time it loops untill it hits 255
delay(10);
}