Zed-King Study app · Free
O Level students across India practise here, free
Google login · no Play Store needed
About this PDF
49-page solved set — components list, wiring diagram and Arduino code for every program.
This is part of the free O Level PR-4 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.
- Course
- O Level — NIELIT Foundation Diploma
- Module
- PR4 — PR-4: M4-R5.1 Internet of Things (IoT) — Practical
- Section
- Previous Year Practical Questions
- Format
- PDF — read online or download
- Price
- Free, no sign-up required
Text from this PDF
The opening pages as plain text — open the reader above for tables, diagrams and the full file.
Module: M4-R5.1 [Introduction to Internet of Things (IOT) and its Applications] Practical Questions Program1. Write a program to print even number in range of 100 to 200 on Serial monitor.
2. USB Cable to connect the Arduino to your computer
3. Arduino IDE installed on your computer for programming the Arduino Arduino CODE:- / Initialize the serial communication at 9600 / Print even numbers from 100 to 200 for (int num = 100; num <= 200; Serial.println(num); / Stop the loop after printing the Program2. Write a program to interface buzzer with Arduino board to buzz on/off with the delay of 1sec.
1. Arduino UNO
2. Buzzer
3. Jumper Wires
4. Breadboard
• Connect the buzzer's positive terminal to a digital pin on your Arduino board. (Let's assume you connect it to pin 13 for this example).
• Connect the buzzer's negative terminal to ground on the Arduino board.
const int buzzerPin = 13; // Define the buzzer pin pinMode(buzzerPin, OUTPUT); // Set the buzzer pin as output digitalWrite(buzzerPin, HIGH); // Turn the buzzer ON delay(1000); // Wait for 1 second digitalWrite(buzzerPin, LOW); // Turn the buzzer OFF delay(1000); // Wait for 1 second Alternate Code:- const int buzzerPin = 13; // Define the buzzer pin pinMode(buzzerPin, OUTPUT); // Set the buzzer pin as output
tone(13,1000); // buzzer beep delay(1000); // Wait for 1 second noTone(13); // buzzer OFF delay(1000); // Wait for 1 second Turn the Program3. Write a program to Blink default Light Emitting Diode (LED) on Arduino board with the delay of 2 sec.
1. Arduino Uno
2. LED
3. Resistor
4. Breadboard and jumper wires Connect the Resistor and LED:
Insert one end of the resistor into the same row as the LED's anode.
Insert the other end of the resistor into a GND (ground) row on the breadboard.
Connect to Arduino:
Insert a jumper wire from the Arduino's digital pin 13 (or any other digital pin) to the same row as the LED's anode.
Insert a jumper wire from the GND pin on the Arduino to a GND row on the breadboard.
/ Blink an LED connected to pin 13, with a 2-second delay.
const int ledPin = 13; // the number of the LED pin / initialize the digital pin as an output.
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second Program4. Write a program to interface Button and LED, so that LED blinks/glow when button is pressed.
2. LED (any standard 5mm LED)
3. 220-ohm Resistor (to limit current and protect the LED)
4. Pushbutton (momentary pushbutton switch)
5. 10k-ohm Resistor (for the pull-down resistor)
6. Breadboard (optional, for easy connections)
7. Jumper Wires
1. Connect the LED:
o Anode (longer leg) of the LED to a digital pin on the Arduino (e.g., pin 9).
o Cathode (shorter leg) of the LED to one end of the 220-ohm resistor.
o Other end of the resistor to the Arduino GND (ground) pin.
2. Connect the Pushbutton:
o One terminal of the pushbutton to a digital pin on the Arduino (e.g., pin 7).
o The other terminal of the pushbutton to the Arduino GND (ground) pin.
o Connect a 10k-ohm resistor between the button pin (pin
7) and o GND to act as a pull-down resistor.
/ Define the pin for the LED and the button const int ledPin = 9; const int buttonPin= 7; / Set the LED pin as an output / Set the button pin as an input pinMode(buttonPin, INPUT); / Read the state of the button / Check if the button is pressed if (buttonState == HIGH)
/ Turn the LED on digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); Program5. Write a program demonstrating the use of analog output (Pulse with Modulation- PWM) to fade LED.
1. Arduino Uno Board - This will be the main controller.
2. LED - This is the component that will fade in and out.
3. Resistor - Protects the LED from too much current.
4. Jumper Wires - For making connections.
More previous year practical questions for PR-4
Run these Arduino sketches on a virtual board — free
No kit needed: wire a virtual Arduino Uno in the simulator and watch the LEDs, LCD and sensors respond to your sketch. Each explained project gives the code and the wiring.
Prepare for O Level with expert guidance
Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.
