I want to establish simple wireless communications between a Leonardo board and PC. I'm keeping things basic initially and using simplex, i.e. one way communication. The sketch running on the Arduino is a basic command interpreter which I have written to understand commands such as dout 9 1 (set digital output 9 high). I have an accompanying GUI terminal program written in VB which allows me to click on buttons on screen to set inputs high and low. Alternatively I can type commands in a text window which are transmitted to the Arduino. Everything works fine over a USB serial link. For my experiments I am using an inexpensive transmitter and receiver pair - a 315 Mhz wireless transmitter at the PC end and a corresponding 315 Mhz receiver module at the receiver end. See link:
These work fine when used for controlling a servo because a continuous PWM signal is transmitted and received. However when no data is being transmitted, the data output of the receiver changes randomly resulting in random characters being read from the serial port. When I transmit a command multiple times (> 3 times), it sort of works. Presumably I would have to implement data packeting and adding a checksum or use a CRC system for error checking so that the validity of received data can be checked. This would mean that at least a half duplex link would be needed so that the receiver could acknowledge/not acknowledge receipt of data. What libraries are available to do this or would it be better to go down the road of using XBee modules for comms?