Daphne
Published © GPL3+

A webserver to control LED

Using Ameba RTL8722DM to build a webserver to control LED

IntermediateFull instructions provided1 hour481
A webserver to control LED

Things used in this project

Hardware components

Ameba RTL8722DM
×1
Resistor 1k ohm
Resistor 1k ohm
×1
LED (generic)
LED (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Wiring Diagram

First, connect the breadboard to the Ameba.

Then, connect the LED and the resistor in as shown in the wiring diagram.

For the LED, the longer pin is the positive pole while the shorter pin is the negative pole. Therefore, connect the shorter pin to the GND and the longer pin to D13 on the Ameba. In addition, to limit the current through the LED and prevent it from damage, we have to connect a resistor to the positive pole.

Programming

To open the sample code in the Arduino IDE, Open "File" -> "Example" -> "AmebaHttp" -> "SimpleHttpExample"

Programming

Next, in the sample code, modify the highlighted section to enter the information required (SSID, PASSWORD) of your network to connect to your Wi-Fi.

Programming

Once the upload is completed, open the serial monitor in the Arduino IDE. When the connection is established, you will see the message "To see this page in action, open a browser to http://xxx.xxx.xxx.xxx" in the Arduino IDE, as shown in the picture

Final Result

Finallly, open the internet browser on a computer or a smartphone under the same Wi-Fi network as the Ameba, then enter the IP address of the Ameba.

And in the webpage you can turn on or turn off the LED.

Credits

Daphne
12 projects • 1 follower
Always ready to learn something new...

Comments