1. Ideation and planning
We first started off mapping out the interactions among the devices. We drew a diagram of the interaction between the sensor and three devices (Neopixel, Servo and Piezo). Based on the feedback we received, we switched our sensor from a touch sensor to a pressure sensor. For this prototyping stage, we decided to keep the switch we currently have in order to perfect the interaction prototype first.
2. Build the circuit and pseudocode
The first requirement we fulfilled was planning how the Neopixel, Servo, and Piezo would receive and process the input from the pressure sensor. We discussed several methods we could potentially take; one option was to have every pressure input publish an event which triggers interactions of the devices, and another option was to have one device count the number of high-fives and publish the number to other devices. At last, we came to a conclusion that it is most effective and efficient in terms of the process operation and our team collaboration if we have the Piezo be the only one to receive the signals from the sensor, and publish for other devices to respond.
3. Coding and build individual devices
We took a 'divide and conquer' approach for this step. We each worked on our device to create the interactions we were envisioning.
Neopixel: When it receives the signal from Piezo, Neopixel counts the number of signals, and based on the counts it displays different colors. We envision that the 'Love O'Clock' would mean having at least 1 million people's high-five's. However, for the convenience of this prototyping process, we decided to reduce the number to 15 to effectively test the interactions.
Servo: Likewise, Servo would also receive the signals from Piezo and count the number of signals. At every count, Servo would move 24 degrees clockwise to accord with the 15 LED lights on Neopixel (= 360 degrees/15 LED lights). The challenge we faced with Servo, however, is that Servo does not rotate full 360 degrees, and its maximum rotation range is 180 degrees only. Hence, for this stage, we coded the Servo to reverse back to the starting point once it reaches the 180-degree limit.
Piezo: Piezo senses the signals from the pressure sensor (in this current stage, pushdown button). Based on the number of counts, Piezo plays different sounds. At every high-five, Piezo beeps once, and at every quarter it plays different melodies. We utilized the notes of the Westminster clock, which signifies the time progression through the completeness of the melody it plays.
4. Paired 3 devices
Our devices were paired from the beginning, but we still had some fine-tuning left to coordinate the three devices' interaction together. We confirmed that each device successfully fulfilled its task individually upon the signal the Piezo receives from the push-down button.
5. Adjust and test code
We have been continuously adjusting our codes to fine-tune the interactions of the devices. We have yet to improve on the consistency of the workings of these devices at an individual level and at a group level. We will continue to work on this for the next week and complete our project.