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 hashes)