In the present day situation of COVID-19 it is necessary to avoid touch.
So how good it will be if you can wash your hands with soap solution without touching or pressing the soap solution bottle.
This is a small attempt from my side to do the same. It is achieved by controlling a motor operated small pump which starts and stops by your voice.
WORKING
Motor used is a digital output device and we will have to give 2 inputs so we will use digitalMultiWrite command that can be sent to Bolt over the Internet to turn on the motor
The structure of the command is:
https://cloud.boltiot.com/remote/API_KEY/digitalMultiWrite?pins=PIN_NUMBER, PIN_NUMBER&states=HIGH/LOW, HIGH/LOW&deviceName=DEVICE_ID
The parameters that you need to replace are:API_KEY: You can get it from API tab on cloud dashboard.PIN_NUMBER: Pins to which you have connected the motor. Values can be either 0, 1, 2, 3 or 4HIGH/LOW: This value indicates if you want to turn on/off the LED. HIGH will turn it on, LOW will turn it off.DEVICE_ID: The id of your device. You can get it from cloud dashboard.
The sample command to turn the motor ON connected to device having ID BOLT13819450 to PIN 1and2 is:
https://cloud.boltiot.com/remote/f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf/digitalMultiWrite?pins=1, 2&states=HIGH, LOW&deviceName=BOLT13819450
Make sure that you change the API Key to your own API Key and device ID which youwill get from your Bolt Account.If you have connected the motor to any other pins other then Pin 1 and 2 then make a suitable change in the pin no in your code.
STEP2: Creating Applet on IFTTTGo to IFTTT to create a new applet by clicking here
Login using your Gmail account. Make sure you use same account which you'll be using on your mobile to interact with Google Assistant.
Click on '+This' to create the trigger.
Choose Google Assistant -> Say Specific Phrase
Type the phrase you want to trigger the action. Make sure to specify the trigger command like
1. Put soap solution
2.Sanitize my hands
3.Go corona
Click on 'Create Trigger'
Click on '+That'
Select Webhooks and then Make a web request.
Enter the API URL you got in the previous Step. Make sure that you change the API Key and device name.
Method will be GET
Content type will be Application/json
Here is how your screen will look like
Click on 'Create Action' and then Click on 'Finish'
Stepsto turn OFF the motor
Now do the same process again as mentioned above for a command to switch of the motor. Here you will change the states i.e. states=LOW, LOW in your code. Here is a sample of the code. Also, add a suitable phrase to switch off the motor.
STEP3: Circuit ConnectionsI made a pump by watching a video from YouTube.
Just type 'DIY DC motor water pump' on youTube.There are plenty of videos on YouTube.
connect the motor used in the pump as per above circuit diagram and you are done.
You can now control the soap dispenser with your voice.
Comments