Skip to content

nerves-web-kiosk/kiosk_demo

Repository files navigation

KioskDemo

CircleCI REUSE status

This is the example kiosk application for followings,

How to try

git clone https://github.com/nerves-web-kiosk/kiosk_demo.git
cd kiosk_demo
export MIX_TARGET=rpi4
mix deps.get
mix firmware
mix burn

If 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 burn

You 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,

  1. Insert the MicroSD to your Raspberry Pi 4 or 5
  2. Connect your Pi and a display
  3. 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!!

With Raspberry Pi Touch Display2

To change the screen orientation, use the method described below.

  1. Create rootfs_overlay/etc/xdg/weston/weston.ini
  2. Edit it like following
[output]
name=DSI-1
[email protected]
transform=rotate-270

The transform key can be rotate-(90|180|270).

More about weston.ini

The original source is available here, but it's not very human-readable. For a more readable version, see this man page.