This repository contains the code for an interactive installation displayed at Accenture Song Designs Fair(tm) 2022. Participants were able to interact with a bust by putting their badges (which contained a NFC sticker) into it's mouth. There, a Raspberry Pi equipped with a NFC reader would trigger a change in the animation displayed on a large beamer. IT WAS AWESOME 🔥🔥🔥
Microcontroller: https://www.raspberrypi.com/products/raspberry-pi-4-model-b/
NFC Reader: https://www.waveshare.com/pn532-nfc-hat.htm
The server
folder contains the backend code, written in python. Here we do 3 things:
- Establish the connection to the NFC HAT
- Serve the content within
client/dist
- Use socket-io to inform the frontend whenever an NFC tag has been detected, by sending over that tags UID.
Found in the client
folder.
Based on React & Typescript. Bundled with Vite. Made cool with P5.js
- In the
client
folder runnpm i
, thennpm run build
- In the
server
folder, install the packages needed withpip3 install -r requirements.txt
(ideally within a venv) - In the
server
folder runpython3 server.py
and navigate to $YOUR_LOCAL_IP:8080 (only tested in chrome) - Since you are probably running this on a mac/windows machine, keyboard simulation will be activated since the NFC HAT is not available. Press
shift
to send out an ID from the backend and marvel at the changes you see in the frontend. - Alternatively, press
D
to open the debug menu and play with the modifiers. Pressc
to clear local storage and reset everything.