I need a Arduino sketch written for current home automation project. I am developing a voice controlled and push button controlled roll up shade using 1 DC MOTOR, 1 ARDUINO UNO R3 BOARD, 1 MDV 2x2A DC Motor Controller (L298N), 3 PUSH BUTTONS, 1 EASY VR SHIELD 3.
I want to be able to setup EasyVR Shield to accept 'trigger' word as Blind and Group 2 word as 'Up' or 'Down.' The up function will turn the DC Motor clockwise until it pushes button on attached to Pin 7. The down function will run the DC Motor counterclockwise for say 10 seconds then stop (will need to confirm # of seconds later which I can change in the code provided). In conjunction with using voice command through EasyVR Shield, I will have two push buttons connected to Pin 4 and Pin 2. Pin 4 will run DC motor clockwise up until it pushes button on Pin 7 and Pin 2 will run DC motor down for 10 seconds then stop.
The circuit is as follows:
EasyVR Shield mounted to arduino board.
Pin 7 Push Button (to stop DC Motor clockwise)
Pin 4 Push Button (Turn DC Motor On Clockwise)
Pin 2 Push Button (Turn DC Motor On CounterClockwise)
Pin 10 connects to M1 on the motor controller
Pin 11 connects to E1 on the motor controller
There will outside 9V power connected straight to motor controller and arduino.