Coder Social home page Coder Social logo

superthunder / micropython_ir_circuitpython_port Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peterhinch/micropython_ir

0.0 0.0 0.0 292 KB

Nonblocking device drivers to receive from IR remotes and for IR "blaster" apps.

Python 100.00%

micropython_ir_circuitpython_port's Introduction

A "port" of micropython_ir to work with CircuitPython pulseio

CircuitPython does not support setting on your own interrupts or callbacks or even timer interrupts. However, for the common use case of measuring the length of pulses, it does have a library called pulseio.

The decode functions from micropython_ir are not too difficult to convert to work with pulseio, which I have done for the protocol relevant to me (NEC8).

What works

NEC8 decode when used in code.py works: copy the code in nec8_example.py into code.py of your CircuitPython board. At the moment it is the only example since I don't have other forms of remote (although it would probably be possible to simulate other remotes with an IR transmitter).

The global variables in nec8_example were extracted from micropython_ir's class system. It should be possible to make it back into an object that takes the pulseio instance, but the lack of threading / asynchronous events in CircuitPython makes it difficult to truly push processing the commands into the background.

What doesn't work

Currently, any receive protocol other than NEC, and any form of transmit. Each has to be adapted so that callbacks and interrupts are not required.

micropython_ir_circuitpython_port's People

Contributors

peterhinch avatar superthunder avatar

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.