Converting a joystick to wireless

Converting a joystick to wireless

From the MAKE Flickr pool

Aki modded an old joystick for wireless control using a pair of SparkFun RF link modules for connectivity. Custom boards with ATtiny2313 chips do the rest in code –

The transmitter polls all the buttons and directions all the time and there is a sleep timeout running all the time which is zeroed whenever a change in input state is detected. After roughly 10 seconds the transmitter turns off the power from the transmitter module to save energy and continues polling the inputs. If an input state change is detected the transmitter module is powered on again and the sleep timeout starts running. One datapacket is 4 bytes long (sync + receiver address + data + checksum) and the inputs take 6 bits from the data byte (2 buttons and 4 directions). The receiver checks that the received data is correct and by that it then pulls the right pins to ground.

Source code is available for download here – Wireless TAC-2

Discuss this article with the rest of the community on our Discord server!