Skip to main content

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


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)

Uploaded Source

Built Distribution

irrp-1.0.1-py2.py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page