Difference between revisions of "Microduino-WiFi Controls LED"
(→Purpose) |
|||
Line 82: | Line 82: | ||
Here we use is windows operating system: | Here we use is windows operating system: | ||
− | Official | + | Official website: http://www.wampserver.com/en/ |
Please download and install. | Please download and install. | ||
Download address of this site: [[File:wampServer.rar]] | Download address of this site: [[File:wampServer.rar]] | ||
− | During the installation, it will probably give you notices such as the lack of msvcr110.dll. | + | During the installation, it will probably give you notices such as the lack of msvcr110.dll. That's because components are missing in your windows system, which please check: [[http://www.microsoft.com/en-us/download/details.aspx?id=30679 Visual C++ Redistributable for Visual Studio 2012 Update 4]], download and install. |
[[File:wifiContorlLED3.png|600px|center|thumb]] | [[File:wifiContorlLED3.png|600px|center|thumb]] | ||
− | msvcr110.dll download address of this | + | msvcr110.dll download address of this site: [[File:Msvcr110.rar]] |
Line 98: | Line 98: | ||
[[File:wifiContorlLED4.png|600px|center|thumb]] | [[File:wifiContorlLED4.png|600px|center|thumb]] | ||
− | Open your browser and input | + | Open your browser and input "localhost" |
The picture below shows wampserver installation success: | The picture below shows wampserver installation success: | ||
Line 107: | Line 107: | ||
Step 4: | Step 4: | ||
− | Find the file | + | Find the file "update_state.php" in your download code folder, then change the IP address of the socket connection to that of Microduino: |
[[File:wifiContorlLED5.png|600px|center|thumb]] | [[File:wifiContorlLED5.png|600px|center|thumb]] | ||
− | Put MicroduinoWiFiControl folder into | + | Put MicroduinoWiFiControl folder into "www" folder and input the browser website: http://localhost/MicroduinoWiFiControl/robot.html |
Display: | Display: | ||
Line 124: | Line 124: | ||
[[File:wifiContorlLED7.png|600px|center|thumb]] | [[File:wifiContorlLED7.png|600px|center|thumb]] | ||
− | Input your IP address in your phone to visit webpage interface. If your visit is restricted, it means that you have set limited visit for other computer in LAN during | + | Input your IP address in your phone to visit webpage interface. If your visit is restricted, it means that you have set limited visit for other computer in LAN during initialized installation of wampserver. Below is the solution: |
Find the file of httpd.conf in wamp folder, which is in wamp\bin\apache\apache2.4.9\conf | Find the file of httpd.conf in wamp folder, which is in wamp\bin\apache\apache2.4.9\conf | ||
Line 140: | Line 140: | ||
Require all granted | Require all granted | ||
</source> | </source> | ||
− | (Note: | + | (Note: Don't delete "Require local“) |
==Result== | ==Result== |
Revision as of 08:40, 13 September 2016
PurposeThis course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission format by wifi. Equipment
Schematic
ProgramDebuggingStep 1: Build the circuit according to the schematic, just like:
After installing the missing library function, it should go well. Before that, please modify user name and code of wifi.
If everything goes fine, your IDE serial communication will show IP address such as: From the picture above, we can see Microduino Wifi connection goes normally. Step 3:Next, you need to configure your laptop to be a server which can run PHP code. Because, here we use is PHP code. Windows operating system
Linux operating system:
Mac OS:
Here we use is windows operating system: Official website: http://www.wampserver.com/en/ Please download and install. Download address of this site: File:WampServer.rar During the installation, it will probably give you notices such as the lack of msvcr110.dll. That's because components are missing in your windows system, which please check: [Visual C++ Redistributable for Visual Studio 2012 Update 4], download and install. msvcr110.dll download address of this site: File:Msvcr110.rar
Open your browser and input "localhost" The picture below shows wampserver installation success:
Find the file "update_state.php" in your download code folder, then change the IP address of the socket connection to that of Microduino:
Display: Make sure your Microduino is powered on at this time and click the buttons and see what happens to the LED lights.
Input your IP address in your phone to visit webpage interface. If your visit is restricted, it means that you have set limited visit for other computer in LAN during initialized installation of wampserver. Below is the solution: Find the file of httpd.conf in wamp folder, which is in wamp\bin\apache\apache2.4.9\conf Find statements as follows: # onlineoffline tag - don't remove
Require local Replace them to be: # onlineoffline tag - don't remove
# Require local
Require all granted (Note: Don't delete "Require local“) ResultYou can now control LED lights through a phone or browser.
Video |