Maker Pro
Arduino

Ameba as a Server to control LED

October 27, 2021 by Daphne .
Share
banner

We connect Ameba to WiFi and use Ameba as server, the user can control the LED on/off through a webpage.

We will connect Ameba to WiFi and use Ameba as server, the user can control the LED on/off through a webpage.

RTL8722DM_MINI

Ameba RTL8722DM is a low-power dual-band WLAN and Bluetooth Low Energy SoC by Realtek. The RTL8722DM also include memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on

Components 

  • RTL8722DM_MINI
  • LED
  • Resistor
  • BreadBoard

Setup

First, connect the Ameba with the LED.

In a LED, the longer pin is the positive pole and, the shorter pin is the negative pole. So we connect the shorter pin to GND and connect the longer pin to D13. Additionally, to avoid the electric current exceeds the tolerance of the LED and causes damage, we connect a resistance on the positive pole.

Webserver2.PNG

Programming

Then open "File" → "Examples" → "AmebaWiFi" → "SimpleWebServerWiFi"

Webserver3.png

In the sample code, ,modify the highlighted snippet to the corresponding information.

Webserver4.PNG

Final Results

Webserver5.png

Upload the code and press the reset button on Ameba. When the connection is established, you will see the message "To see this page in action, open the browser to http://xxx.xxx.xxx.xxx" in Arduino IDE, as shown in the figure above.

Next, open the browser of a computer or phone under the same WiFi domain, enter the address in the message.

Webserver6.png

If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.

Ameba Official Website: https://www.amebaiot.com/en/

Ameba Facebook Group: https://www.facebook.com/groups/amebaioten

Ameba Forum: https://forum.amebaiot.com/



Related Content

Comments


You May Also Like