[][src]Crate pi_ir_remote

Structs

IRPulseReader

A struct that allows to detect IR pulses and signals by polling the state of an IR sensor periodically, calculating pulse lengths and decoding pulse sequences into signals.

PrintSignalHandler

The PrintSignalHandler is a basic handler that prints every signal that is received.

Enums

Pulse

The different types of pulses. These refer only to the "on" pulse, the "off" pulses are always the same duration. The main pulse types are "Short" and "Long" (around 500µs and 1500µs), which are used to transmit binary encoded button IDs.

Signal

The different buttons on the remote, plus an "Unrecognized" signal.

Traits

SignalHandler

A signal handler provides a method to process a received signal.

Functions

read_ir_remote

Given a pin to read on and a handler for signal, this function polls the pin to receive IR pulses which are decoded into signals and then passed to the handler, when they occurr. This is running in a dedicated thread.