Now after we saw the prototype work with a song, some issues came up. We needed the samples to play as long as the user wants, and what we have currently allows the user to play a certain instrument only as long as they hold onto the cable dedicated to the certain instrument. Basically, it plays as long as the sensor is sending a “1” and the moment you drop it it sends a “0”.
I talked with the others about the the UI/UX and concluded that what was needed was for the sensor is to remain on “1” once touched and then go to “0” on the next touch. It is literally what is sounds like – a normal switch we have in all of your room for eelctric bulbs.
This was quite the problematic task for me, because of the fact that we were using code from a library example in order to initalize the capacitive sensor because it was way too hard for me to write on my own and even teachers had problems understanding what everything does in the original example.
My two days of struggle were solved by Douwe, who basically wrote my code, because I had already lost any hope or idea what to do. I did a lot of research on toggling normal pushbuttons, but the mpr121 was a much more complicated case because it was dealing with a lot bitwise operators that I had no idea how to handle and if I have to be honest, I probably wouldn’t have been able to do on my own.
Leave a comment