Python 3 module for receiving IR remote control signals (NEC format) on a Raspberry Pi using a TSOP382 IR Receiver
Project description
JoyIT_IR_Remote_Receiver
[!NOTE] This library was forked to make it installable and making it compatible with the Raspberry Pi 5. Therefore 'RPi.GPIO' is exchanged with 'gpiozero'.
Installation
pip install JoyIT_IR_Remote_Receiver
Python 3 module for receiving IR remote control signals (NEC format) on a Raspberry Pi using a TSOP382 IR Receiver
This module includes one example file. For my testing I used several remotes from around my house, the example file includes the codes for the Sparkfun 9 button remote.
Connection
The TSOP382 IR receiver has 3 legs which are connected as follows:
- 1 - PI GPIO - Pin 16 is used in the example
- 2 - Pi Gnd
- 3 - Pi 3.3V
Usage
To set up a IR object use:
ir = IRModule.IRRemote(callback=yourfunctname)
To set up the Pi GPIO callback the following is required
IR = DigitalInputDevice(pin = irPin, bounce_time = 0.000005) # irPin = Pi pin connected to the output of the TSOP382 receiver
IR.when_activated =ir.pWidth
IR.when_deactivated =ir.pWidth
To setup your program to provide the IR code being sent use the following
ir.set_callback('DECODE')
To get a listing of the time spans of the IR pulse highs and lows use
ir.set_verbose(True)
Current user functions include:
set_callback(callback = yourfunctname)
remove_callback()
set_verbose(verbose = False)
set_repeat(repeat = True)
Updates
Apr 3, 2020 Update
- added repeat code recognition functionality
- added the set_repeat() function to enable/disable the repeat code functionality Noc 25, 2025 Update
- exchanged 'RPi.GPIO' with 'gpiozero' to ensure compatibility with Raspberry Pi 5
- made library installable Mar 2, 2026 Update
- added repository to PyPi
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file joyit_ir_remote_receiver-1.0.0.tar.gz.
File metadata
- Download URL: joyit_ir_remote_receiver-1.0.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5370a22a0ede498d25f19a4848be776c0498a36dbfb1332c57a0aa4ee1d88c95
|
|
| MD5 |
ce3f85ec47e2450fe9a7c1cf97a6e9cc
|
|
| BLAKE2b-256 |
c9a66befcda2c0e70c2c75e9401ec3c575df2df84e1de49981d950f64bcf3d81
|
File details
Details for the file joyit_ir_remote_receiver-1.0.0-py3-none-any.whl.
File metadata
- Download URL: joyit_ir_remote_receiver-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9824d4720bf5e42471c746dc0351fb48e32d8c7a7dd427fccfdc134b7b2e2ed8
|
|
| MD5 |
a63181c129648434908e3aa25df05cfd
|
|
| BLAKE2b-256 |
b0aa4678eac6e6c109e8e8c3c5c933b6bf6680f1082a35e789f9870a1c8aae5e
|