This file contains 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
const int M1 = 4; // H-bridge leg 1 (pin 2, 1A) | |
const int E1 = 5; | |
const int M2 = 8; // H-bridge leg 2 (pin 7, 2A) | |
const int E2 = 9; | |
const int mouthPin = 2; | |
//const int knapp = 3; | |
char mouth; | |
boolean state = true; | |
const int enablePin = 10; // H-bridge enable pin |
This file contains 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
/* | |
Hall Effect Switch | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when Hall Effect Sensor attached to pin 2 is triggered by a magnet | |
Hall effect sensor used is the A1120EUA from Allegro Microsystems | |
This example code is in the public domain. | |