This is a small game buzzer system for use with PowerPoint and smartphones. It can be completely customized to your own needs.
The system makes use of multiple platforms:
- NodeJS for server hosting: server.js.
- Web for clients: sender.html.
- Python for receiving signals: receiver.py.
- Visual Basic for applications (VBA) for interactions with PowerPoint.
It turns any smartphones with a modern browser into a live game buzzer, activated simply by touching the screen.
- NodeJS: Install
ws
andjs-sha256
. - Python: Install
pywin32
andwebsockets
. - Web: Install and configure any functional HTML web server.
- PowerPoint: Enable the VBA feature.
- Generate and place client keys into getHash.js to retrieve their hashes. Client keys are simply any strings of text.
- Place the hashes into server.js accordingly.
- Place the receiver's client key into receiver.py.
- Set the server's port in server.js.
- Set the server's address in receiver.py and sender.html.
- Run server.js using NodeJS.
Note: If you are planning to use the system in the local network, you can check your computer's IP address in Task manager → Performance → Network. Other devices in the same network can access your server through that IP.
- Open Buzzers test.pptm. Enable its macro contents, they are safe and do not control anything outside of the PowerPoint presentation itself. You can feel free to check if you want to be absolutely sure.
- Put a sound file named buzzer.wav (or another name as long as you change it accordingly in receiver.py) into receiver.py's folder. This sound will be played when a buzzer is activated.
- Run receiver.py.
- Put sender.html into your web server. You can rename it, for example to index.html for easy access.
- Get any device with a modern browser and if you plan to run in a local network, connect it to the same network as your server.
- Use the browser to access sender.html in your web server.
- If the screen is red, the device failed to connect to the NodeJS server; fix the problem and reload the page. If it is yellow, it has successfully connected; enter the client key as instructed on the screen. If the screen turns green, then you can proceed to the next steps.
- Repeat steps 2; 3 and 4 to connect more buzzers.
- Put the PowerPoint presentation into slide show mode. Click the Reset button. Try activating a buzzer. If the buzzer's corresponding slot lights up and the buzzer sound plays, then you have set up everything correctly.
The Buzzers test.pptm presentation, as the name suggests, acts as a test, but you can use it in production. If you want to implement it into your own presentation, here is how:
- In a slide, create shapes named "Team 1 buzzer", "Team 2 buzzer",... "Team n buzzer", where n is the number of buzzers you want.
- Copy and paste the VBA code from VBACode.vb into a VBA module in your presentation.
- To reset the system, run the macro
BuzzersResetAll
. You can link an action button to it. - Perform similarly to Setup buzzer devices to test the system.
When a buzzer is activated, the corresponding slot will change color and the sound will play. From that point until the system is reset, activating buzzers won't do anything, thus in a race, only the quickest gets the chance/point.
The MIT license
Copyright © 2019 Le Duy Quang.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "software"), to deal in the software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, and to permit persons to whom the software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software.
The software is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
OKay.....i have the feeling I don't understand anything !!:-(
I've the server.js in C:\Users\Steven\node_modules and started it with "node server.js" in the node command prompt.
The receiver.py is saved in C:\Python310\Lib an i started it with the anaconda terminal with "python receiver.py" an i git the following fault:
(base) C:\Python310\Lib>python receiver.py
Traceback (most recent call last):
File "receiver.py", line 16, in
import asyncio
File "C:\Python310\Lib\asyncio_init.py", line 8, in
from .base_events import *
File "C:\Python310\Lib\asyncio\base_events.py", line 18, in
import concurrent.futures
File "C:\Python310\Lib\concurrent\futures_init_.py", line 8, in
from concurrent.futures.base import (FIRST_COMPLETED,
File "C:\Python310\Lib\concurrent\futures_base.py", line 7, in
import logging
File "C:\Python310\Lib\logging_init.py", line 26, in
import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
File "C:\Python310\Lib\re.py", line 336, in
import copyreg
File "C:\Python310\Lib\copyreg.py", line 43, in
pickle(type(int | str), pickle_union)
TypeError: unsupported operand type(s) for |: 'type' and 'type'_
If I started this in node-modules, there is the fault, that websockets is not available.....
Did I do everything wrong ?? SO can you help me please ?? :-))
Greets Steven