How Transmitter Works:
Joystick -> Linux OS -> ardjoy Program -> Arduino 1 with TX code -> Transmits Joystick Info
How Receiver Works:
Receives Joystick Info -> Arduino 2 with RX code -> Controls Plane Servos and ESC
What you need:- 2 Arduino's
- 2 nRF24L01 2.4Ghz RF devices
- IDE cable (optional, to connect nRF24L01 to Arduino)
- Linux OS with joystick support
- USB/Serial Joystick that works with Linux
Downloading and Compiling Code
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/thomas41546/rc_plane_arduino_joystick.git
make
NOTE: the ardjoy code may need to be modified for joystick other than a ps2 controller.
Connect each nRF24L01 to each Arduino
Here is a goodlink to help you do that:
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
Upload Arduino Code (Arduino Sketch files are found in the git repository above)
- Install NRF arduino libraries (https://github.com/thomas41546/RF24.git)
- Upload sketch ardJoyRX.ino on Arduino 1
- Upload sketch ardJoyTX.ino on Arduino 2
Setting up the transmitter
- Connect Joystick to Linux OS
- Verify that you have a /dev/input/js0 joystick device file
- Connect the Arduino 1 to the Linux OS
- Verify that you have a /dev/ttyUSB0 arduino device file
- Run the following command "./ardjoy /dev/input/js0 /dev/ttyUSB0 115200"
- Your Arduino should now be transmitting joystick information
Setting up the receiver (TODO, THIS IS INCOMPLETE)
- Connect the Arduino 2 to the RC plane
- Power the Arduino 2
- You should now have the servo and ESC move in response to joystick inputs.