networking and communications
mcu som: esp32c3 xiao
erlang vm: atomvm
This week is an extension of the first embedded assignment, in which I functionally completed the networking part of this week's tasks. This week, I designed and built a board to support the Erlang version of the firmware I wrote (which ran on a breadboard previously), and extended the firmware to be able to show new networking functionality for this week.
Erlang node running:
Boot sequence:
Lights in order:
- Booted
- Wifi connected
- IP acquired
- NTP sync
The blinking LED runs on an infinite loop independently.
The "booted" light can be controlled over UDP using the Erlang client I wrote for the earlier assignment.
firmware improvements
Beyond designing and milling a board, I added the following improvements to the firmware:
-
Nonvolatile storage of a well-known remote ip. The device sends a UDP packet to this address with its own IP every time it's assigned one -- the idea is that at some point you store your (hopefully somewhat stable IP) on the device, and it notifies you so you can easily find it without needing to be connected to it.
-
A ping-pong mode -- if you send the node the atom
:ping
, it responds:pong
. Timing with both my laptop and the node on the same WiFi network is bimodal -- half of the packets roundtrip in about 30ms, and the other half take 225ms or so. This is the fresh networking functionality that I intended to on its own cover this week!