HOME GAMES APPS CODE DESIGNS ELECTRONICS DOWNLOADS LEGACY

QuizMachine

GOAL

To create a Quiz Machine using a Raspberry PI for a family games night

CONCEPT

  • Allow multi-choice questions to be dynamically uploaded and presented

  • Allow phones to be used to record answers

  • Display results and time to answer

  • Have the questions read aloud by the browser

PURCHASES

Controller Raspberry Pi 3 with case £44.85
 
TOTAL £44.85

IMPLEMENTATION

Went with a Neon type theme using CSS animation features to try out a few of the ones I've never used before.

Created a JS library called Narration to handle all the talking and created an xml format so could easily create new "QuizNights".

Used electron which worked fine on my pc but Chromium on the PI really didn't like it.

It needs to be started with an argument --enable-speech-dispatcher but couldn't work out how to use this with Electron.

Looking around for alternatives I found the excellent:

https://app.responsivevoice.org/

which is a javascript library that's free for non-commercial use that allows the same functionality. This worked brilliantly.

The performance on Chromium was disappointing though. The updates even though they were simple CSS changes seemed very slow to update and the javascript interval or set timeout didn't update event the timer

So I thought I'd try the 32bit version of Rasbian buster but couldn't get dotnet installed on it.

This is such a stupid thing to not have working.

So I realised I needed to run the 32bit version of ARM dotnet
cd Downloads wget https://download.visualstudio.microsoft.com/download/pr/041e8f1c-fae7-4422-9c6c-8f73f74fbbcf/26de71e5d316ce9939a0194ff36a10ba/dotnet-sdk-6.0.412-linux-arm.tar.gz sudo mkdir ~/.dotnet6 sudo tar -xvf dotnet-sdk-6.0.412-linux-arm.tar.gz -C ~/.dotnet6
Then add dotnet to the path:
sudo nano ~/.bashrc
Add following rows and save (CTRL+O):
export DOTNET_ROOT=$HOME/.dotnet6 export PATH=$PATH:$HOME/.dotnet6
You can check it worked:
./dotnet --version
Next I needed to create a folder to host the app:
#create nasclock folder mkdir QuizNight sudo chmod -R 777 /home/pi/QuizNight
Now I needed a folder to upload the quizzes
#install samba sudo apt-get install samba samba-common-bin
Next I needed the app to be available for people to answer on their phones so I installed nginx:
sudo apt-get install nginx
Then start the service:
sudo service nginx start
Then redirect the default dotNet app to be the main website:
sudo nano /etc/nginx/sites-available/default
and add a location under the default server:
location / { proxy_pass http://localhost:5000/; proxy_http_version 1.1; proxy_set_header Connection keep-alive; }
Then reload the service
sudo nginx -s reload
© 2025 All Rights Reserved. version 0.0.0.0 74736391