Do Good Project Week 9 : Prototyping (Experimentations & Failure) - Set timer & Multiple LED arrays
Technical Tryout
Without further ado, I continue the prototyping this week. I try to explore the Timer in p5.js as I'm still unsure with the execution part but I'm just trying on exploring some technical knowledge. The timer is used for playing the next narration after one is completed.
Besides that, there are some problems that occurred after connecting p5 and Arduino. Some light effects couldn't loop and were detected by the Arduino. I take some time to amend some light effects to make sure everything works fine.
Problems
I also explored attaching multiple LEDs strips on different pins. It works well when the same light effect when played at the same time. However, when two different light effects are playing at the same time, it doesn't work. It only will play light effect 1 on LED strip 1 and continue on light effect 2 on LED strip2.
Another problem is that I try to combine Arduino, p5.js, and teachable machines on a sketch. Teachable machine is a machine learning that could interpret sound, images, and poses. I have re-recorded the samples of intonations as the intonations that are detected by machine learning are not sensitive enough. Initially, I have separated the intonations into falling, rising, and neutral. In this case, I have cut down the intonations to falling and rising. In simpler words, it can be called happy and sad intonations. I have taken off the neutral intonations as I feel it's not necessary.
I'm using clap and ring as the sound sample at first. When I change between clapping and ringing, the light effect doesn't work immediately. Thus, I have consulted the lecturer, and I was told to attachInterrupt() to interrupt data A when data B is sending.
Here are some screenshots that I have tried when exploring around the light effects:
Sources
Shiffman, D. (n.d) Timer. Available at: http://learningprocessing.com/examples/chp10/example-10-04-timer
Using Timers in p5.js. Available at: https://forum.arduino.cc/t/loop-code-inside-switch-case/352649/10 -looping
Comments
Post a Comment