Difference between revisions of "Microduino-WiFi Controls LED"
(Created page with "{| style="width: 800px;" |- | ==Purpose== This course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission by wifi. ...") |
(→Purpose) |
||
Line 6: | Line 6: | ||
==Purpose== | ==Purpose== | ||
− | This course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission by wifi. | + | This course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission format by wifi. |
==Equipment== | ==Equipment== |
Revision as of 09:16, 17 March 2015
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 initialzed 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 |