voice controlled wooden edison lamp - (video): 5 steps
How much is the Wifi relay SONOFF (
Companies in ITEAD)
Cost, this is the core of this device.
I just found 10 ways to not work. \" -Thomas A.
This is incredible, but recently, people at school write with feathers.
Today, there is a magic brick with pictures, in your pocket with access to all the information in the world.
As people say, voice control and the threat of artificial intelligence to human beings.
These technologies seem to be unattainable fantasies recently.
But today, I\'m going to show you that with the basics of programming, each of you can use voice control.
So let\'s start. WARNING! ! !
High working voltage!
The article author is not responsible for your actions!
Or any material or physical damage that may result from the use of this manual!
Because the phone can only connect to one Wi at a time-
Fi access point, we will work through the router.
In general, it is convenient when all your smart devices are on the same network, and you can manage them easily without having to constantly reconnect to each device.
The downside to this is that all devices depend on the performance of a single router.
By default, it is configured to work through a Chinese server.
In my understanding, it is not very convenient to turn off the light bulb of the toilet through the Chinese server.
For this we need to disassemble it and weld the reprogrammed contacts.
Now we can connect the cp2102 module from the silicon lab to the Sonoff wifi.
I also use it to program the Arduino mini. WARNING! ! !
Do not connect the module to the 220/110 V network when reprogramming!
The re-programming of the relay is very simple.
This is a regular esp8266 module.
I got the standard sketch of the access point server from the Arduino IDE and made some changes to it.
Firmware for SONOFF Wifi relay.
To use it through the home router, you can find it in the attached file.
And use it from the Arduino IDE.
You need to specify the name of the access point (router)
, Password and static IP address of the bulb.
The relay is controlled at 12 pins.
Please make sure to set the flash size to 1 MB in the IDE.
Press and hold the button on the Sonoff board.
Insert cp2102 converter USB in your computer (
At the same time hold down the button).
Release the button after 2-3 seconds.
Now in flash mode.
Load the sketch file in the Arduino IDE.
After flashing, the module should be restarted and the green LED will start flashing. I will only provide the main code snippet.
You can then implement it on the application using them.
Google provides a very simple and convenient interface for speech recognition.
Here is the code that allows you to convert voice to text and save it as a regular string. (
The main code section of Android, using speech recognition, you can find it on the attached file. )
You can then compare it to the command you want to implement.
Code for using WiFi.
Send a message to the server.
You can also find it in the attachment.
The code is simple.
\"1\" turn on the bulb and \"0\" turn off the bulb.
Feel free to add any checks, receive responses from the server, etc. .
I created two programs for myself.
The first is the voice control widget, which is located on the desktop and is available at any time.
The second is a simple application to turn the bulb on/off by pressing the button.