Sending a info through RF Transmitter help
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?
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
http://forums.parallax.com/showthread.php?p=521304
regards peter