Use Adafruit Feather M0 RFM69 boards with attached buttons to trigger attached L298N motor drivers as well as L298Ns attached to other boards nearby with the correct wireless configuration. Everyboard is a sender and a receiver of triggers.
-
Set a unique
key[]
value for encryption between the systems. -
Trigger S
- Triggered by grounding pin
TRIGGER_S
(pin 5 by default) - Transmits a signal to start this process on all listening devices and does it locally
- Waits
triggerDelay
ms (10 seconds by default) - Sets
S_OUTPUT_L1
andS_OUTPUT_R1
low (pins A4 and 0) andS_OUTPUT_L2
andS_OUTPUT_R2
high (pins A5 and 1) - Waits
triggerDuration
ms (2 seconds) - Sets
S_OUTPUT_L1
,S_OUTPUT_R1
,S_OUTPUT_L2
, andS_OUTPUT_R2
low
- Triggered by grounding pin
-
Trigger Wings
- Grounding pin
TRIGGER_WING_IN
(10) setsW_OUTPUT_L1
(A0) andW_OUTPUT_R1
(A2) low,W_OUTPUT_L2
(A1) andW_OUTPUT_R2
(A3) high, and sends a message to other boards to do the same - Grounding pin
TRIGGER_WING_OUT
(11) setsW_OUTPUT_L1
andW_OUTPUT_R1
high,W_OUTPUT_L2
andW_OUTPUT_R2
high, and sends a message to other boards to do the same - Grounding pin
TRIGGER_WING_KILL
(12) setsW_OUTPUT_L1
,W_OUTPUT_L2
,W_OUTPUT_R1
, andW_OUTPUT_R2
low - Either of the first two actions above schedules the
TRIGGER_WING_KILL
action afterwingsKillDelay
ms (15 seconds)
- Grounding pin
-
On-board LED
- Disable
enableLed
if necessary to save power. - One short blink - we've scheduled a trigger from button input
- Two short blinks - we've scheduled a trigger from wireless input
- Two long blinks - a scheduled trigger is being fired
- Four long blinks - battery voltage is low
- Disable
Much of this code came from:
- The RadioHead Packet Radio library with modifications by adafruit
- Debounce on a pushbutton from the Arduino docs
The RF code used in this project is derived from the adafruit/RadioHead project on GitHub. It carries a GPL V2 license so this code does as well.