Simple example for using a switch in a sketch

I’ve created a simple sketch where a switch determines what the lights do. (Just indicators, police lights or throttle lights).
On the Taranis I’ve just assigned a switch to channel 5 (that is nr 4 in the array).

Download MultiModeLights sketch here.

This is just one of the ways to do it. The switching is not immediate because each function finishes it’s cycle before the state of the switch is checked, but I don’t think that is a problem.

Yeelight dissection

I’ve bought a Mi Yeelight Model YLDP01YL
It worked fine with the app but it would only be useful to me if I could integrate it into my home automation system. I’ve contacted Mi Europa, but they didn’t have an API or anything for me.

So I just dissected the thing. I was kinda hoping to find an ESP2866 in there but sadly that was not the case. The main chip is a Marvell 88MW300-NAP2.

@Mi Yeelight : If you ever release an API/Document that enables me to create a program to turn the light on/off I will definitely buy some more.

X4R Inverter Hack

I wanted to connect my Mini Naze32 using S-BUS to my FrSky receiver. But I didn’t want to bother with an inverter and such. Then I found this site.

So I upgraded my X4R-SB with an non-inverted SBUS out. I read somewhere (src unknown) that you could use one of the nice pads next to the inverter on the board. That makes soldering a lot easier.
(I did add a current limiter resistor in there after this picture was taken just to be safe)

IMG_1391

And I ended up with a nice compact flight controller package:

IMG_1392

Upgrade 8 channel receiver to 32 channel

After I received my Nano QX FPV I just couldn’t wait for the receiver I’ve already ordered. I knew my current 8 channel receiver wasn’t compatible with the immersion RC VTX.

But just to be sure it couldn’t be changed easily I opened up the RC701 8 Channel diversity receiver/monitor.
The actual receiver chip is an RTC6715. After reading the datasheet I found out it does support other bands, but those don’t included the frequencies I needed. So no quick fix there.
But the receiver chip also has an SPI interface. So I started to search and found some others that already figured out the SPI protocol and created an Arduino sketch.
info Info

First thing I needed to do was to enable the SPI mode. For this to happen I had to remove the pulldown from pin 7.
IMG_1398
That’s some tiny traces. I had to use a magnifier to do that.

Then I had to put in an Arduino and disconnect the SPI pins from the dip switches and connect them to the arduino. Because the receiver is an 3V3 module I’ve used an 3V3 Arduino Pro.

IMG_1401

I started on the right receiver module. The pins from left to right are MOSI (aka data in) ChipSelect (aka SS) Clock (aka SCLK). These connect to the Arduino pins 11,10 and 13.

Because this SPI bus is write only, I’ve hooked up the receiver on the left to the same pins. (don’t forget to disconnect from the dip switches)

Now just find 5V somewhere on the board for power, connect ground and connect a button (I used pin 3). The header is placed so I can connect an FTDI through the hole used for the dip switches when the case is closed.

IMG_1402

The RSSI pin from the receiver is hooked up to A0. When I long-press the button it does a full scan and then tunes to the strongest signal.

Now I just need to learn how to fly FPV 🙂

RX5808_SPI_Frequenz_32CHArduino_autoscan_v1

Git on Synology

Finally got around to setting up my first Git repo on the Synology.

Some hints for future reference:

Repository creation:
Create folder /Volumex/main/project
cd project
git init –bare –shared
git config core.sharedRepository group
cd ..
chmod a+rwx -R project

On client:
git remote add origin ssh://user@diskstationip/volumex/main/project
git push -u origin master