An arduino library for asynchronously demodulating OOK packets often sent by 433Mhz transmitters.
To use:
class MyHandler : public rx433::Handler {
bool IsSync(const rx433::Pulse& p) override {
// Return true if this is (possibly) a sync pulse.
}
bool Handle(const std::vector<rx433::Pulse>& buf) override {
// Insert demodulation code here. Return true if successful.
}
}
void setup() {
rx433::AddHandler(new MyHandler);
rx433::Setup(4); // RX module on pin 4;
// ...
}
void loop() {
rx433::Loop();
// ...
}