GMU:My Computer, Max, and I/Kaël Skyhawk Hauptmann: Difference between revisions

From Medien Wiki
Line 54: Line 54:
Although, my drum piece was working, I found out when attaching the second sensor that my hardware setup was wrong. I had the circuit connect only through the analog input and ground, so I needed to connect to the 5V to create a true circuit. I did that and then I added the second sensor data to Arduino code and cleaned up the code. The only issue that I'm still dealing with is the values given from the sonsors. For some reason, when I add a second sensor to Arduino, one of the sensors always outputs variable data above 0 when it has not been triggered.
Although, my drum piece was working, I found out when attaching the second sensor that my hardware setup was wrong. I had the circuit connect only through the analog input and ground, so I needed to connect to the 5V to create a true circuit. I did that and then I added the second sensor data to Arduino code and cleaned up the code. The only issue that I'm still dealing with is the values given from the sonsors. For some reason, when I add a second sensor to Arduino, one of the sensors always outputs variable data above 0 when it has not been triggered.


[[File:kael_arduino_2_sensor_1.jpeg|400px]]
<gallery>
[[File:kael_arduino_2_sensor_2.jpeg|400px]]
File:kael_arduino_2_sensor_1.jpeg
[[File:arduino_2_kit.png|400px]]
File:kael_arduino_2_sensor_2.jpeg
[[File:arduino_output_2.png|400px]]
File:arduino_2_kit.png
File:arduino_output_2.png
</gallery>


=== Adding Second Drum Piece to Max/MSP ===
=== Adding Second Drum Piece to Max/MSP ===
The most difficult part of this was trying to separate the data from each of the sensors. Initially, I tried an unpack, but that was unsuccessful. Luckily, with the help from class, I rewrote the Arduino code, as shown above, and was able to separate the sensors. Once, that was done, it was not difficult to add the next drum piece.
The most difficult part of this was trying to separate the data from each of the sensors. Initially, I tried an unpack, but that was unsuccessful. Luckily, with the help from class, I rewrote the Arduino code, as shown above, and was able to separate the sensors. Once, that was done, it was not difficult to add the next drum piece.


[[File:max_2_drum.png|400px]]
<gallery>
File:max_2_drum.png
</gallery>
 


Here is the coding for Arduino and Max/MSP:
Here is the coding for Arduino and Max/MSP: