Circuit: comes from root word circle, goes around and around, electricity flows like water. Requires the following 3 things: power (- & +), conductor, load.
Without a load, you've got a short circuit!
Your Arduino board:
There are several parts on the Arduino board, the most important parts that you will need to be familiar with right now are:
1. USB port: This is where you plug the usb cord in to connect the board to your computer, this is how you upload your code and it will also provide power to your board.
2. Barrel Jack: This is to provide power to your board from a wall wart (ac adapter) after you upload your code, you probably don't want it tethered to your computer anymore. You can use 5v, 9v, 12v to power your Arduino. An onboard voltage regulator will keep the board at 5v for you.
3. Reset button: This will start your code from the beginning, it does not delete or change your code. The only way to do that is to upload new code via USB.
4. LED indicators: One shows that the board is getting power, one shows when the board is receiving data (code is being uploaded), another shows when data is being transmitted (a program is running) and pin on is attached to pin 13 to test HELLO WORLD sketch (you can make it blink).
5. the pins: The little pin holes are where you can stick your jumper wires to create a circuit, different pins serve different purposes. Here are the basics:
a. 5v & 3v - these pins provide power out from the Arduino to your circuit, one
provides 3 volts and the other provides 5 volts. Think of this as the positive
power source for your circuit.
b. gnd pins - these are the ground pins. Everything that has power going into
it, needs a place for that power to return. That point of return is know as
ground, earth, or the negative that compliments the positive.
c. vin pin - power can go in here (5-12v) instead of the barrel jack or USB port
and power can also come out here (5v). It goes both ways! Useful to
permanently solder on a battery port or other power supply.
d. input/output pins: all of these pins can be used for input (information
coming in from sensors) or output (information going out to actuators).
there are 2 main types: analog and digital.
What's the difference between analog and digital on Arduino?
analog pins are labeled A0, A1, A2.... through A5
digital pins are simply labeled 1, 2, 3, 4, 5... through 13
But what's the difference?
HINT:
Analog: Think of analog as a gray area, a spectrum of possibilities.
Very On, kinda on, sorta on, maybe on, a little on, mostly off, very off
Max, hi, med hi, med, med lo, lo, min, off
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, etc….
Examples?
Digital: Think of digital is black and white, one way or the other with nothing between.
On or off
Hi or lo
0 or 10
Examples?
Breadboard:
A breadboard holds your components with ease, otherwise you would have a mess of twisting wires and things would be constantly falling apart. Breadboard are for prototyping before you solder to a more permanent board. This is how the connections are made on a breadboard:
Hook GND to the blue or negative line, hook 5v to the red or positive line, and use the green lines in the middle to make connections between components.
Some other basic components:
Jumper wires: used to make connections from between components, boards, etc.
LED: light emitting diode, a diode that emits light!
Servo motor: sweeps 180 degrees, back and forth (where does this exist?)
DC motor: spins 360 at various speeds (where do we see these used?)
Stepper motor: spins 360 in precise, singular steps... (where do we see this?)
Resistor: resists electricity to prevent certain parts from overheating and burning out (don't let the magic smoke out!)
Switches: digital or analog component? turns circuit on and off
Potentiometer: digital or analog component? a turnable knob that allows you to turn the power up and down on a gray scale. Where does this exist in real life?
Power source: battery, wall warts, usb plug.. provides power to your circuit.
We will be using 3 kits for this pop quiz, Sparkfun inventor's kit version 1&2 as well as the Elegoo knock of kits (for more advanced users).
The spark fun inventors kit will literally let you know exactly where to plug everything in with an easy to follow, visual map. It also provided the code for you!
Guide with maps: https://cdn.sparkfun.com/datasheets/Kits/SFE03-0012-SIK.Guide-300dpi-01.pdf
downloadable code: https://www.sparkfun.com/sikcode
Arduino IDE:
This is the Arduino software that you will use to program your Arduino. You will not need to write any of your own code for this class (you can if you want). You will mostly copy, paste and add little edits to preexisting code to make your programs.
A piece of Arduino code is called a sketch. Here is the most basic sketch, popularly known as "Hello World" or "Blink."
void setup() //sets up the sketch
{
pinMode(13, OUTPUT); //this assigns pin 13 as an output, not an input
}
void loop() //starts the loop that will run continuously until you make it stop.
{
digitalWrite(13, HIGH); //Turn on the LED
delay(1000); // Wait for one second
digitalWrite(13, LOW); // Turn off the LED
delay(1000); // Wait for one second
}
POP QUIZ:
1. 5 pts. Download arduino on your computer: https://www.arduino.cc/en/Main/Software
2. 5 pts. Complete the Hello World, or Blink sketch
3. 5 pts. edit the blink sketch to change the way the LED blinks.
4. 10 pts. Complete a more complicated sketch using at least 1 sensor (input) and 1 other actuator (not an LED).
*If you already have extensive experience with Arduino, you may opt out of this quiz and get your 25 pts. by helping your fellow students. YOU MUST GET APPROVAL FROM ME!! YOU MUST BE HELPING, YOU WILL NOT GET CREDIT IF YOU SIT! This helps me a lot! I can only help 1 person at at time, so... THANK YOU!