Skip to main content

Send and receive IR commands using pigpio

Project description

ircodec

A Python package that simplifies sending and receiving IR signals for the Raspberry Pi using pigpiod.

Requirements

pip install pigpio

Install

pip install ircodec

Quickstart

# Create a CommandSet for your remote control
# GPIO for the IR receiver: 23
# GPIO for the IR transmitter: 22
from ircodec.command import CommandSet
controller = CommandSet(emitter_gpio=22, receiver_gpio=23, description='TV remote')

# Add the volume up key
controller.add('volume_up')
# Connected to pigpio
# Detecting IR command...
# Received.

# Send the volume up command
controller.emit('volume_up')

# Remove the volume up command
controller.remove('volume_up')

# Examine the contents of the CommandSet
controller
# CommandSet(emitter=22, receiver=23, description="TV remote")
# {}

# Save to JSON
controller.save_as('tv.json')

# Load from JSON
new_controller = CommandSet.load('another_tv.json')

Acknowledgment

pigpio Python examples

Contact

kentkawashima@gmail.com

License: MIT License

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

ircodec-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ircodec-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file ircodec-0.2.0.tar.gz.

File metadata

  • Download URL: ircodec-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.6

File hashes

Hashes for ircodec-0.2.0.tar.gz
Algorithm Hash digest
SHA256 11a07bc62009bf46337adf40026de510859205a90a7de82d4f390a88741b9c34
MD5 6e77cdaf02093bb33a6b3459649714b5
BLAKE2b-256 20ff7448c81d883318b67573c4ccff8581a4a62a95786eaed0c1d842385545ec

See more details on using hashes here.

File details

Details for the file ircodec-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ircodec-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8

File hashes

Hashes for ircodec-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 325a049a72db13773b0bb9701e0d6aa54592a642a2771bf3b9ea86667b17a37d
MD5 f9180429b8c0332c28774a403da722be
BLAKE2b-256 901faccbdcdcefa947bbb3a4717f3577aa6009eb215b5e2c5c0d6fe43f8ba544

See more details on using hashes here.

Supported by

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