3x3 LED Sweep

by PackJC in Circuits > Arduino

983 Views, 2 Favorites, 0 Comments

3x3 LED Sweep

4.6.png

In this Instructable I will be showing the steps and the code to build your own arduino based minesweeper!

THINGS YOU WILL NEED
1 X Arduino UNO R3

2 X Potentiometer

  • 1 x Button
  • 9 x LEDS
  • 10 x 220 Ohm Resistors

Positive and Ground Wires

1.png

BASIC SETUP

  1. Connect 1 jumper wire(red) to the + side of the breadboard to the GND port on the arduino
  2. Use another jumper wire(red) to connect to the other side of the breadboard on the + rail
  3. Connect 1 jumper wire(black) to the - side of the breadboard to the 5v port on the arduino
  4. Use another jumper wire(black) to connect to the other side of the breadboard on the + rail

Add Potentiometers

2.png

  1. Connect both positive and negative sides to the equal rail on the breadboard
  2. Connect the first potentiometer to pin A1, the second to pin A2

Add Button

3.png

  1. Connect positive to one of side of button
  2. Connect 220 Ohm resistor to the other pin on the same side as positive
  3. Connect a ground wire from the GND rail on breadboard to the resistor
  4. Connect pin 13 on arduino the button side opposite from the ground

Add LEDS

4.1.png

Add 9 Leds just like in the picture above. Make sure they are just like this for easier wiring. Notice how the LEDs are lined up so that all the ground sides touch, and the other side is ready for a pin to be connected

4.2.png

Connect a ground wire to the 3 negative rails connected to 3 LED Columns

Add Resistors

4.3.png

Add the resistors to each of the positive sides of the LEDs, you'll add 9

Connecting the First 3

4.4.png

Connect all of these

  • Pin 4 is ;ast Red LED
  • Pin 7 is last Green LED
  • Pin 1 is last Blue LED

Adding 3 More LEDs

4.5.png

Connect all these

Port 3 goes to the middle Red LED

Port 6 goes to the middle Green LED

Port 9 goes to the middle Blue LED

Adding Last LEDs

4.6.png

Connect these

Pin 2 to first Red LED

Pin 5 to first Green LED

Pin 8 to first Blue LED