Henglos IO
Built-in packages

IR

Infrared remote control, both ways — Send a remote's code from an IR LED (to a TV, an air conditioner, another board), Receive the codes a remote sends to a receiver module (VS1838B, TSOP38238), and Match one to branch when a given button is pressed — or let a Code Trigger start a branch of its own when it is.

Infrared remote control, both ways — Send a remote's code from an IR LED (to a TV, an air conditioner, another board), Receive the codes a remote sends to a receiver module (VS1838B, TSOP38238), and Match one to branch when a given button is pressed — or let a Code Trigger start a branch of its own when it is. NEC (and extended NEC) and Samsung.

@henglosio/component-irv1.0.0platform ^1.0.0
NodeKindWhat it does
Code TriggerTriggerRuns its branch when a remote's code comes in — any code, or only the one set (Protocol, Address, Command).
SendActionSends a remote's code from an IR LED — once, or as a held button with Repeats.
ReceiveActionWaits for a remote's code and gives its protocol, address and command — Out with it, or Fallback when none came in time.
MatchActionWaits for a remote's code and branches on whether it's the one set — Match, Other (another button), or Timeout.

Triggers

Code Trigger

Runs its branch when a remote's code comes in — any code, or only the one set (Protocol, Address, Command). A button on the remote starting its own part of the flow, whatever else the board is doing.

A trigger: no input, one Out — the first action of its branch.

Settings

SettingTypeDefaultWhat it's for
RX PinPin (digital in)GPIO27Required. Board pin wired to the receiver module's OUT (also called DATA or S).
ProtocolOne of: Any, NEC, SamsungAnyThe protocol it has to be — Any takes either.
AddressText—The device it has to be for, hex or decimal — empty for any.
CommandText—The button it has to be, hex ("0x45") or decimal — empty for any button.
RepeatsOn / offOffAdvanced. Whether a held button's repeats count as codes too (marked repeat) — off, a held button is one press.

Publishes

OutputTypeWhat it is
protocolanyThe code's protocol, as text — nec or samsung.
addressintThe device it's for.
commandintThe button.
codeanyAll of it as text — "nec 0x00 0x45" — what Send and Match take.
repeatboolWhether it's a held button's repeat (with Repeats on).

Actions

Send

Sends a remote's code from an IR LED — once, or as a held button with Repeats.

Settings

SettingTypeDefaultWhat it's for
TX PinPin (digital out)GPIO26Required. Board pin driving the IR LED — through a transistor for range (a pin alone lights it for a meter or so).
ProtocolOne of: NEC, SamsungNECHow the code is sent — NEC is what most remotes use (TV boxes, LED strips, cheap kits); Samsung for Samsung TVs.
AddressText0x00The device the code is for, as Receive shows it — hex ("0x00") or decimal. NEC takes up to 0xFFFF (extended NEC past 0xFF), Samsung up to 0xFF.
CommandText0x45Required. The button, as Receive shows it — hex ("0x45") or decimal, up to 0xFF.
RepeatsNumber (0 to 50)0Frames sent after the code as a held button sends them, ~108 ms apart — 0 to 50. 0 is a single press.
CarrierNumber (30 to 60)38Advanced. The light's blink rate, in kHz — 38 for almost every remote; 36 or 40 for a few. 30 to 60.

Receive

Waits for a remote's code and gives its protocol, address and command — Out with it, or Fallback when none came in time. Point a remote at the receiver and run it to learn a button's code.

Settings

SettingTypeDefaultWhat it's for
RX PinPin (digital in)GPIO27Required. Board pin wired to the receiver module's OUT (also called DATA or S).
TimeoutNumber (10 to 60000)1000How long it waits for a code, in ms — 10 to 60000. The flow waits meanwhile.
RepeatsOn / offOffAdvanced. Whether a held button's repeats count as codes too (marked repeat) — off, a held button is one press.

Publishes

OutputTypeWhat it is
protocolanyThe code's protocol, as text — nec or samsung.
addressintThe device it's for.
commandintThe button.
codeanyAll of it as text — "nec 0x00 0x45" — what Send and Match take.
repeatboolWhether it's a held button's repeat (with Repeats on).

Match

Waits for a remote's code and branches on whether it's the one set — Match, Other (another button), or Timeout. Find the button's code with Receive first.

Ends on Match, Other, Timeout — or Fallback when it can't run.

Settings

SettingTypeDefaultWhat it's for
RX PinPin (digital in)GPIO27Required. Board pin wired to the receiver module's OUT (also called DATA or S).
ProtocolOne of: Any, NEC, SamsungAnyThe protocol it has to be — Any takes either.
AddressText—The device it has to be for, hex or decimal — empty for any.
CommandText0x45Required. The button, as Receive shows it — hex ("0x45") or decimal, up to 0xFF.
TimeoutNumber (10 to 60000)1000How long it waits for a code, in ms — 10 to 60000. The flow waits meanwhile.
RepeatsOn / offOffAdvanced. Whether a held button's repeats count as codes too (marked repeat) — off, a held button is one press.

Publishes

OutputTypeWhat it is
protocolanyThe code's protocol, as text — nec or samsung.
addressintThe device it's for.
commandintThe button.
codeanyAll of it as text — "nec 0x00 0x45" — what Send and Match take.
repeatboolWhether it's a held button's repeat (with Repeats on).

On this page