You are reading a single comment by @mattbrailsford and its replies. Click here to read the full conversation.
  • Hey Guys, so if you've seen any of my other posts on the forums, you'll know that I've now switched out the display for an Adafruit 8x8 BiColor matrix. The benefits are two fold. 1) it has more colours and 2) it has an in-built oscillator so there is no need to keep updating it row by row, instead I can just send it a picture to draw, and it'll keep drawing it till you tell it otherwise. This should hopefully take a lot of pressure off the Espruino.

    So, I'm now playing with wiring up the buttons. I did some initial tests a while ago and could detect the buttons, however on playing with it today, there does seem to be some issues. Looking at the wiring, all the buttons are wired:

    3.3v ADC PIN > BTN > Grnd
    

    Now, when I setWatch on the buttons like so:

      setWatch(function(){ console.log("UP"); }, UP, { repeat:true, edge:'falling', debounce:10 });
      setWatch(function(){ console.log("LEFT"); }, LEFT, { repeat:true, edge:'falling', debounce:10 });
      setWatch(function(){ console.log("RIGHT"); }, RIGHT, { repeat:true, edge:'falling', debounce:10 });
      setWatch(function(){ console.log("DOWN"); }, DOWN, { repeat:true, edge:'falling', debounce:10 });
      setWatch(function(){ console.log("START"); }, START, { repeat:true, edge:'falling', debounce:10 });
    

    I do get the words printing to the terminal, but I also get them printed quite a few times after letting go of the buttons (my initial thoughts were just to do with debounce, but as you can see, that is set). And more weird, the start button (which is a differen type of button to the up/down/left/right ones) will trace just by touching the metal casing on the button.

    Would I be right in assuming then this sounds like a case of needing a pullup/pulldown resistor? if so, which kind would I need in this situation? and any suggestions on where best to wire them? (I wanna try and keep the gamer as stock looking as possible). If this isn't the issue, has anyone got any suggestions on what it might be?

    Many thanks

    Matt

About