Code Monkey home page Code Monkey logo

rc-receiver-interface's Introduction

RC-Receiver-Interface - A library for reading RC receivers

Disclaimer: You should probably do this with Timers and/or DMA, but for a quick solution this works fine...

This library provides a Receiver object from which you can read the input from an RC receiver. There are many sketches around the internet which achieve the same result, but some of them use blocking functions (i.e. pulseIn()) or are just long C files. This library provides an object-oriented receiver interface. As input, PWM and CPPM signals are supported. For the latter, only one pin is needed, but it uses the teensy-specific PulsePosition library.

Supported Devices

This library works fine on the Teensy 3.2 and Teensy LC. Please let me know if you got it working on a different board and feel free to open a PR.

The Arduino Uno is NOT supported for reading 4 channels because it only has 2 pins that can handle interrupts. You can easily adapt the library to just use 2 channels.

Notes on Interrupts

Please ensure that the pins you give the Receiver constructor are interrupt-capable. On the Teensy 3.2, all digital pins can be used.

If your program disables interrupts for long stretches of time, then you will probably notice inaccuracies from this library, since it relies on interrupts for detecting receiver signals.

Example Sketch and Hardware Setup

The example sketch RC-Receiver-Interface.ino sets up the receiver such that you can connect your receiver to pins 8, 9, 10, 11. Channel order is throttle, aileron, elevator, rudder. Make sure you choose the right signal type (ppm, pwm) in the code and your receiver.

rc-receiver-interface's People

Contributors

barafael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

erwincoumans mcx

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.