Multiple LEDs: Project 4
Goal:
Connect 8 LEDs and play with various sequences through different sets of code
Materials:
8 LEDs
8 330 ohm resistors
10 jumper wires
Procedure:
1. Assemble the circuit
I'm moving away from assigning specific spots
and giving a general pathway.
jump each pin to the + lead of the LED →
the - lead of the LED → resistor
the resistor → - channel
Pin 2 → +LED - → resistor → "-"
Pin 3 → +LED - → resistor → "-"
Pin 4 → +LED - → resistor → "-"
Pin 5 → +LED - → resistor → "-"
Pin 6 → +LED - → resistor → "-"
Pin 7 → +LED - → resistor → "-"
Pin 8 → +LED - → resistor → "-"
Pin 9 → +LED - → resistor → "-"
jump "-" → GND on the Arduino board
jump "+" → 5V on the Arduino board
2. Write the code
Note the full code is found in the 12 Circuit USK Guide Codes.
Below is a snapshot of the general code being run. An array, int ledPins[ ], is used to cycle through the positions it assigns to each pin. Documentation and Reference site
The loop has six different commands that can be activated by removing the comment slashes, //. After the "void loop( )" command, there is a separate set of code for each of the commands:
oneAfterAnotherNoLoop( )
oneAfterAnotherLoop( )
OneOnAtATime( )
pinPong( )
marquee( )
randomLED ( )
More information on the, for ( ), loop that was used: Documentation and Tutorial
3. Upload and test it all
Reflection
This week as I was going through the motions of writing up
the process of project 4, I had a breakthrough. I've made
minor changes to the position and color of various components. This week the wiring directions were a bit involved if you included every precise position.
Connect 8 LEDs and play with various sequences through different sets of code
Materials:
8 LEDs
8 330 ohm resistors
10 jumper wires
Procedure:
1. Assemble the circuit
I'm moving away from assigning specific spots
and giving a general pathway.
jump each pin to the + lead of the LED →
the - lead of the LED → resistor
the resistor → - channel
Pin 2 → +LED - → resistor → "-"
Pin 3 → +LED - → resistor → "-"
Pin 4 → +LED - → resistor → "-"
Pin 5 → +LED - → resistor → "-"
Pin 6 → +LED - → resistor → "-"
Pin 7 → +LED - → resistor → "-"
Pin 8 → +LED - → resistor → "-"
Pin 9 → +LED - → resistor → "-"
jump "-" → GND on the Arduino board
jump "+" → 5V on the Arduino board
2. Write the code
Note the full code is found in the 12 Circuit USK Guide Codes.
Below is a snapshot of the general code being run. An array, int ledPins[ ], is used to cycle through the positions it assigns to each pin. Documentation and Reference site
The loop has six different commands that can be activated by removing the comment slashes, //. After the "void loop( )" command, there is a separate set of code for each of the commands:
oneAfterAnotherNoLoop( )
oneAfterAnotherLoop( )
OneOnAtATime( )
pinPong( )
marquee( )
randomLED ( )
More information on the, for ( ), loop that was used: Documentation and Tutorial
3. Upload and test it all
This week as I was going through the motions of writing up
the process of project 4, I had a breakthrough. I've made
minor changes to the position and color of various components. This week the wiring directions were a bit involved if you included every precise position.
I tried to come up with a more streamlined method
when it hit me. That's what the wiring diagram/
schematic is telling me; the basics of the flow without
getting bogged down in the exact a4, h5 spots.
The journey continues as I return to my journal
and begin to plan my first independent project.
I am both excited and apprehensive. But I will
apply a maker attitude and see what I can have
fun playing around with.
The journey continues as I return to my journal
and begin to plan my first independent project.
I am both excited and apprehensive. But I will
apply a maker attitude and see what I can have
fun playing around with.
Comments
Post a Comment