The purpose of this project is to be able to control a software like Resoume that can receive OSC input using a hardware device. For this, I have used a cube with 6 NFC tag stickers, an RC522 NFC reader and a NodeMCU-ESP32 controller, but you can use any Arduino-compatible WiFi-enabled board.
The building is pretty simple: you have to solder the wires from the NFC reader on to the NodeMCU board. Then you have 3 steps to take for the software to match your needs:
1. Read your NFC tags with your new NFC reader and using the Serial monitor of Arduino IDE, note down each tag ID. (The code already logs any NFC ID detected.)
2. Create a list of OSC addresses that you need to access on each tag detection. In my case, I used latest version of Resolume and controlled the play of columns (for those used with Resolume).
3. Modify the code so that upon detection of a certain NFC tag, a certain OSC command is sent. (Use the comments to figure out where to put what.)
You can use this in 2 ways:
1. Use the ESP32 as an access point and create a new WiFi network to which you can connect a computer and then things are simple: the first connected device will always have the first ip in the range so no other set up is needed.
2. Use the ESP32 to connect to an existing WiFi, in which case you will have to hard code the IP of the computer to which you want to send the commands in the code.
Both versions are available in code.
I have used a small battery pack to power all up and worked excellent for almost 12 hours. For longer times, you can use a bigger battery or just switch it with a recharged one.
If you don't have your ESP 32 board installed on Arduino IDE, you can follow this tutorial: https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
You will also need to install these libraries on Arduino IDE: MFRC522 and Arduino OSC by hideakitai.
Comments