Electronics


Teacher:Christopher DiCarlo
Extra Help:Thursday 3:00-4:00


References

Hardware
Tactile Button - Wiring schematic and pull down resistor.
   Internal Pullup - How to wire a tactile button with the internal pullup resistor.
Resistors and LEDs - Wiring Diagrams, Basic electric current calculations for LEDs and resistors in series.
Potentiometer - How to wire a potentiometer with an Arduino and use analogRead
Photoresistor - Light dependent resistor.  High resistance in darkness.  Lower resistance in light. Wiring diagrams and simple programs included here.
Voltage Divider - How a voltage divider works.  This is the basis for potentiometer and photoresistor circuits.
Transistor - PNP and NPN Transistor wiring diagrams and basic behavior of each type of transistor.
    How a Transistor Works - You tube video that explains the internal workings of a transistor.
Motors on H-Bridge - How to control an electric motor using an H-Bridge.
Stepper Motors - How to control a stepper motor using an H-Bridge.


Control Statements
If Statement - How to set up basic if statements.  How to write test statements
    Else/Else If Statements - How to use Else and Else if statements
While Statement - Basic structure of while statements
    While Loop Example - How to use while statement to pause program while something is true
For Statement - Creates a loop that cycles through a specified number of times
Functions - How to use subfunctions in your code to compartmentalize related steps and make code more readable.


Command Statements
Pin Mode - Set up a pin for input or output
Digital Write - Send output to a pin
Digital Read - Read input from a pin
Analog Read - Read analog input from a pin
Analog Write(pin, value) - Sends analog output to a pin.  Value must be between 0-255.  Only works on pins labeled with a "~"

Serial.begin - Open serial communication between Arduino and computer
Serial.print - Print to serial window without newline.  Next print will be on same line.
Serial.println - Print to serial window with newline
Delay - Pause execution of program

noTone() - Stops any tones playing on the board.
tone(pin, frequency, duration) - Plays a tone on specified pin at given frequency, (for duration optional)

millis() - Returns number of milliseconds since the program began as an unsigned long variable.  If you store this value or do arithmetic with it you should use unsigned long variables.  int variables will not work.
random(min, max) - Returns a random number between min and max.
pulseIn(pin, HIGH/LOW, timeout) - Returns length of time in microseconds of a HIGH or LOW pulse on the given pin.  Returns 0 if pulse lasts longer than timeout microseconds.



Course Documents

Electronics Challenges 2019




Comments