JotaEfe13
Well-known member
Hi. In my project I have currently 8 tact switches connected directly to my Teensy 3.6 and I am using the Bouce library and its fallingEdge() method for a quick response of the buttons being pressed.
Is it possible to use the Bounce library with the mux? I have searched in the forum and in the web but I have not found any reference to this.
I have a 74HC4051E mux and I want it to control the 8 buttons. For the hardware hookup I have followed the section "Connecting Many Buttons & Knobs/Sliders" here, but I don't know how to implement the proposed code.
How can I use now something like this?
Is it possible to use the Bounce library with the mux? I have searched in the forum and in the web but I have not found any reference to this.
I have a 74HC4051E mux and I want it to control the 8 buttons. For the hardware hookup I have followed the section "Connecting Many Buttons & Knobs/Sliders" here, but I don't know how to implement the proposed code.
Code:
// select 74HC4051 channel 5 (of 0 to 7)
digitalWrite(1, HIGH);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
// allow 50 us for signals to stablize
delayMicroseconds(50);
// read the signals routed to pin 10
// through channel 5 of each 74HC4051 chip
buttonPin10channel5.update();
How can I use now something like this?
Code:
if (buttonMenu.fallingEdge()) {
// do something
}