This is the example kiosk application for followings,
git clone https://github.com/nerves-web-kiosk/kiosk_demo.git
cd kiosk_demo
export MIX_TARGET=rpi4
mix deps.get
mix firmware
mix burnIf you want WiFi credentials to be written to the MicroSD card, initialize the MicroSD card like this instead:
NERVES_WIFI_SSID='access_point' NERVES_WIFI_PASSPHRASE='passphrase' mix burnYou can still change the WiFi credentials at runtime using
VintageNetWiFi.quick_configure/2, but this helps when you don't have an easy
alternative way of accessing the device to configure WiFi.
Then,
- Insert the MicroSD to your Raspberry Pi 4 or 5
- Connect your Pi and a display
- Boot it!!
We will see Phoenix LiveDashboard on your display!!!
We can change the URL to use KioskDemo.change_url("http://example.com")
on IEx console over SSH.
And there are some functions in KioskDemo module which lead browser to famous URL. Enjoy!!
To change the screen orientation, use the method described below.
- Create
rootfs_overlay/etc/xdg/weston/weston.ini - Edit it like following
[output]
name=DSI-1
[email protected]
transform=rotate-270
The transform key can be rotate-(90|180|270).
The original source is available here, but it's not very human-readable. For a more readable version, see this man page.