0% found this document useful (0 votes)
31 views9 pages

Ict Exam Coverage and Reviewer.docx

This document serves as a reviewer for Arduino UNO, covering its basic functions, components, and programming concepts. It includes details on digital and analog pins, the Arduino IDE, and examples of built-in functions and projects. Additionally, it emphasizes the importance of integrity in learning and provides motivational quotes to encourage students.

Uploaded by

markuzarkhin0809
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views9 pages

Ict Exam Coverage and Reviewer.docx

This document serves as a reviewer for Arduino UNO, covering its basic functions, components, and programming concepts. It includes details on digital and analog pins, the Arduino IDE, and examples of built-in functions and projects. Additionally, it emphasizes the importance of integrity in learning and provides motivational quotes to encourage students.

Uploaded by

markuzarkhin0809
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ICT EXAM COVERAGE AND REVIEWER

void loop() - Runs continuously after setup() for the main


logic.
Note: This reviewer is intended for educational purposes
only. The examples and explanations are all derived from
standard Arduino procedures and general concepts. PLEASE
don’t use this as an excerpt for a cheat code. DO WELL!

★ ARDUINO UNO ★
An open-source microcontroller board based on the
Microchip ATmega328P microcontroller and developed by
Arduino cc.

• Digital Pins: For input/output, either HIGH (on) or LOW ★ BASIC FUNCTIONS ★
(off). There are 12 digital pins in Arduino UNO.
pinMode(pin, mode) - Sets a pin as either an INPUT (for input
• Analog Pins: Read variable voltages (0 to 5V) with values devices), OUTPUT (for output devices), or
from 0 to 1023. There are 6 analog pins in Arduino UNO. INPUT_PULLUP(reversing input logic).
• Ground (GND): Common ground reference for the circuit.
digitalWrite(pin, value) - Sends a HIGH or LOW signal to a
• Power: 5V (from USB or direct power) and 3.3V (for low digital output pin.
powered sensors) outputs to power components.
digitalRead(pin): Reads the state of a digital input pin as
★ ARDUINO IDE ★ either HIGH or LOW.
A software made by the Arduino cc where you write
sketch (code) and upload it to the microcontroller. analogRead(pin) - Reads an analog input value (0 to 1023).
void setup() - Runs once when the program starts (initialize
pins, etc.) analogWrite(pin, value) - Writes an analog output (PWM)
value (0 to 255). HIGH (Pressed): The circuit is closed, sending a signal.
LOW (Not pressed): The circuit is open, no signal is sent.
delay (ms) - Pauses the program for a specified number of
Connect one pin to a digital input, the other to GND, and a
milliseconds (1 second = 1000 ms).
pull-up resistor to VCC (or use INPUT_PULLUP).

map(value, fromLow, fromHigh, toLow, toHigh) - Converts a


value from one range to another. Useful for translating sensor
values to motor or LED control.

★LED★
Light Emitting Diode is a small light source commonly
used in electronics. It has two terminals.
• Anode (+): Longer leg, connects to a positive voltage.
• Cathode (-): Shorter leg, connects to ground (GND).
★ POTENTIOMETER ★
• Use a current-limiting resistor (220Ω – 1kΩ) in series to A potentiometer (or "pot") is a variable resistor used
protect the LED. to adjust voltage by turning a knob.

• Connect the anode to an Arduino digital pin and the


cathode to GND.

★ PUSHBUTTON ★

A simple input device that allows the user to make or


break a connection. It has two states.
VCC – connects to the 5V of Arduino Serial.print() - Prints data to the Serial Monitor without a
GND – connects to the ground of Arduino newline character. It's used for continuous text display.
Wiper/Signal – connects to any analog pins (outputs a
variable voltage depending on the knob's position). Serial.println() - Similar to Serial.print(), but it adds a newline
at the end, which helps to organize data into readable lines.
As you turn the knob, the wiper moves across a
resistive track, changing the output voltage between VCC
★ BUILT-IN EXAMPLES ★
and GND.
1. Blink
★ SERIAL MONITOR ★ - Turns an LED on and off at intervals.

A tool built into the Arduino IDE that enables


communication between your computer and the Arduino
board. It allows you to send and receive messages in real
time, helping with debugging, monitoring sensor data, and
even controlling outputs based on inputs.

Serial.begin(baud_rate) - Initializes serial communication.

9600 bps - The most used baud rate in basic Arduino


projects. It's reliable and fast enough for most 2. Blink with Serial Output
communication. - Same as blink, but with status printed to Serial Monitor.
115200 bps - A faster baud rate is used for more advanced or
high-data-rate communication.
3. Digital Read Serial

- Reads a digital input on pin 2, prints the result to the Serial


Monitor
4. Pushbutton
- Detects when a button is pressed or released.
6. Analog-In-Out Serial
- Reads an analog input and controls the brightness of an
LED.

5. Analog Input (Potentiometer)


- Reads the value from an analog sensor (e.g.,
potentiometer).
7. Input PULL-UP mode);
- Uses an internal pull-up resistor to read the state of a button
without an external resistor. • pin: The digital pin that will trigger the interrupt.

• ISR_function: The function to call when the interrupt occurs


(this is your ISR).

• mode: Defines when the interrupt is triggered.

- ISR MODES -

• LOW: Trigger when the pin is LOW.

• CHANGE: Trigger when the pin changes from LOW to


HIGH or vice versa.

• RISING: Trigger when the pin goes from LOW to HIGH.

• FALLING: Trigger when the pin goes from HIGH to LOW.


★ INTERRUPT SERVICE ROUTINE ★
Example:
An interrupt is a mechanism where an external event
(like a button press) can disrupt the normal flow of the
program to immediately execute some code.

When the interrupt is triggered, the Arduino stops the


main loop() and runs a special function called the ISR
(Interrupt Service Routine).
★ L298N MOTOR DRIVER ★
attachInterrupt(digitalPinToInterrupt(pin), ISR_function,
A dual H-Bridge motor driver, allowing control of two • EN_A and EN_B: Enables speed control using PWM
DC motors independently. It can control the speed and (connected to Arduino PWM pins).
direction of the motors by providing appropriate signals to
• OUT1, OUT2, OUT3, and OUT4: Connected to motor
the input pins.
terminals.

• VCC: Power supply for the motor (12V for typical DC


motors).

• GND: Ground.

- MOTOR CONTROL LOGIC -

• Forward: IN1 = HIGH, IN2 = LOW.


- PINOUT CONFIGURATION -
• Reverse: IN1 = LOW, IN2 = HIGH.

• Stop: IN1 = LOW, IN2 = LOW.

• Use PWM on EN_A (for motor 1) or EN_B (for motor 2) to


control speed.

Example Circuit and Code:

• IN1 and IN2: Controls the direction of Motor 1.


Sketch:
• IN3 and IN4: Controls the direction of Motor 2.
2. There are 6 PWM Pins of Arduino. (~3, ~5, ~6, ~9, ~10,
~11, ~12)

3. Arduino PINOUT

★ BONUS ★
Side Note: Give all your best in answering the exam.
Don’t CHEAT!
1. A code for Arduino si called Sketch.
James 4:17
“So whoever knows the right thing to do and fails to do it, for
him it is sin.”

I know you can do it.

Philippians 4:13

“I can do all things through him who strengthens me.”

----------------------------------------------------------------------------------
----

Made by: RESET Camp Mentors

You might also like