summaryrefslogtreecommitdiffstats
path: root/_log/etlas.md
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-06-05 21:00:02 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-06-12 19:49:59 +0800
commita8d7508006db8309550755a72719de83bde3cdd9 (patch)
treef641b17405c674d3799ebca1f135538bfc930b7d /_log/etlas.md
parent293923a31d434c37cae454a4f1d9977772d11f02 (diff)
downloadwww-a8d7508006db8309550755a72719de83bde3cdd9.tar.gz
Improve writing.minimalist
Diffstat (limited to '_log/etlas.md')
-rw-r--r--_log/etlas.md38
1 files changed, 14 insertions, 24 deletions
diff --git a/_log/etlas.md b/_log/etlas.md
index 9f09322..d0ff35d 100644
--- a/_log/etlas.md
+++ b/_log/etlas.md
@@ -6,8 +6,7 @@ project: true
thumbnail: thumb_sm.jpg
---
-Repurposed the [e-reader](../e-reader/) for regular use as a news, stocks, and
-weather dashboard.
+Repurposed the [e-reader](../e-reader/) for regular use as a news tracker.
<table style="border: none;">
<tr style="border: none;">
@@ -19,14 +18,13 @@ weather dashboard.
</tr>
</table>
-Swapped out the ESP-32-WROOM for an ESP32 NodeMCU D1—smaller, better form
+Swapped out the ESP-WROOM-32 for an ESP32 NodeMCU D1—smaller, better form
factor. Connected a DHT22 sensor for temperature and humidity data.
-Weather: 26µs/50µs/70µs pulses from the DHT22's single-wire protocol are too
-fast for ESP32 standard APIs. Ported <a
+Weather: DHT22's 26µs/50µs/70µs pulses are too fast for the ESP32 standard
+APIs. Ported the following bit banging <a
href="https://github.com/Fonger/ESP8266-RTOS-DHT" class="external"
-target="_blank" rel="noopener noreferrer">this</a> clever bit-banging from
-ESP8266 to ESP32:
+target="_blank" rel="noopener noreferrer">routine</a> from ESP8266:
```
static inline int dht_await_pin_state(int state, int timeout)
@@ -44,8 +42,6 @@ static inline int dht_await_pin_state(int state, int timeout)
static inline int dht_get_raw_data(unsigned char buf[BUFLEN])
{
- /* init code and preamble */
-
for (i = 0; i < BUFLEN; i++) {
if (!(pwl = dht_await_pin_state(1, 50))) {
rc = 4;
@@ -63,23 +59,17 @@ static inline int dht_get_raw_data(unsigned char buf[BUFLEN])
}
```
-Stocks: Obtained two weeks EOD data from Polygon.io—maximum possible with 512
-KB RAM. Deployed a simple Flask API on VPS to manage the watchlist and relay
-the feed. Wrapped the API in FastCGI and exposed it through chroot-ed
-htpasswd + slowcgi + httpd—battle-tested OpenBSD base-system tools.
-
-Custom stepped graph works but the code is crude. vTaskDelay() is needed to
-keep the watchdog timer from triggering—revisit with Bresenham's line
-algorithm.
+Stocks: Two weeks' EOD data from Polygon.io—maximum possible with 512 KB RAM.
+Flask API on a VPS manages the watchlist, relays the feed. The API is exposed
+via chroot-ed htpasswd + slowcgi + httpd.
-News: Used Channel NewsAsia RSS feed for news. Hand-coded the XML parsing in
-C—no Flask backend at the time. Now that I have one for stocks, will move the
-feed through the Flask backend in the next revision.
+News: Channel NewsAsia RSS feed. Parsed XML on the MCU as there was no Flask
+backend at the time. Now that I have one for stocks, moving it through the
+backend in the next revision.
-epd_init() stalled intermittently on first refresh() after flash. Toggling
-delay values in refresh() resolved it. If the first refresh succeeded, system
-remained stable. Could not find the root cause. Suspect noisy supply due to
-powering display via MCU.
+epd_init() stalled intermittently on first refresh() after flash. If the first
+refresh succeeded, the system remained stable. Could not find the root cause.
+Suspect noisy supply caused by powering the display via the MCU.
Commit: <a
href="https://git.asciimx.com/etlas/commit/?id=a92c86ac1592c2137d3d1fec1668eacc2d0ca581"