This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Automaton.h> | |
| Atm_analog sensor[4]; // 4 analog inputs | |
| Atm_timer timer; | |
| uint16_t avgbuffer[4][32]; // 4 buffers with 32 entries | |
| const char aPin[] = { A0, A1, A2, A3 }; | |
| void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Automaton.h> | |
| Atm_player player; | |
| Atm_button button; | |
| static int pattern[] = { | |
| 2, 2000, 0, | |
| 3, 4000, 0, | |
| 4, 3000, 0, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Automaton.h> | |
| Atm_button button; | |
| Atm_led motor; | |
| void button_change( int press ) | |
| { | |
| if ( !press ) { // On a release | |
| motor.trigger( EVT_BLINK ); // Send a blink message to the motor | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Automaton.h> | |
| Atm_button btn[8]; | |
| int btnPins[8] = { 3, 4, 5, 6, 7, 8, 9, 10 }; | |
| void button_callback( int idx, int v, int up ) { | |
| if ( v ) { | |
| //player.playTrack( idx ); | |
| } |
NewerOlder