ARDUINO 433MHz SERVO AND VIRTUALWIRE

- Hi. the Servo Library is using the same Timer as the VirtualWire Library does, so using Servos with RemoteControlled Arduinos is not as simple as it should be.
As it took me a week of researching and testing scripts, i wanna share the output, so you can speed things up by starting with this Instructable
- My approach in this Instructable is to use a third Arduino that sends the information it got from the 433Mhz Receiver via the "normal" Wire library to the Arduino that controls the Servos.
- Beside the Timer Issue, i also make some room on the Arduino that drives the servos for some scripts/combination of servo signals like V-Tails (airplanes) without getting issues with receiving and decoding signals from the remote.
- I personally use this to control a 1:24 MAN TGA StreetSweeper, to slow servos down, couple it to other functions, like simulated gear shifts etc, which is not possible on common model RX/TX combos.

Step 1: ARDUINO to 433 TX :



- I use an Arduino UNO here, as my prefered Arduino (Feather M0) cant use the virtualwire at all, which is sad to begin with :)
- As you can see on the Image, wiring is pretty straight forward:
It uses a pot on analog IN to generate the values to transmit
It sends this values to the 433MHz module.
- On the code side, it takes the value(s) it gets from the pot and writes it in an array.
It then sends the array to the Rx where it gets transformed back to the original values.
 code ➧➧➧➧➧➧➧  here 

Step 2: 433 RX to ARDUINO to I2C :


- the receiver side is a bit more complicated then on the transmitter side:
*The 433Mhz module gets power from the arduino micro, and sends its signal to the micro via the micros PIN 11. The Micro itself sets up an I2C line via PIN 2 (SDA) and PIN 3 (SCL) and sends the values it gets to the Featherboard.
*In the attached script, it only sends the first value and keeps the other three, from the three remaining POTs, as i just needed the first value.
*If you need them all, just send them all.
+See the next step for I2C to Servo :
Code ➧➧➧➧➧➧➧  here 

Step 3: I2C ARDUINO to SERVO :


- In the last script, we take values that came via I2C and set the servo according.
See the script for more details.

Code RECEIVER_to_SERVO_from_I2C
HERE


EmoticonEmoticon