MySensors Library & Examples  2.3.2
SecureActuator.ino File Reference

Detailed Description

Example sketch showing how to securely control locks.

This example will remember lock state even after power failure.


Definition in file SecureActuator.ino.

#include <MySensors.h>
+ Include dependency graph for SecureActuator.ino:

Go to the source code of this file.

#define MY_DEBUG
 Enable debug prints to serial monitor.
 Enable signing related debug prints to serial monitor.
 Enable lockdown of node if suspicious activity is detected.
#define MY_RADIO_RF24
 nRF24L01 radio driver
 Software signing.
 destination node signs all messages sent to this node
 Unconnected analog pin for random seed.
#define MY_SIGNING_ATSHA204_PIN   17
 A3 - pin where ATSHA204 is attached.
#define LOCK_1   3
 Arduino Digital I/O pin number for first lock (second on pin+1 etc)
#define NOF_LOCKS   1
 Total number of attached locks.
#define LOCK_LOCK   1
 GPIO value to write to lock attached lock.
#define LOCK_UNLOCK   0
 GPIO value to write to unlock attached lock.
void setup ()
 Called after node initialises but before main loop.
void presentation ()
 Node presentation.
void loop ()
 Sketch execution code. More...
void receive (const MyMessage &message)
 Incoming message handler. More...