04) Adding a button to the circuit

04) Adding a button to the circuit

Next step is that we want to control the Thing using a button, which mean that we want to control when the blinking starts

  1. Turn off Thing
  2. Remove USB from laptop
  3. Wiring up the Thing by adding to the existing setup: you need a Resistor(10k OHM, orange and brown), a button, and three extra wires
  4. Resistor goes from ‘-’ to ‘h25’ (to the right of the button)
  5. Button is placed so that it cross the board between ‘f25′-f27’ and ‘e25’-‘e27’
  6. Signal wire (green) goes from button right to Pin13 in Thing  – ‘g25’-pin 13
  7. Button right leg is connected to ‘+’ (‘g27’-‘+’)

  1. In Arduino IDE open File>Examples>02.Digital>Button sketch
  2. Save As … in your Desktop FemTech folder as Button. 
  3. Change “cont int buttonPin = 2;” to “cont int buttonPin = 13;
  4. Change “cont int ledPin = 13;” to “cont int ledPin = 14;
  5. Reconnect the USB to the computer
  6. Turn on the Thing
  7. Try to run the code and see what happens when pushing the button