When you open your kit up you will notice a few different objects inside. The first one I want you to turn your attention to is the breadboard.
The breadboard is a construction base for making an experimental model of a circuit.
The red and blue rows are called “busses”
The blue rows are connected to (-), ground.
The red rows are connected to (+), power, 5 volts.
They don’t have to be used, but it makes it easier to manage your wires
Notice how there are lines connecting the blue, red, and grey dots together. These lines (or terminal strips) are connected electronically, meaning electrical current passes through each strip.
Take a look at this broken breadboard below. There are a few pieces that fell out, hence broken, but anything connected by the metal on the back will be a part of the same circuit.
The next object I want you to turn your attention to is the Arduino microprocessor itself. We are going to be using the Arduino processor below, but it is essentially the same as an Arduino Uno processor.
Before you do anything, for the rest of your life, remember that all circuits are circles, connecting start to finish in a continuous loop where every component relies on the seamless flow of energy to function as a whole. When you are building your circuit, make sure there is a start, and your circuit eventually leads to the end (which is often the ground).
You can choose to fasten your Arduino and breadboard to its holder, or you can choose to work with them separately. Depending on your kit they may already be fastened for you.
Now we will begin to build our very first circuit!
What You Will Need:
1 long red wire
1 long black wire
A few short solid core wires of varying length. You will only need to use one, but variety is the spice of life.
1 LED (any colour)
1 220-ohm resistor
LED stands for Light Emitting Diode. It is a light that allows electricity to only flow in one direction (from + to - ). MAKE SURE YOU REMEMBER IT FLOWS FROM POSITIVE TO NEGATIVE
When you are wiring your circuit make sure you allow the electricity to flow from the anode, which is the longer end, through the LED and out the cathode, which is the shorter side.
Resistors resist the flow of electricity through your circuit. The 5V output from the Arduino through the LED will produce a current that is too strong and will fry the LED unless enough resistance is provided. It is important that you always use proper resistance when building circuits, not only for the longevity of the components, but for your safety as well.
Resistors are colour coded. A 220-ohm resistor has the following bands:
Red – Red – Brown – Gold
Building the Circuit:
Connect one of the GND pins to the (-) on the breadboard using a black wire. Although every colour of wire will function the same, we reserve black wires to represent a ground wire.
Connect Pin 12 to one of the rows on the breadboard using a red wire. In this example row 6 was used, but there is nothing special about that selection. Again every wire will function the same, but red wires represent power. Pin 12 will be providing the power to the LED
The board will get power from the computer through the usb cable. DO NOT make changes to your circuit with the power on!
Next we will connect the rest of the circuit. Remember to have the electricity flow from anode (positive longer end) to cathode (shorter negative end) as well as a resistor. If you are unsure ask!
Once your circuit is wired you can begin to write the code.
Writing the Code:
Turn on your computer and locate the Arduino program on your desktop. If you haven't installed it yet, click here for the download link.
Copy the code below:
Some more coding notes:
Command lines end with a semicolon;
Capitalization and spelling matter for key words.
Punctuation matters! ; {} () - you will get the hang of this
Blank spaces and blank lines don’t matter. Use this to make your code easier to read.
Click on the checkmark in the top left of the Arduino window to Verify your code.
If you have errors, it will often tell you the wrong line in the error message. The error is often in a line before the one the program indicates!
Everything above you see that's gray, those are called comments. They aren't executed when the code is run - it is just their to leave notes for the coder or anyone reading the code. You make comments by putting the 2 slashes //
Once you have coded your program successfully plug in your Arduino using the USB cable provided.
When you plug in your Arduino it may install the driver and connect to a specific COM port. In the Arduino program go to Tools -> Port and select the one that is connected to the Arduino. You may need to unplug and plug your Arduino in a few times to make it appear. Chromebooks generally seem to have the most issues with this.
When you click on the upload arrow (top left corner) it will copy your program to the Arduino.
Congratulations! You have just created your first electronic circuit. Make sure you show me your blinking light so I can mark in on the checklist.
You are now done the assignment! Getting this far will have awarded you 50% provided that all of the criteria has been met.
Program ran as expected:
Total:
Extension 1:
Extension 2:
Total:
50%
50%
20%
30%
100%
Extension 1
You will need more wires and 1 more LED. Wire and program your Arduino to have two blinking LEDs that alternate being on and off for one second at a time. When one LED is on the other has to be off.
You must show your teacher the circuit in action and submit the code.
Extension 2
You will need a third LED. Wire and program your Arduino to have the three LEDs blinking in a pattern. Only one LED may be on at any given time.
You must show your teacher the circuit in action and submit the code.
When you are ready to submit your project, submit your code and pictures of your project to Google Classroom under Project 1.
YOU MUST SHOW ME YOUR PROJECT BEFORE YOU SUBMIT IT!