knight_rider2.ino 292 B

123456789101112131415161718192021
  1. #include <Automaton.h>
  2. #include "Atm_sweep.h"
  3. Atm_sweep sweep;
  4. Atm_button button;
  5. void setup() {
  6. sweep.begin( 4, 5, 6, 7, 8, 9 )
  7. .speed( 50 )
  8. .trigger( sweep.EVT_START );
  9. button.begin( 2 )
  10. .onPress( sweep, sweep.EVT_TOGGLE );
  11. }
  12. void loop() {
  13. automaton.run();
  14. }