irrp.py as a python module
Project description
irrp
Basically irrp.py but as a python module so you can integrate it easily with your Python program.
Examples
To record:
import pigpio
pi = pigpio.pi()
gpio_pin = 18
# Record the IR data
import irrp
rr = irrp.RecordReplayer(pi)
print(rr.record(gpio_pin))
# optionally, save to a file:
import json
json.dump(open("data.json", "wb"))
To replay:
import pigpio
pi = pigpio.pi()
gpio_pin = 18
# load the recorded data
import json
data = json(load(open("data.json")))
# replay the data
import irrp
rr = irrp.RecordReplayer(pi)
rr.replay(gpio_pin, data)
To record and compare data:
import pigpio
pi = pigpio.pi()
gpio_pin = 18
# record data
import irrp
rr = irrp.RecordReplayer(pi)
rec = rr.record(gpio_pin)
import json
data = json(load(open("data.json")))
irrp.compare(data, rec)
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
irrp-1.0.1.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file irrp-1.0.1.tar.gz
.
File metadata
- Download URL: irrp-1.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ada24df3d580261b1b68f4c15d8a5eeed491c1064d6ebf036dd2c9302e2f3060
|
|
MD5 |
d036580a29c73d371066178e96c1a4e7
|
|
BLAKE2b-256 |
6c89834ef2c075bc8a9bfff44cb3e9570ec42d6d11496e2aebbc08e1783a612e
|
File details
Details for the file irrp-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: irrp-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ad100900056a7be36b1b1e84369db05dc2525f850ca3fcbe06084934db2bd39c
|
|
MD5 |
f8af0f9320426eeeb16e17ef8d052f96
|
|
BLAKE2b-256 |
c6a5629d2960057477bc2d105cc185b70ba27fcc68c4904fc9144af8fbad2c5a
|