2019-07-14 20:16:40 +00:00
|
|
|
# esrom
|
|
|
|
Source code for [the esrom geocache](https://www.geocaching.com/geocache/GC7C642_esrom).
|
|
|
|
|
|
|
|
If you have found the source code before finding the geocache, consider it a hint :)
|
|
|
|
|
|
|
|
## Setup (for future me)
|
|
|
|
- elixir 1.9.0-otp-22
|
|
|
|
- erlang 22.0.4
|
|
|
|
- nodejs 12.6.0
|
|
|
|
- [Nerves](https://hexdocs.pm/nerves/installation.html)
|
|
|
|
- [Phoenix](https://hexdocs.pm/phoenix/installation.html)
|
|
|
|
|
|
|
|
Building:
|
|
|
|
```bash
|
2019-07-14 21:54:06 +00:00
|
|
|
export MIX_ENV=prod && export MIX_TARGET=<device>
|
2019-07-15 17:46:41 +00:00
|
|
|
cd ui/assets && npm install && node node_modules/webpack/bin/webpack.js --mode production
|
2019-07-14 20:16:40 +00:00
|
|
|
cd ../ && mix phx.digest
|
|
|
|
cd ../firmware && mix deps.get
|
|
|
|
mix firmware
|
|
|
|
mix firmware.burn # After inserting SD card
|
|
|
|
```
|
|
|
|
|
|
|
|
## Setting morse code
|
2019-07-14 21:54:06 +00:00
|
|
|
To set the morse code, create a new file under firmware/config, called secrets.exs:
|
2019-07-14 20:16:40 +00:00
|
|
|
```elixir
|
2019-07-14 21:54:06 +00:00
|
|
|
use Mix.Config
|
|
|
|
|
|
|
|
config :morse, :morse_message, "...---..."
|
2019-07-14 20:16:40 +00:00
|
|
|
```
|