Once again I want to communicate the RF module with each other by printing the data received by receiver which transmitted by transmitter into the serial monitor to observe the outcomes.
I did test this code, but there was nothing print.
#include <NewSoftSerial.h>
int ledPin = 13;
int potPin1 = 0;
int potPin2 = 1;
int val1 = 0;
int val2 = 0;
NewSoftSerial RFSerial(2, 3);
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(4800);
RFSerial.begin(4800);
}
void loop() {
val1 = analogRead(potPin1);
val1 = map(val1, 0, 1023, 0, 255);
delay(100);
RFSerial.print(val1);
val2 =analogRead(potPin2);
val2 = map(val2, 0, 1023, 0, 255);
RFSerial.print(val2);
delay(1);
if (RFSerial.available()) {
Serial.println((char)RFSerial.read());
}
}
so, please I advise.
I want to send one axis signal only.
How????
Cheers..