Thanks for your help!!
I think I have a problem with transmitter or receiver - dont know.
If I direktly connect PIN 0 and PIN 1 everything works great. Butt if I replace TX with the transmitter module and RX with the receiver module nothing happens nothing happens. SOmetimes receiver gets any values. How do I best debug this problem?
As said, I'm using the www.conrad.at module --> Article-Nr.: 130428 - 62
This is the code I have - I attached RX and TX module on one arduino board:
int send = 52;
int income = 0;
int receiveLED = 12;
void setup() {
pinMode(receiveLED, OUTPUT);
Serial.begin(9600);
}
void loop(){
income = 0;
//transmitt
delay(700);
Serial.print(send, BYTE);
//receive
if (Serial.available() > 0) {
income = Serial.read();
//Serial.print("receive:");
//Serial.println(income);
if (income == 52){
for (int i=0; i < 3; i++){
digitalWrite(receiveLED, HIGH); // sets the LED on
delay(300); // waits
digitalWrite(receiveLED, LOW); // sets the LED off
delay(300);
}
}
}
}
Thanks for helping me!!
fj