Skip to main content

Crate libsparkypi

Crate libsparkypi 

Source
Expand description

Generate and transmit radio signals that can be used to control mains socket switches, doorbells and similar radio controlled devices.

Modules§

builder
Construct a radio transmission struct with calls to a builder helper.

Structs§

ProtocolProperties
In the protocol we define the smallest parts of the radio signal. Usually a short pulse with a long pause resembles a binary zero, and a long pulse followed by a short pause resembles a binary one. A sync bit / sync gap combination marks the beginning of the radio transmission.
Transmission
A transmission consists of a sequence of short and long radio pulses. The binary sequence is represented by a string of literal ‘0’ and ‘1’ characters. That way you can compose the signal simply by concatenating multiple strings.

Constants§

P1
Resembles ‘protocol1’ of sui77’s brilliant rc-switch library for the arduino - probably the most common protocol.
P2
Resembles ‘protocol2’. Untested - your mileage may vary.
XEN
Protocol for the ‘Gmornxen’ RC socket switches, very similar to ‘protocol2’.