Xtreme STEM
DashX

RoboBloX

ButtonBlock

ButtonBlock

Theory

A button is a type of switch. When pressed it closes the circuit allowing current to flow.
The button is connected to GND (ground) and Signal, when the button is pressed we say the input is "pulled low", when the button is released a resistor inside the arduino "pulls the input up".

Assembly

  1. Materials Required




    • 1 Button
    • 1 Brick (2x2)
    • 1 Cable (2 Wire)
    • 1 Connector (3 Pin)
  2. Wire
    Cut Wire
    Cut both connectors off ONLY ONE end of the cable
  3. 2x2 BlockDrill
    Drill a 3mm hole in the side of the 2x2 Block
  4. Top holes
    Drill four 2.3mm holes in the top
  5. wires
    Pull the wires through the side hole
  6. wiresWire
    Push the two ends through the two top holes shown in the picture
  7. Wire
    Strip about 1 - 2mm of plastic off the end of the wires
    Be careful not to damage the little strands of copper inside.
    Always use the correct hole size,
    and always pull straight (never at an angle)

  8. Button
    Solder the wires to the button
    (make sure to solder to legs on opposite corners of the button)
  9. Loop
    Loop both wires around opposite sides on the center post
    Pull the wire tight and the button down into the holes
  10. WireWire
    Use a pin to bend the little black plastic "tongue" up

    Wire
    Gently slide the plastic housing off the end of the wire

    Wire
    Remove both of the black plastic housings from the ends of the wires

  11. WiresWire
    Slide the wires into the new 3 pin plastic housing
    One wire on each side (no wire in the middle)

    Make sure you push the wires in until you hear and feel them click
    Gently tug on each wire to make sure it has clicked into the housing.
  12. ButtonBloX
    You're done, your ButtonBloX should look like this

 

Connection Diagram

The ButtonBloX can be connected to any Digital Pin
(D0 & D1 should not be used as they reserved for USB communication)
If it is connected backwards no damage is done, it works both ways.

 

mBlock

Hints

Button
Turns the LED on and off with the button

 

Advanced

Wait
Blinks the LED 3 times each time the button is pressed

 

LED
Turns the LED on and off with the button
(same thing as the first example, but in a different way)

Scroll to Top