Pages: [1]   Go Down
Author Topic: Basic high/low signals using RF modules  (Read 397 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have receiver (http://www.sparkfun.com/commerce/product_info.php?products_id=8948) and transmitter(http://www.sparkfun.com/commerce/product_info.php?products_id=8945) and I just want to send a high/low signal from the tansmitter to receiver. The receiver is connected to an led and the transmitter to my arduino.I just want the led to turn off and on but it just keeps flickering.any advice?Here is my code.
Code:
int pin3=3;

void setup()
{
Serial.begin(9600);
pinMode(pin3,OUTPUT);
}
void loop()
{
digitalWrite(pin3,HIGH);
delay(1000);
digitalWrite(pin3,LOW);
delay(1000);
}
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this the code for the sender or the receiver? How do you have the transmitter and receiver connected on the two Arduinos?

The input side of the transmitter needs to be connected to the TX pin, if using hardware serial, or the tx pin if using NewSoftSerial.

The output side of the receiver needs to be connected to the RX pin, if using hardware serial, or the rx pin if using NewSoftSerial.

The data to be transmitted is sent using Serial.print, and receive using Serial.read (or the NewSoftSerial instance).
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These transmitters and receivers can't handle a steady logic level. The bandwidth doesn't go down to DC.
You need to transmit serial data through them.
Logged

Pages: [1]   Go Up
Jump to: