Microduino-WiFi Controls LED

From Microduino Wiki
Jump to: navigation, search


This course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission format by wifi.


Module Number Function
Microduino-Core 1 Core board
Microduino-USBTTL 1 Program download
Microduino-WiFi 1 Wireless transmission

  • Other equipment
Jumper wire One box
LED light 2 cable
micro usb cable One






Step 1: Build the circuit according to the schematic, just like:


Step 2: Download the code and run Microduino_led_wifi code in Microduino. In this case, if there is still compile error, it should be lack of Adafruit_CC3000: [_03_Microduino_WIFI_CC3000]

After installing the missing library function, it should go well. Before that, please modify user name and code of wifi.

WifiContorlLED1 1.png

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

  • W-windows
  • A-apache
  • M-mysql
  • P-php

Linux operating system:

  • L-linux
  • A-apache
  • M-mysql
  • P-php

Mac OS:

  • M-Mac OS
  • A-apache
  • M-mysql
  • P-php

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

After installation, you will see the following under your installation directory.


Open your browser and input "localhost"

The picture below shows wampserver installation success:

WifiContorlLED4 1.jpg

Step 4:

Find the file "update_state.php" in your download code folder, then change the IP address of the socket connection to that of Microduino:


Put MicroduinoWiFiControl folder into "www" folder and input the browser website: http://localhost/MicroduinoWiFiControl/robot.html



Make sure your Microduino is powered on at this time and click the buttons and see what happens to the LED lights.

Step 5: You can use any terminal control besides controlling LED lights, such as your phone:


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“)


You can now control LED lights through a phone or browser.