148
edits
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
Although the knock test worked, I realized that I need to output the numerical data that the piezo sensor detects. Here is the coding and output: | Although the knock test worked, I realized that I need to output the numerical data that the piezo sensor detects. Here is the coding and output: | ||
[[File:kael_arduino_piezo.jpg|400px]] | |||
[[File:kael_arduino_output.jpg|400px]] | |||
== Creating Max Patch == | |||
For the Max patch, I needed to translate the data read from the sensor into one value. By using the message box, I was able to see the values that were output when I tapped the sensor. I created a range 0 to 300 and have it bang if the value is higher than 300, because the value when tapped is usually higher than 300. The bang triggers the on/off switch for the kick bass drum. I added a 300 millisecond delay to the bang to act as an off button so once the drum is turned on and produces a sound, it will then turn off. | |||
[[File:kael_arduino_piezo.jpg|400px]] | [[File:kael_arduino_piezo.jpg|400px]] | ||
[[File:kael_arduino_output.jpg|400px]] | [[File:kael_arduino_output.jpg|400px]] |
edits