/* Fairly Simple Simon wiring checker Analog version!!! LEDs should only be on PWM pins! The FSS is a simple board with 4 leds and 4 normally-closed switches (each led goes via a 150Ohm resistor, and each switch has a 10KOhm pull-resistor connecting between the output and ground). The following jumpers come out of it: +5V, Ground, 4 switch jumpers and 4 LED jumpers. This tool helps you check that all is connected correctly, and sort out between the jumpers (it's easy to tell between LED and switch jumpers because they come from different parts of the board, but this tool can help you tell which LED/switch is which) With the Arduino running this: * Connect the switch jumpers to SWITCHPINS (otherwise, LEDs will act funny). * Take a LED jumper and connect to one of the LEDPINS. Now that you know which LED is on, connect the jumper to the corresponding LEDPIN. Repeat with all LEDPINS * Push a switch. One of the LEDs will blink. If it's not the one associated with the button, replace LEDPINS between where the button's jumper is and where it should be. Fault detection tips: * If a LED is constantly off, there's a problem with the wiring of the LED+resistor * If a LED sometimes blinks and sometimes doesn't, there's a problem with the wiring of the corresponding switch+pull-resistor * If all LEDs blink, check the +5V jumper :) Created by @TheRealDod Nov 8, 2010 */ const int NLEDS = 4; const int LEDPINS[NLEDS] = { 3,5,6,11}; // Need to be PWM pins! const int SWITCHPINS[NLEDS] = { 8,9,10,12}; // skip 11 because we need it as a PWM LED pin const int DELAY = 100; int blinkState = HIGH; void setup() { //Serial.begin(9600); for (int i=0 ; i