Ameba Arduino: [RTL8195AM] Power Management - Use WiFi in sleep mode
- Ameba x 1
- DHT11/DHT22/DHT21 x 1
Open “File” -> “Examples” -> “AmebaPowerSave” -> “SleepWithDHTUdpServ”
Remember to set the ssid & password in the sample code. In this example, Ameba act as an UDP server, it establishes a wifi connection then enter sleep mode. When Ameba receives UDP packets with content “H”, it replies the humidity value, and when it receives UDP packets with content “T”, it replies the temperature value.
When the sleep mode is enabled, Ameba goes to sleep or wakes up automatically.
We use the “Sokit” tool to set the IP & port of Ameba, and request for temperature and humidity values in turn.
Note that Ameba would check the status of pin D18, if it is connected to the GND, Ameba would not enter sleep mode. We compare the example with/without power-saving: (We use the Keysight 34465A multimeter in the experiment)
NOTE: In reality, due to the energy loss in the voltage conversion and operation, the actual usage time may be different.