This commit is contained in:
Tomas Krejci 2024-05-16 19:49:26 +02:00
parent a2d591e2a0
commit 4f0d983b55
5 changed files with 10 additions and 37 deletions

View File

@ -1,25 +1,10 @@
# ir_rx __init__.py Decoder for IR remote control using synchronous code
# IR_RX abstract base class for IR receivers.
# Author: Peter Hinch
# Copyright Peter Hinch 2020-2024 Released under the MIT license
# Thanks are due to @Pax-IT for diagnosing a problem with ESP32C3.
# IR_RX abstract base class for OpenLaserTag IR receiver.
# Tomas Krejci [Njord]
from machine import Timer, Pin
from array import array
from utime import ticks_us
# from micropython import alloc_emergency_exception_buf
# alloc_emergency_exception_buf(100)
# On 1st edge start a block timer. While the timer is running, record the time
# of each edge. When the timer times out decode the data. Duration must exceed
# the worst case block transmission time, but be less than the interval between
# a block start and a repeat code start (~108ms depending on protocol)
class IR_RX:
Timer_id = -1 # Software timer but enable override
# Result/error codes

View File

@ -1,9 +1,5 @@
# acquire.py Acquire a pulse train from an IR remote
# Supports NEC protocol.
# For a remote using NEC see https://www.adafruit.com/products/389
# Author: Peter Hinch
# Copyright Peter Hinch 2020 Released under the MIT license
# Acquire a pulse from OpenLaserTag IR remote
# Tomas Krejci [Njord]
from machine import Pin, freq
from sys import platform

View File

@ -1,8 +1,5 @@
# sony.py Decoder for IR remote control using synchronous code
# Sony SIRC protocol.
# Author: Peter Hinch
# Copyright Peter Hinch 2020 Released under the MIT license
# Decoder for IR remote OpenLaserTag (Sony SIRC) protocol .
# Tomas Krejci [Njord]
from utime import ticks_us, ticks_diff
from olt_lib.ir_rx import IR_RX

View File

@ -1,7 +1,5 @@
# print_error.py Error print for IR receiver
# Author: Peter Hinch
# Copyright Peter Hinch 2020 Released under the MIT license
# Error print for OpenLaserTag IR receiver
# Tomas Krejci [Njord]
from olt_lib.ir_rx import IR_RX

View File

@ -1,8 +1,5 @@
# test.py Test program for IR remote control decoder
# Supports Pyboard, ESP32 and ESP8266
# Author: Peter Hinch
# Copyright Peter Hinch 2020-2022 Released under the MIT license
## test.py Test program for OpenLaserTag IR remote control decoder
## Tomas Krejci [Njord]
# Run this to characterise a remote.
import ustruct