Code Monkey home page Code Monkey logo

spektrum's Introduction

spektrum

Dennis Evangelista

This library provides mbed support for Spektrum serial receivers. So far, the library has been tested on a Spektrum SPM9745 DSMX remote receiver (since v1.0.0), and will probably be tested on a SPM9645 in the near future.

Obtaining the library

Source code is revision controlled using Git and hosted in a Github repository.

git clone ssh://[email protected]/devangel77b/Spektrum.git
git pull

The dev branch is bleeding edge; master branch is reasonably up to date.

Using the library

The main part of the library are two classes for Spektrum (receiver) and BindPlug, which allows binding a transmitter to the receiver. In addition, a convenience macro for converting 0-2048 values to PwmOut pulsewidths (600-2100us, centered at 900us) is provided (SPEKTRUM_COUNT2US()).

Note on servo position (0-2048) and pwm pulse width

The specification for Spektrum Remote Receiver Interfacing, rev A, 12 Apr 2016, has a note about servo position ranges:

A full range of servo position data ranges from 0-1024 or 0-2045 depending on the bind type. These limits are equivalent to a +/-150% travel setting in AirWare. This full range translates to a range of 1194us which when applied to a pwm servo signal equals 903-2097us. At +/-100% travel, the data range is equivalent to a servo position data range of approximately 341 to 1707 which translated to pwm equals 1102 us to 1898 us.

Contributors

D Evangelista

Acknowledgements and references

  1. The code is based on an earlier Spektrum code by M Nentwig, [https://os.mbed.com/users/offroad/code/spektRx/], however, that code appears to have used an earlier version of Spektrum standard that appears no longer to cover the serial Satellite and DSMX quad race receivers.

  2. "Spektrum Remote Receiver Interfacing", rev A, dtd 12 Apr 2016 [https://www.spektrumrc.com/ProdInfo/Files/Remote%20Receiver%20Interfacing%20Rev%20A.pdf], however, there are some slight differences between what is described there and what was observed when probing a SPM9745 DSMX remote receiver.

spektrum's People

Contributors

devangel77b avatar

Stargazers

 avatar

Watchers

 avatar  avatar

spektrum's Issues

Add sailbot passthru example test

This just does rudder and sheet. It will probably look a lot like the aircraft passthru test and is needed to support Marino and Robinson Fa2018 efforts.

Limited support for external DSMX modes

Unless we have reason to directly talk to a satellite with an additional Spektrum receiver as internal mode master, don't really see a need to implement this.

Packets garbled

The first byte (system) and second byte (fades) appear to be received, and it gets bytes but they are garbled. There appear to be issues with 125000 baud dropping bytes; it does better at 115200 but still drops bytes. Also beware if using printf() to debug at normal baud rates this breaks the serial transmissions.

Add non blocking wait in spektrum receiver callback thread?

The callback has a while loop that will be continually running but once a packet is received we don't expect another for 11 or 22 ms... could add a non-blocking wait here ThisThread::sleep_for or similar to allow mbed to do other stuff while waiting?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.