This project is for the 1sheeld Makerspaces Competition.
The project automates 3 main things at the JMoon MakerSpace:
- Door Lock
For the code to work perfectly, Go to Arduino -> libraries -> OneSheeld -> "VoiceRecognitionShield.h" and add the following line to the public function declarations –
Then go to Arduino -> libraries -> OneSheeld -> "VoiceRecognitionShield.cpp" and add this function at the end of the file –
voice = NULL;
This function makes sure that once a Voice command has been executed, it is no longer stored. If you do not add this function, the previous Voice command will keep on executing, till a new Voice command is spoken.
This project uses the following sensors of the phone-
- GPS (GPS should be turned on)
- TEXT TO SPEECH
- ORIENTATION SENSOR
- VOICE RECOGNIZER (Needs Internet Access)
and DATA LOGGER is used to store csv data in the phone.
The project requires 2 passwords- 1 for entering the makerspace, and 1 for locking up at the end of the day.
The commands for turning light on/off or taking photos can also be setaccording to the user.
A relay module (Active LOW) is used to control the bulb/lamp. When a HIGH signal is sent to the module, the switch controlling the light is turned off. A DC motor mounted at the end of a glue-stick (hollowed out) to create an electronic linear lock.
When the app is turned on, the phone makes sure that it is at the location of JMoon MakerSpace (Long:77.0769698, Lat: 28.6274036). If not, then the user is requested to go to the location. If it is at the right location, the user is asked to enter the password to open the lock.
The lock is opened after 2 steps.
1. The phone must have the right orientation, once that is confirmed, the user is asked for
2. Entry password. You need to press the voice recognition before speaking the password.
Orientation is only required again if you lock up the makerspace.
If the password is confirmed, the electronic linear lock is opened, and the entry time is logged.
After this, Voice Recognition is activated automatically so you can speak a command any time. These commands can be- switching on the light, switching off the light, taking pictures with front and rear camera, detecting noise level, locking up the makerspace (which involves, switching off the lights, closing the electronic linear lock and logging in the exit time).
After locking up, to enter makerspace again, you have to start from the orientation check (while the app is turned on). If you are connecting to the 1sheeld again (after losing connection or turning off app) then the code will start with checking the GPS coordinates.