Hi, how can i get web time?

I want to turn on the function that transmits video through rtsp only during certain times (e.g. from 7:30 AM to 17:20 PM) and keep it in low power mode for the rest of the time. I checked the RTP example, but I want to use the function to get the time from the web. I referred to the ntp example of the existing esp, but it does not seem to be compatible with amb82 mini. In this case, how should I write the code? We are preparing training on how to use amb82 mini in Korea, but it is difficult because there are not many examples.

Hi @pcw0915, can you try with the RTC example? RTC – Simple RTC – Realtek IoT/Wi-Fi MCU Solutions. I believe this will suit your need. Let me know if you have any other queries. Right now, the NTP client feature has not yet been ported to AMB82 Mini yet.

Thanks!

So… there is no way for the device to receive time information from the Internet?

Hi @pcw0915, there is a way. I have tried and it can work. Please refer to the this example NTP – Retrieve Universal Time (UTC) by NTPClient library – Realtek IoT/Wi-Fi MCU Solutions. Right now, it has not been ported to AMB82 Mini, but the example once copied over can work too. We will update it soon as this feature can be easily ported. For now, can you try with this example? Let me know if you are not sure how to do it.

Thanks.

Hi @pcw0915, I can help to port it next week, may I know how urgent your need is? If not, you can port yourself first, because the example from AmebaD family can work for AMB82 Mini too.

I’m currently testing the performance of all four AMB82 minis I have. I’ll try the example you provided over the weekend.

For reference, to briefly share our company’s AMB82 mini test results, the power consumption when transmitting video via RTSP is 210 to 240 mA per hour when 5 volts is applied.

When the camera rotates rapidly or the projectile moves rapidly, power consumption may momentarily increase to 450mA.

In harsh environments (wi-fi communication signal strength changes frequently, harsh weather conditions, frequent strong vibrations), AMB82 mini has superior connection stability compared to ESP32 cam. The connection stability of the AMB82 Mini is overwhelmingly better than that of the ESP32 CAM equipped with an external 5db antenna.

It works well even with irregular and out-of-range voltage inputs.

The downside is that there aren’t many examples or use cases, so our developers have a lot of trouble developing it to suit our company’s projects.

I tried the example code you provided, but it didn’t work.

Hi @pcw0915, are you referring to web time? Can you extract the zip file and copy to the path to Arduino15/packages/realtek/hardware/AmebaPro2/…/libraries?
NTPClient.zip (7.8 KB)

/*

Example guide:
NTP – Retrieve Universal Time (UTC) by NTPClient library – Realtek IoT/Wi-Fi MCU Solutions
*/

#include <NTPClient.h>
#include <WiFi.h>
#include <WiFiUdp.h>

char ssid = “KT_GiGA_Mesh_1898”;
char pass = “9cea3hc265”;

WiFiUDP ntpUDP;

// 대한민국 시간대에 맞게 시간 오프셋을 설정 (GMT+9:00)
const int timeOffset = 9 * 3600; // 9 hours * 3600 seconds per hour

// NTP 서버 및 업데이트 간격 설정
NTPClient timeClient(ntpUDP, “europe.pool.ntp.org”, timeOffset, 60000);

void setup() {
Serial.begin(115200);

WiFi.begin(ssid, pass);

while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
}
timeClient.begin();

}

void loop() {
timeClient.update();

Serial.println(timeClient.getFormattedTime());

delay(1000);

}

it works good. thx