← Back to context

Comment by rcarmo

1 month ago

I love this because it uses UDP _and_ a CYD (Cheap Yellow Display, which is what we hardware nerds have taken to calling these). I have two or three of these around, one as a 3D printer remote, another as a pseudo logic analyzer, and a caseless one that I use as a Micro Python sandbox.

I've been using UDP to send CPU stats for my machines for ages (https://github.com/rcarmo/raspi-cluster/blob/master/tools/se... is a good example), and in modern networks it has become very much reliable (99.99% so on a LAN). Keeping an eye out for UDP on an ESP32 and running Wireguard might be a little power intensive to ever get this running on battery even if it had an e-paper display, though.

WireGuard doesn’t add noticeable battery drain in my experience. I have a fleet of Xiao ESP32-C3 devices with DS1820 temperature sensors that run on batteries and send samples over WireGuard.

The battery drain is 100% a function of the transmit time, so by pre-encrypting the buffers before powering on the radio I save a bit. Likewise for the response handshake - get the packet, shut down the radio, then decrypt it.

When sending samples between handshakes, I don’t have to wait for an ACK of any kind - I just send the packet and shut down the radio. That saves a ton of power compared to TCP.