Adding a new button (tactile switch) to Puck.js?

Posted on
  • Hi, I am interested in adding a new push button (tactile switch) to the Puck.js. My idea:
    I would like to add a button. When the user presses this button, a action should be startet (e.g. a message should be send via bluetooth). Unfortunately I am not sure how I can solder it to the Puck.js. The most tactile switches have 4 "legs" to solder (e.g. https://bit.ly/2BTSErG).

    Do I have to solder the tactile switch directly to the Puck.js or is there a possibility to solder one end of a connector (e.g. an extension cable) to the Puck.js and the other end to the tactile switch? It would be perfect if the position of the switch is not fix.

    Where should I solder the switch (or maybe the connector) and which tactile switch do you recommend? Simply to the GPIO pin? And do I need a resistor or something like that to get it work?

    And can I really snip of two diagonal pins of the tactile switch?

  • This might be some help: http://www.espruino.com/Pico+Buttons#sof­tware-external-button

    2 of those 4 legs of the buttons are just shorted to the other 2, so can be ignored.

    can I really snip of two diagonal pins of the tactile switch?

    Yes, you can - or you can remove two on one side.

    However if you search for 6x3mm tactile you can find smaller 2 wire through-hole buttons like https://www.ebay.co.uk/itm/30x-Momentary­-Tact-Tactile-Push-Button-Switch-2-Pin-D­IP-Through-Hole-3x6x4-3m-Jt/123623523055­

    You can solder the switch more or less anywhere. One side needs to be a GPIO, and the other side can be GND, 3v, or a GPIO. The metal case of the Bluetooth module is also GND so you can use that if you need to.

    There's no need for a resistor as you can use the chip's internal pullup resistors (shown in that link I posted)

  • I got it to work. Great work. =) Thanks.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Adding a new button (tactile switch) to Puck.js?

Posted by Avatar for MobiTech @MobiTech

Actions