In this webpage we explain how we connected an X4R to an Arduino and a processing.org sketch as part of PoC to intereface our 360 degree IR proximity sensor to an UAV, Drone, Quadcopter.
Using the CC3D flight controller in our project we didn't have a Buzzer output on the controller so we was thinking how we could get the buzzer to be controlled from the CH9 and 10 on the X4R, but also leaving some other control available. We played around with a PIC12F629 to see if we could get some additional programmable logic by reading both the PWM channels 9&10 with some logic .
We could have done this directly with the Arduino reading the S.BUS, but for fun we wanted to see what we could do with a very small microcontroller.
Example of how we programmed the PIC 12F629
We saw that by combining the logic of both channel 9 & 19 we could still run 1 serovs proportionally ; as though it was directly connected to the XR4 - but we also got additional "virtual channels" by reading the channel 9 switch position. We mapped this to a 3-way switch. but if channel 10 were mapped to the slider on the Taranis, then this could be proportional to the position of the slider. Using the offset on the Taranis and mapping another slider and switch to Ch9 we were actually able to get 2 servos working with reduced travel.
I'm using the PROTON IDE and BASIC compiler from Crownhill Associates Ltd.
This PIC is very small and the SMD version is even much smaller. The main driver for using this chip is that it doesn't require any further components to drive it, so it could fit within the shrink sleeve of the cable connected to the X4R. If we ever make one we'll publish it here.