Kid friendly alarm clock resembling a traffic light.
- Clone the repo and
cd kinderampel
- Set target e.g.
export MIX_TARGET=rpi0
- Install dependecies
mix deps.get
- Create firmware bundle
mix firmware
- To create a bootable SD Card
mix burn
The steps below are optional, however it will streamline development process significantly.
- Set environment variables
SSID
andPSK
to configure WiFi connection - Connect the raspberry pi zero via the gadget connection to the host
- Run
ssh nerves.local
- Inspect
VintageNet.info
to confirm thatwlan0
is included in the available interfaces list. Under theInterface wlan0
section you will also find the ipaddress being used underAddresses
. - You can also find the ipaddress by inspecting
RingLogger.next
. This is also a great debugging tool. You should see something like this being logged:
00:00:20.020 [debug] udhcpc(wlan0): udhcpc: lease of xxx.xxx.x.xxx obtained, lease time 7200
- Once you've identified the correct ipaddress you should be able to run
ssh xxx.xxx.x.xxx
- After compiling your firmware, you can run
upload.sh xxx.xxx.x.xxx
to deploy updates over the air
Note: If you are configuring correct SSID and password to a WiFi network, but your device is failing to connect to it it may due to the type of WiFi network. It may be that the WiFi network may be 5GHz and your device is only compatible with 2.4GHz.
With the listed items below no soldering was required:
- Raspberry Pi Zero WH
- Pi Traffic Light
- Micro SD Card, and adapter to read it on host
- Micro USB cable that supports data transfer
Inspect RingLogger.next
to see what is being logged.
- Add a HTTP API layer to allow controlling the lights from a web UI
- Can we avoid constantly checking time every few x seconds? Is there a way to increase performance by adding idle time?