In-Class Exercise: Network Party¶
Objective: use tactile user interfaces to generate a group graphical composition in real time over the network.
Pre-requisites¶
The following assumes you have:
completed Exercise: Tactile Interface and have a working device
installed Python 3 with extra libraries as per Python 3 Installation
have downloaded and tested Arduino-MQTT Bridge (PyQt5)
have downloaded and tested MQTT Plotter (PyQt5)
Preparation¶
Prior to class:
Please download RemoteUserInterface Arduino Sketch and customize it for your device.
I recommend first testing it using the Arduino IDE Serial Plotter.
Please adjust the mapping and scaling of your inputs to achieve a continuous range of outputs between 0 and 100 on the first two channels X and Y. These will be used to control your particle position.
You may adjust the mapping of the remaining R G B values as you wish to control the color. If you prefer a constant color, constants are acceptable.
Once your mapping is established, please test sending data to the MQTT server using the bridge program running on your computer.
Please note you will need to close the Arduino IDE Serial Plotter and Serial Monitor before the bridge program will be able to connect to your Arduino. Only one application can open the serial port at a time.
To visualize the outcome, please simultaneously run the plotter application. It will plot all live data, including anyone else testing simultaneously.
Please have your device ready to use before class starts, including both the hardware and the bridge program.
During Class¶
We’ll try the following procedure during class:
We’ll check that everyone is streaming data to the server.
Your instructor will show the plotter graphics using the videoconference. Anyone else is also welcome to run the plotter program locally.
We’ll try to control the display to create some deliberate effects.
If needed, students may wish to make minor adjustments to their Arduino sketch.
We’ll collaborate on inventing a simultaneous multi-player game.
Deliverables¶
After class, please submit to Canvas:
your customized Arduino sketch uploaded as a single .ino file
Note: please your name as a prefix on the filename for all files uploaded to Canvas. This will help me greatly keeping them sorted out during my review. E.g., I might name my own files as “Garth-project.mp4” or “Zeglin-tactile.ino”.