Newbie code check, RF transmit


Could someone knowledgeable check over my code? I am using an RF pair from Sparkfun.

The transmitter is this one: [RF Link Transmitter - 434MHz ](http://RF Link Transmitter - 434MHz)

Here is the code I am using to transmit to another Arduino with the receiver on board.


const int tripBeam=6;//input from an IR trip beam

const int LED=13;//output - LED that conveys status to humans


const byte GO=210;//Send this through serial, which will go wirelessly to another Arduino. Picked pretty much at random.


unsigned long deadTime=5000;//don't bother listening to the trip beam for 5 seconds after it's tripped

void setup(){

	Serial.begin(2400);//2400 baud for the 434 chip

	pinMode(tripBeam, INPUT);

	pinMode(LED, OUTPUT);

	digitalWrite(tripBeam, HIGH);//turn on internal 20k pullup resistor so the open input state is HIGH.

	digitalWrite(LED, LOW);


void loop(){

	//See if the trip beam has been tripped



		digitalWrite(LED, HIGH);


		digitalWrite(LED, LOW);



When I trigger the switch (tripBeam=6), the LED blinks and the serial monitor shows "Ò".

The input is from a separate IR receiver. It has a dip relay, N/O to pin 6, COM to ground.

Any help would be very much appreciated.


So,what's the problem?


Receiver is not receiving. I thought I'd ask to see if there are any glaring errors in the transmitting code first.

Is the "Ò" in the serial monitor what would be expected with successful transmission?


Is the "Ò" in the serial monitor what would be expected with successful transmission?

I don't know; values above 127 are not ASCII, so you'd have to look for the character code 210.

If you're on a PC, you could run "charmap" - yes, 0xd2 is capital O grave.

The problem has been solved. Thanks to those who helped :slight_smile: