Menu
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • View Cart

Infrared remote hardware block

The Interstacks Infrared Remote hardware block can receive and transmit infrared remote control codes. There are no infrared remote control standards. This means that the number of key codes numbers in the many thousands. Each device to be controlled from an infrared remote control uses its own unique codes. The “Key Code” output terminal sends a five byte binary array when its receiver detects an infrared command. A typical message might be: Binary(‘\x0c\xe0\xe0\xfe\xf5’). These are five (hexadecimal) binary bytes. By sending a similar five byte binary array to the “Character In” terminal, the Infrared Remote block will transmit the key code.

The Infrared Remote block has a built-in infrared receiver and transmitter behind the block’s front label, in addition to connectors on its back for two external infrared transmitters and one external infrared receiver.

A typical Python script inside a software block to examine the five byte binary key codes might be:

x = message  # message from infrared remote Key Code output terminal
if (x[0]==‘\x0c’) and (x[1]==‘\xe0) and (x[2]==‘\xe0’): # match first 3 bytes of key code
  if (x[3]==‘\x88’):
     I.sendmessage(2, ‘0’)
  if (x[3]==‘\x60’):
     I.sendmessage(2, ‘1’)

Connectors on back

Looking into back:

Note that the Infrared Remote block also has a built-in infrared receiver and transmitter behind the front label.

Block properties and terminals

Properties
Type (uuid): Module Type
Version (int): Firmware Version

Power (int): External transmit power. 0 low power 1 high power. Default low power. Do not use high power with small, external IR LEDs.

Terminals
“Properties” – in (List or Property Name string): To set property. Send property name, Value. For example [’N’,’netname’]. To get property, just send property name. For example. ’N’
“PResponse” – out (List or True) : On set, responds with True when done. On get, responds with list. For example [’N’, ‘netname’].

“Character Out” – out (String): One char string of interpreted IR code.
“Character In” – in (String or Binary Array): Transmit IR code for character. or Binary array. Transmit keycode. Will often be 5 byte key code.
“Key Code” – out (Binary array): Received keycode. This will often be 5 bytes but could be a several hundred byte raw run length encoded edge time sequence.

Refer to documentation on many other topics at interstacks.com/knowledge-base.
Please email info@interstacks.com with any questions.

Popular Articles

  • MyStacks Cloud Dashboard
  • Internet communication with HTTP block
  • Download and install Stackbuilder

Contact Us

Contact us with any questions or help with deploying your IoT projects.

CONTACT US

Connect

  • Facebook
  • Twitter
  • LinkedIn
  • Email

Sign up for the latest Interstacks news.

Join Our Newsletter
  Thank you for Signing Up
  Please correct the marked field(s) below.
1,false,1,First Name,2
Email:
1,true,6,Subscriber Email,2
Name:
1,false,1,Last Name,2

Copyright © 2023 Interstacks. All rights reserved. Privacy Policy | Terms and Conditions

Site by Imagebox