Skip to content

Additional Web Pages

jbaumann edited this page Mar 8, 2022 · 8 revisions

The portal allows to configure all the parameters using the URL "/params". At the top of this page two additional web pages are linked, an I2C scan page, and a page that shows the current measurements, which additionally allows to set the RTC to the NTP time.

The I2C Scanner

This page is reachable from the Firmware configuration page by clicking on the link "Scan I2C Bus", or directly using the URL "/i2c_scan". Every time you call it, a new scan is initiated. The H32 without additional I2C devices should show the following:

The device on I2C address 0x39 is the RTC, and the device on I2C address 0x51 is the AHT10 sensor.

Measurements

This page is reachable from the Firmware configuration page "Show Device Readings (and set RTC)", or directly using the URL "/devices". Every time you call it, a new scan is initiated. The H32 without additional I2C devices should show the following:

By pressing the button "Set RTC Time" the RTC will first be reset and then set to the then current NTP time. This guarantees that the RTC is in a well-known state, which is important e.g., after changing the battery.

As you can see in the screenshot, RTC time and NTP time differ by quite a few seconds. At the time of the screenshot, the RTC ran roughly 2 weeks without synchronization. Since the accuracy of the RTC is limited, these two times will always diverge. For all practical matters, this is of no consequence.

If you need more accuracy you can use the calibration and offset registers of the RTC, but this has to be done by hand. Contact me if you need help.