Commit 89ae3b67 authored by Lky's avatar Lky

setup panel basics for button controls - part1

parent c4152da3
......@@ -596,6 +596,43 @@ void ofApp::updateArduino(){
list_of_buttons[3].clickCount++;
}
// START - STOP button
if (list_of_buttons[0].isPressed) {
if (hap_ch1.isPlaying()) {
hap_ch1.stop();
}
else {
hap_ch1.play();
}
}
if (list_of_buttons[1].isPressed) {
if (hap_ch2.isPlaying()) {
hap_ch2.stop();
}
else {
hap_ch2.play();
}
}
if (list_of_buttons[2].isPressed) {
if (hap_ch3.isPlaying()) {
hap_ch3.stop();
}
else {
hap_ch3.play();
}
}
// START AGAIN CHANNEL
if (list_of_buttons[3].isPressed) {
hap_ch1.setFrame(0);
}
if (list_of_buttons[4].isPressed) {
hap_ch2.setFrame(0);
}
if (list_of_buttons[5].isPressed) {
hap_ch3.setFrame(0);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment