Shop OBEX P1 Docs P2 Docs Learn Events
Sending a info through RF Transmitter help — Parallax Forums

Sending a info through RF Transmitter help

Twilight_AngelTwilight_Angel Posts: 11
edited 2009-05-09 14:36 in General Discussion
I am using this program to send a String or a number:
import stamp.core.*;

public class RFmoduleTx {
static Uart txUart = new Uart (Uart.dirTransmit, CPU.pin8, Uart.invert,
Uart.speed9600, Uart.stop1);

static String x = "0";

public static void main()
{

CPU.pulseOut(800, CPU.pin8); //Sync pulse to help Rx after periods of no communication.
txUart.sendString("!"); //Start char that Rx will look for
txUart.sendString(x); //Sending 2 words: high byte, low byte
//txUart.sendByte(y);
CPU.delay(25); //help set spacing

} //end main
} //end class

The only problem is that it will keep sending x and some random numbers. How do I make it send it only once?

Comments

Sign In or Register to comment.