bolderflight / sbus

Arduino and CMake library for communicating with SBUS receivers and servos.
MIT License
374 stars 132 forks source link

Sending SBUS packets on mega 2560 doesn't seem to work. #15

Closed ErcBunny closed 5 years ago

ErcBunny commented 5 years ago

I connected the TX pin of Serial1 to the base of transistor and the SBUS RX pin of my flight controller to the collector. And I tried to send SBUS packets to the FC by using the example sketch, which didn't work.

I tried to read the source code the "write" function and wrote the sketch below.

sketch_apr12a.zip

It did make a difference on the receiver setup page (apm, mission planner). I noticed that the value of each channel did change correspondingly when the value was changed in my sketch. Sadly I could never sent the desired values. I took note of what I wanted to send and the results.

900-1444 1000-1506 1024-1521 2000-2100 2046-2100 994-1502 1500-1818

And when I was using the F4 flight controller, it didn't seem to receive anything...

daz commented 5 years ago

Fixed in https://github.com/bolderflight/SBUS/pull/16