Single switch input

This tutorials covers the following topics;

  • Using a digital (discrete) input with the PICAXE
  • Alternating between modes with 1 switch
  • Using SELECT CASE aurguments

Discription

This circuit is configured to have one input via a momentary switch with four outputs via LEDs. A momentary switch is one where the contacts in the switch are only joined/separated for the period of time the switch is pressed, as soon as it is depressed the switch returns to its initial state. The switch that is used in this tutorial is a micro-switch (pictured below).

Although only one input and four outputs are used in this tutorial, the 18X micro-controller can have up to 4 inputs and up to 8 outputs.


This tutorial will be using the PICAXE developer board (shown right), which has all the required auxilary connections such as the programming jack, serial in resistors, reset button + resistor, etc


Whats required for the tutorial;
  • Battery Pack
  • PICAXE 18X developer board with PICAXE 18X
  • 4 LEDs
  • Microswitch

Start the tutorial