Search results

  1. D

    Using a 4051 to read buttonstates

    I have tried a few different methods (bounce update, and boolean) to digitalwrite to a specific pin on the 4051, and then read the in/out pin to see when the button has been pressed. but it has not worked... I found this helpful tutorial - http://www.gammon.com.au/forum/?id=11976 but I cannot...
  2. D

    Using a 4051 to read buttonstates

    Hey PAul, thanks for the reply. I was aware of the limitations regarding the 4051 driving outputs, and so perhaps I wasn't clear in the first post. I won't have any leds on the 4051 pins, but rather the switches solely, driving the leds on teensy pins. It's a tight fit but I think i will be...
  3. D

    Using a 4051 to read buttonstates

    I have researched widely on the 4051 multiplex chip on the internet, and found some useful info. But I have not been able to deduce a code that fit's my needs. I am trying to use the 4051 to read eight buttons (momentary switches), and then write to led's depending on the buttons latest...
  4. D

    Button State controlling other functions of buttons

    int bank = PIN_B2; int button3 = PIN_B3; int ledPin4 = PIN_B4; int ledPin5 = PIN_B5; int ledPin6 = PIN_B6; int mode = 0; boolean reading2 = false; boolean reading3 = false; boolean reading3b = false; void setup() { pinMode(PIN_B2, INPUT_PULLUP); pinMode(PIN_B3, INPUT_PULLUP)...
  5. D

    Button State controlling other functions of buttons

    Well, I feel like I have tried this in numerous ways, and Paul's thought to use the 'mode' variable scope tack seems to be the best route, but I am still not getting the results I seek. I have tried adapting the 'working' code from the top here to use along with the mode variable. But the...
  6. D

    Button State controlling other functions of buttons

    or couldn't I just use the state of 'bank' to act like the mode - if (state2 == HIGH) { //do whatever button3 does in normal mode } else { //do whatever button3 does in altered mode } ?
  7. D

    Button State controlling other functions of buttons

    hmm, well this seems to work up until I try to get the leds to join in... I got the one switch to act as a bank just as you offered, (changing button 3's actions) and the corresponding 'bank' led lights up and turns off as expected, but the button3's corresponding leds won't act appropriately...
  8. D

    Button State controlling other functions of buttons

    Hello teensy gang! I have a keyboard foot controller project that I have been working on, but I hit a problem... I want to have 12 buttons and two leds for each button, and then one other button (with one, or two, leds). The last button I want to act as a 'bank switch', so that it changes the...
Back
Top