Comprehensive Guide to Arduino IDE and LED Circuitry
Course Introduction and Learning Objectives
Academic Context
Presenter: Mr. Ed Oliver P. Capacite
Institution: Divine Light Academy – Bacoor
Subject: Computer Education
Grade Level: Grade 9
Academic Year: 2026-2027
Learning Objectives
Explain the essential principles regarding Light Emitting Diodes (LED).
Identify the primary components consisting of an Arduino board.
Develop a functional Arduino program.
Construct a simple LED circuit utilizing the Arduino board and necessary resistors.
Preliminary Recall Questions
Provide examples of Arduino Microcontrollers and describe their specific functions.
Define the importance of using Arduino in electronic and computing projects.
Arduino integrated Development Environment (IDE)
System Components
Menu Bar: Contains operational menus such as File, Edit, Sketch, Tools, and Help.
Toolbar: Features command icons for quick access to essential functions.
Main Coding Window: The area where users write and edit code.
Status Bar: Displays information regarding the current board type and the specific COM port being used (e.g., Arduino/Genuino Uno on COM5).
Message Pane: Located at the bottom of the window, it provides feedback on the status of code compilation and uploads.
Command Icons and Functions
Verify / Compile: Checks the active code for syntax errors.
Upload: Uploads the currently active Sketch to the connected Arduino board.
New: Creates a blank Sketch file.
Open: Displays a list of existing Sketches within the user's sketchbook.
Save: Saves the current progress of the Sketch.
serial monitor: Opens the Serial Monitor which allows the user to communicate with their Arduino board by sending and receiving data.
System Configuration
Selecting the Microcontroller: Users must navigate to the "Tools" menu and select the correct board. Options include:
Arduino AVR Boards
Arduino Yún
Arduino/Genuino Uno
Arduino Duemilanove or Diecimila
Arduino Nano
Arduino/Genuino Mega or Mega 2560
Arduino Mega ADK
Arduino Leonardo
Arduino/Genuino Micro
Arduino Esplora
Arduino Mini
Arduino Ethernet
Arduino Fio
Arduino BT
LilyPad Arduino USB
LilyPad Arduino
Arduino Pro or Pro Mini
Arduino NG or older
Arduino Robot Control
Arduino Robot Motor
Arduino Gemma
Gizduino AVR Boards
Selecting the Port: Accessed via Tools > Port. For example, selecting "COM5 (Arduino/Genuino Uno)" ensures the software communicates with the correct hardware interface.
Arduino Sketch and Code Structure
The Sketch Concept
A "sketch" is the specific terminology Arduino uses for a program. It is the fundamental unit of code uploaded to and executed on the Arduino board.
Basic Syntax and Structure
void setup() { }: This block contains code that runs exactly once when the board is powered on or reset. It is used to initialize variables, pin modes, or libraries.void loop() { }: This block contains the main logic of the program and runs repeatedly in a continuous cycle as long as the board has power.
Displaying "Hello!" via Serial Monitor
Code template example:
void setup() { Serial.begin(9600); Serial.print("Hello!"); }void loop() { }
Configuration Requirements: To view output, ensure the Serial Monitor is set to
9600\,\text{baud}and "No line ending" is selected in the settings.Outcome: The message pane will indicate status (e.g., "Done uploading") and the size of the binary sketch (e.g., "1892 bytes of a 32256 byte maximum").
Light Emitting Diode (LED) Principles and Anatomy
Definition and Physics
An LED is a semiconductor device that emits light when an electric current passes through it.
Electroluminescence: The scientific name for the process wherein electrons in the semiconductor material recombine with electron holes, releasing energy as light particles known as photons.
Mechanical and Electrical Components of an LED
Epoxy Lens/Case: The outer protective covering that safeguards internal parts and helps focus light output.
Wire Bond: Tiny wires that establish the electrical connection between the LED chip and the internal leads.
Reflective Cavity: A structural component designed to reflect light outward, enhancing the device's brightness.
Semiconductor Die: The central "heart" of the LED that transitions electricity into light.
Anvil Leadframe and Post: Mechanical structures that support the semiconductor die and wire bond.
Flat Spot: A physical indentation on the LED's base that denotes the cathode side.
Electrical Leads:
Anode (+): The positive lead of the LED.
Cathode (-): The negative lead of the LED.
Laboratory Activities and Performance Tasks
Hand On Activity 1-1: Hello World
Launch the Arduino IDE.
Connect the Arduino Uno R3 to the computer following the established procedure.
Setup the board within the IDE for programming.
Write code to display the text "Hello World" on the Serial Monitor.
Verify the prototype assembly and logic.
Naming Convention:
section_surname_SW-1-1_HelloWorld.
Hand On Activity 1-2: Blinking LED
Launch the Arduino IDE.
Set up the physical LED and Arduino hardware.
Program the LED to toggle its state (blink) every .
Critical Thinking Question: What is the effect on blinking speed if the delay value is reduced to ?
Naming Convention:
section_surname_SW-1-2_BlinkingLED.
Performance Task 1-1: Traffic Light Simulation
Launch the Arduino IDE and open the previous "Blinking LED" file.
Construct a prototype traffic light circuit using Red, Orange, and Green LEDs.
Program Timings:
Go Signal (Green): Active for .
Slow Down Signal (Orange): Active for .
Stop Signal (Red): Active for .
Naming Convention:
section_surnames_PT1-1_TrafficLight.
Final Summary and Assignments
Closure
The Arduino IDE is the software bridge that allows users to write and upload code to microcontrollers, enabling direct control of electronic components such as LEDs.
Assignment
Tasks: Complete "Calibrate A and B" found on pages 7-8 of the course textbook.