IHS Engineering Club
Intro
Today's Plan
Arduino
Arduino is an open-source electronics platform that combines hardware and software.
Code
Electricity
Two types of current:
Electricity
Electricity
| Concept | Symbol | Unit | Water Analogy |
|---|---|---|---|
| Voltage | V | Volts (V) | Water pressure |
| Current | I | Amps (A) | Flow rate |
| Resistance | R | Ohms (Ω) | Pipe narrowness |
Components
A board for building circuits without soldering.
Components


Components


Components

Components


Components


Components


Code
Language: C/C++
void setup() { // Runs ONCE when the Arduino turns on // Use this to configure your pins } void loop() { // Runs FOREVER until the Arduino loses power // Put your main logic here }
Code
pinMode(pin, mode);// Set pin as INPUT or OUTPUT digitalRead(pin); // Read HIGH or LOW from a digital pin digitalWrite(pin, value); // Write HIGH or LOW to a digital pin analogRead(pin); // Read 0–1023 from an analog pin (A0–A5) analogWrite(pin, value); // Write PWM 0–255 to a ~ pin delay(ms); // Pause execution for ms milliseconds Serial.begin(baud); // Start serial communication at baud rate Serial.print(value); // Print value to the serial monitor
Build
Build a fan with a speed indicator using LEDs.
Parts: Potentiometer, fan, 2 LEDs, 2 resistors
Wrap Up