You are on page 1of 6

Pointers to Review 1.

Verify - Compiles and checks your


code. It will catch errors in syntax (like
different parts of the arduino ide
(compiling, uploading, examples, etc.)
missing semicolons or parenthesis).
* different parts of the program (void loop, 2. Upload - Uploads/Sends your code
void setup, etc.) to the Arduino board.
* difference between input and output When you click it, you should see the
(digitalread and digitalwrite, analogread lights on your board blink rapidly.
and analogwrite, high and low) 3. New - This buttons opens
* different electronic solid state devices up a new code window tab.
(led, buzzer, etc.) 4. Open - This button will let
* advance study different electronic you open up an existing sketch.
devices
5. Save - This saves the
* location ng pins sa mga sensors like
currently active sketch.
gnd, 5v
* review code for ultrasonic sensor
6. Serial Monitor - This will open a
* review code for traffic light w 30s delay window that displays any serial
* review code for running light using 10 information your Arduino board is
leds transmitting. It is very useful for
* review code for ultrasonic sensor using 1 debugging.
led 7. Sketch Name - This shows the
* potentiometer reading using serial name of the sketch you are currently
monitor working on.
* controlling led using potentiometer 8. Code Area - This is the area
* functions ng motor driver shield, line
where you write the code for your
sensor, ultrasonic sensor, lahat daw ng
sketch.
sensor etc.
* 1-40 multiple choice, 41-50 look for
9. Message Area - This is where the
incorrect code, 51-60 coding IDE tells you if there were any errors in
* pasulat ang code your code.
10. Text Console - The text console
shows complete error messages.
When debugging, the text console is
Robotics Reviewer UwU very useful.
11. Board and Serial Port - Shows
Parts of Arduino IDE you what board and the serial port
➢ IDE- Integrated Development selections Arduino ID
Environment is a software
application that provides
comprehensive facilities to
computer programmers for
software development. An IDE
normally consists of at least a
source code editor, build
automation tools and a
debugger. - Wikipedia
Different Parts of the Program ➢ analogRead and analogWrite
1. Void Setup - only run once, at the - analogRead reads the
beginning of the program analog value and the
2. Void Loop - code that will repeat analogWrite writes the
The code inside the loop function runs PWM value
over and over as long as the Maker ➢ digitalRead and digitalWrite
Board is turned on - digitalRead reads the
3. Input - inputs a value to the button voltage
(If HIGH or LOW)
microcontroller, has high resistance
And digitalWrite turns it
4. Output - outputs value to a device,
on (HIGH) and off (LOW)
has low resistance
➢ HIGH and LOW
5. analogRead() - Reads an analog
- HIGH means its on
value from 0-255
LOW means its off
6. analogWrite() - Writes an analog
➢ Serial.print and Serial.println
value from 0-255
- Serial.print prints only the
7. digitalRead() - Reads a digital
number or string, while
value, HIGH, LOW,
Serial.println prints it with
8. digitalWrite() - Writes a digital
a newline character.
value, HIGH, LOW
9. Serial.begin() - starts the serial
monitor, value inside the function
is the baud rate
10. Serial.print() - prints value or text
without a new line
11. Serial.println() - prints value
Different Electronic Solid State
creating a new line
Devices

➢ LED - A light-emitting diode is


a semiconductor light source
that emits light when current
flows through it. Electrons in the
semiconductor recombine with
Difference Between electron holes, releasing energy
➢ Void Setup and Loop in the form of photons.
- Void Setup only runs
once while Void Loop
runs repeatedly
➢ Input and Output
- Input is what goes into
the function and output is
what comes out (result)
of the function
➢ Ultrasonic Sensor - is an ➢ IR Sensor - is an electronic
electronic device that measures device that measures and
the distance of a target object by detects infrared radiation in its
emitting ultrasonic sound waves, surrounding environment.
and converts the reflected sound
into an electrical signal.

➢ Piezo buzzer - is one integrated


electronic transducers, DC voltage
suppply, widely used in computers, ➢ Motor Driver
printers, copiers, alarm, electronic - L293D Motor Driver
toys, automotive elecronic - acts as an interface between
equipment, telephones timers and the motors and the control
other electronic products for sound circuits. enables you to perform
devices. Produces a tone or sound. automatic tasks using electrical
➢ can be driven by an oscillating power.
electronic circuit or other audio
signal source.
❖ Positive - Longer terminal
of the device, Red wire,
represented by +
❖ Negative - Shorter
terminal, black wire,
represented by -

➢ Potentiometer - is a
three-terminal resistor with a
sliding or rotating contact that
forms an adjustable voltage
divider. (Middle pin should be
➢ Lm 35 (Temperature Sensor)
connected to analog pin)
- is a temperature measuring device
having an analog output voltage
proportional to the temperature. It
provides output voltage in Centigrade
(Celsius). It does not require any
external calibration circuitry. The legs
of an LM35 be connected to 5V,
ANALOG, GROUND(from left to right)
➢ 3 and 5 Channel Traffic Light w/ 30s delay
Line Tracker Sensor
- Designed for Mobile Robot line
tracking applications, five or
three infrared reflective sensors
CNY70 will reliably detect dark
lines printed over light color
surface. Detection distance
>10mm from sensor face is
possible. Adjustable sensitivity
for each sensors.

Ultrasonic Sensor

Running Light using 10 LEDS

(ito yung logic nya pero gawing 10 leds)


Potentiometer reading Notes galing sa Pre-Test
using Serial Monitor ❖ Arduino grammar is built on the
basis of C grammar.
❖ When the button is not being
pressed it becomes what is called a
floating pin – it’s not connected to
anything.

❖ Analog - A form of electronic


communication sent as signals of
varying frequency instead of ON
or OFF like a digital data
transmission.
Controlling LED ❖ PWM - A way to simulate a varying
Using Potentiometer static voltage. A method of
emulating an analog signal through
a digital.
PWM pins are 3, 5, 6, 9, 10, 11
- Google
❖ Pulse Width - defined as the
duration of "on time"

❖ Variable - A data type that stores


values which are likely to change
as your program runs.
❖ Constant is a named identifier that
cannot change its value in a
program.
❖ Float - A datatype used to
represent a fraction which entails
Sources ng Code the use of decimal points for
https://create.arduino.cc/projecthub floating point numbers.
/techno_z/arduino-traffic-light-simul
❖ #define is a useful C component
ator-2ec9f7
that allows the programmer to give
a name to a constant value before
https://arduinointro.com/projects/ho the program is compiled.
w-to-make-an-alternate-blink-and-ru ❖ void() - a function used to
nning-lights-effect initialize variables, pin modes,
start using libraries, etc.
https://roboticsbackend.com/arduin ❖ delay(ms) - Pauses the program
o-potentiometer-complete-tutorial/ for the amount of time (in
miliseconds) specified as
https://roboticsbackend.com/arduin parameter.
o-control-led-brightness-with-a-pote ❖ tone() - Generates a square wave
of the specified frequency (and
ntiometer/
50% duty cycle) on a pin.
❖ ; - syntax used to end a statement
the expression inside the
❖ Serial Communication - A type of parenthesis, () becomes false.
serial protocol between two ❖ The for statement is used to
devices. repeat a block of statements
❖ Capacitance - The ability of a enclosed in curly braces.
material to hold an electrical ❖ The if else statement checks for a
charge. condition and executes the
❖ Compiling - Before your program proceeding statement or set of
“code” can be sent to the board, it statements if the condition is 'true'.
needs to be converted into
instructions that the board
understands. ❖ Line Number - shows you what
❖ Debugging is the process of going line number your cursor is on. It is
through a circuit or code, and useful since the compiler gives
finding errors, until the expected error messages with a line number.
behavior is achieved.
❖ What kind of value does the
❖ Robot Sumo - Is a sport in which Photoresistor collect? Analog
two robots attempt to push each
other out of a circle. ❖ Nixie Tube - It is an electronic
❖ The name “Sumo” came from an old device for displaying numerals or
Japanese sport, which is two other information using glow
opponents fighting in a ring, each of discharge.
them trying to push the other opponent
out of it.

❖ Microcontroller - Brains of the Goodluck po sa exam! uwu


arduino. this is a small computer
that you will program to listen for,
process, and display information.
❖ Ultrasonic sensor is the analog
sensor that serves as the primary
component in a Sumo Robot
❖ A potentiometer returns an
analog value between 0 and 1023.

❖ Sensor - A component that


measures one form of energy and
converts it to voltage or current.
❖ Switch - A component that can
open or close an electrical circuit.
❖ Resistor - A device having a
designed resistance to the
passage of an electric current

❖ A while loop will loop


continuously, and infinitely, until

You might also like