Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Ruff

CircuitPython driver for use with IR Receivers.

Examples of products to use this library with:

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-irremote

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-irremote

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-irremote

Usage Example

# Circuit Playground Express Demo Code
# Adjust the pulseio 'board.PIN' if using something else
import pulseio
import board
import adafruit_irremote

pulsein = pulseio.PulseIn(board.REMOTEIN, maxlen=120, idle_state=True)
decoder = adafruit_irremote.GenericDecode()


while True:
    pulses = decoder.read_pulses(pulsein)
    print("Heard", len(pulses), "Pulses:", pulses)
    try:
        code = decoder.decode_bits(pulses)
        print("Decoded:", code)
    except adafruit_irremote.IRNECRepeatException:  # unusual short code!
        print("NEC repeat!")
    except adafruit_irremote.IRDecodeException as e:     # failed to decode
        print("Failed to decode: ", e.args)

    print("----------------------------")

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Release files for adafruit-circuitpython-irremote 5.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafruit-circuitpython-irremote 5.0.8
File Size Uploaded
adafruit_circuitpython_irremote-5.0.8.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adafruit-circuitpython-irremote 5.0.8
File Interpreter ABI Platform
adafruit_circuitpython_irremote-5.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 34.2 kB

Release files / adafruit_circuitpython_irremote-5.0.8.tar.gz

Download URL adafruit_circuitpython_irremote-5.0.8.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c46895525e57106651e96f2a812b2f51147f0e05337456acdd028439e8946e6d
BLAKE2b-256 checksum
How to use checksums
f938c94b87356648a0feb617868d90493b05a75fe3e9f8c68e461ffb72e3cfa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / adafruit_circuitpython_irremote-5.0.8-py3-none-any.whl

Download URL adafruit_circuitpython_irremote-5.0.8-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d4a8d0331a93f0e7217bbe8a6963d527581d711ce2f07ae3c89c266fe589d61
BLAKE2b-256 checksum
How to use checksums
7c2f40a26684793b6bf5aa2d4e0efaa2cfe50f0eba9e92f9f7e048becc2b22ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

5.0.8 This release

2 release files

5.0.7

2 release files

5.0.6

2 release files

5.0.5

2 release files

5.0.4

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.19

2 release files

4.1.17

2 release files

4.1.16

2 release files

4.1.15

2 release files

4.1.14

2 release files

4.1.13

2 release files

4.1.12

2 release files

4.1.11

2 release files

4.1.10

2 release files

4.1.9

2 release files

4.1.8

2 release files

4.1.7

2 release files

4.1.6

1 release file

4.1.5

1 release file

4.1.4

1 release file

4.1.3

1 release file

4.1.2

1 release file

4.1.1

1 release file

4.1.0

1 release file

4.0.6

1 release file

4.0.5

1 release file

4.0.4

1 release file

4.0.3

1 release file

4.0.2

1 release file

4.0.1

1 release file

4.0.0

1 release file

3.5.1

1 release file

3.5.0

1 release file

3.4.2

1 release file

3.4.1

1 release file

3.4.0

1 release file

3.3.2

1 release file

3.3.1

1 release file

3.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page