flyandi / BitsyLED

A simple LED driver for Remote Control Cars, Planes, Multicopters and everything in between
http://flyandi.net/code/bitsyled
33 stars 4 forks source link

Proposal: Support for SBus #1

Closed DerElch87 closed 5 years ago

DerElch87 commented 5 years ago

Hi flyandi,

First of all: Thumbs up, really a nice a good project.

When thinking about to build one for my Funcub, I realised that I need all 8 PWM outputs on my FrSky X8R receiver (6 servos, 1 ESC and 1 buzzer). So I don't have the possiblity to change the pattern etc. by my own.

My original idea was: I could bring in the lights for nice optical view and also use them as a battery warner as soon as the battery gets low. In this case I thought about sending a value on a channel back from the transmitter (which receives the battery voltage via telemetry) to change the color and blinking pattern of all lights.

While thinking about what to do, I came up with the idea of SBus support. It is unused right now und could support up to 16 channels. OpenXSensor for example also has SBus support.

As my coding skills are somewhere between nothing and really low, I thought I could ask kindly if you also have interest of implementing SBus to BitsyLED.

Best regards from germany and keep on the good work.

flyandi commented 5 years ago

Interesting .. I gotta see how big SBUS is because I don't have a lot of room .. but the current 1.2.1 board has also two unused pins left .. so technically I could monitor two more devices. Let me investigate .. that would be neat integration.

DerElch87 commented 5 years ago

While doing some research, I found an interesting topic here: https://openrcforums.com/forum/viewtopic.php?t=4539 The SBus decoder which is used there doesn't need an external inverter - which is great for this purpose. Theoretical mstrens wrote that the reaction time could be a litte slower compared to a hardware inverter - but he couldn't see a difference with servos. For our usecase here, a little delay would be also no problem. Eventually the link helps. BR

flyandi commented 5 years ago

So I did some reading into this - however I have no means to test it and it looks like it needs another serial buffer in order to work. That would only work for the Arduino and not the BitsyLED boards due to not enough RAM. If you want I am happy to accept an MR if you want to play around with it.