Please watch the following video if you are completing the course digitally
Please watch the following video if you are completing the course using physical components
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
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. There are two different looking Arduino processors that we use in this class. The blue Arduino UNO’s and the red RoboRed Arduino. Both microprocessors will work the exact same so it does not matter which one you picked.
Arduino UNO
RoboRed
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 - ).
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.
Our first program:
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!
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. Because computers.
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.
Before you are done the assignment please leave a multi-line comment with questions that you have about this process. You only need to ask a minimum of one question, but the most common questions will be addressed in class.
You are now done the assignment! Getting this far will have awarded you 60% provided that all of the criteria has been met.
Scoring
Program ran as expected 50%
Minimum of one question using multi-line comment 10%
Total: 60%
Extension 1: 20%
Extension 2: 20%
Total: 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.