Agar aap O Level ka M4-R5 (Internet of Things – IoT) module prepare kar rahe hain, to yahaan se aapko practical ke previous year papers PDF format me solution ke sath sath questions bhi milenge. Ye papers NIELIT ke latest R5 syllabus ke according hain aur bilkul free download ke liye available hain.

π M4-R5 Practical Paper Me Kya Aata Hai?
Is practical paper ka main focus IoT devices, sensors, actuators aur unka basic programming hota hai. Aapko diya gaya hota hai ki ek automation system design karo β jaise ki smart home, automatic light system, ya temperature-based fan control system.
Main Topics (as per NIELIT):
- IoT device setup (Arduino, NodeMCU etc.)
- Sensor/actuator connection (LED, IR, DHT11 etc.)
- Code likhna (Arduino C / MicroPython)
- Input/output ka test karna
- Result explain karna (flow diagram optional)
π₯ M4-R5 Practical Papers PDF Download (With Solution)
π Paper | π Download Link |
---|---|
M4-R5 Practical Set 1 | Download PDF |
M4-R5 Practical Set 2 | Download PDF |
M4-R5 Practical Assignment | Download PDF |
π Note: Agar koi link open na ho raha ho, toh aap Comment kar sakte ho.
π§ͺ O Level M4-R5 Practical Questions with Solution
IoT module ke practical exam me aapko Arduino programming, sensor input/output, aur circuit-based logic par kaam karna hota hai. Isiliye humne yahaan kuch IoT practical questions with solution diye hain jo aapko real exam me puchhe jaane wale task ka idea denge. Ye questions basic se advanced tak hain jisse aapko concepts aur hardware flow dono samajhne me help milegi.
Question: 1.
Write a program to Blink default Light Emitting Diode(LED) on Arduino board with the delay of 2 sec.
Components-
LED
Arduino

Code:
// Define the pin for the onboard LED
const int ledPin = 13;
void setup() {
// Set the LED pin as output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH)
digitalWrite(ledPin, HIGH);
delay(2000); // Wait for 2 seconds
// Turn the LED off (LOW)
digitalWrite(ledPin, LOW);
delay(2000); // Wait for 2 seconds
}
Question: 2.
Write a program to interface LEDs on pin no. 10,11,12,13 and blink alternatively at the delay of 1 sec.

Code:
// Define LED pins
const int led1 = 10;
const int led2 = 11;
const int led3 = 12;
const int led4 = 13;
void setup() {
// Set LED pins as OUTPUT
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
}
void loop() {
// Turn ON LEDs on pin 10 and 12, OFF on 11 and 13
digitalWrite(led1, HIGH); // ON
digitalWrite(led2, LOW); // OFF
digitalWrite(led3, HIGH); // ON
digitalWrite(led4, LOW); // OFF
delay(1000); // Wait 1 second
// Now reverse: ON 11 and 13, OFF 10 and 12
digitalWrite(led1, LOW); // OFF
digitalWrite(led2, HIGH); // ON
digitalWrite(led3, LOW); // OFF
digitalWrite(led4, HIGH); // ON
delay(1000); // Wait 1 second
}
Question: 3.
Write a program to run pattern(s) on LEDs connect at pins 10,11,12,13.
Pattern example:
on, off, off, off
off, on off, off
off, off, on, off
off, off, off, on
on, on, off, off
off, on, on, off
off, off, on, on

Code:
// Define LED pins
const int ledPins[] = {10, 11, 12, 13};
void setup() {
// Set all LED pins as OUTPUT
for (int i = 0; i < 4; i++) {
pinMode(ledPins[i], OUTPUT);
}
}
void loop() {
// Pattern 1: on, off, off, off
digitalWrite(ledPins[0], HIGH);
digitalWrite(ledPins[1], LOW);
digitalWrite(ledPins[2], LOW);
digitalWrite(ledPins[3], LOW);
delay(500);
// Pattern 2: off, on, off, off
digitalWrite(ledPins[0], LOW);
digitalWrite(ledPins[1], HIGH);
digitalWrite(ledPins[2], LOW);
digitalWrite(ledPins[3], LOW);
delay(500);
// Pattern 3: off, off, on, off
digitalWrite(ledPins[0], LOW);
digitalWrite(ledPins[1], LOW);
digitalWrite(ledPins[2], HIGH);
digitalWrite(ledPins[3], LOW);
delay(500);
// Pattern 4: off, off, off, on
digitalWrite(ledPins[0], LOW);
digitalWrite(ledPins[1], LOW);
digitalWrite(ledPins[2], LOW);
digitalWrite(ledPins[3], HIGH);
delay(500);
// Pattern 5: on, on, off, off
digitalWrite(ledPins[0], HIGH);
digitalWrite(ledPins[1], HIGH);
digitalWrite(ledPins[2], LOW);
digitalWrite(ledPins[3], LOW);
delay(500);
// Pattern 6: off, on, on, off
digitalWrite(ledPins[0], LOW);
digitalWrite(ledPins[1], HIGH);
digitalWrite(ledPins[2], HIGH);
digitalWrite(ledPins[3], LOW);
delay(500);
// Pattern 7: off, off, on, on
digitalWrite(ledPins[0], LOW);
digitalWrite(ledPins[1], LOW);
digitalWrite(ledPins[2], HIGH);
digitalWrite(ledPins[3], HIGH);
delay(500);
}
Question: 4.
Write a program to interface buzzer with Arduino board to buzz on/off with the delay of 1sec.

Code:
// Define buzzer pin
const int buzzerPin = 8; // You can connect the buzzer to pin 8 or any digital pin
void setup() {
// Set the buzzer pin as OUTPUT
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Turn the buzzer ON
digitalWrite(buzzerPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the buzzer OFF
digitalWrite(buzzerPin, LOW);
delay(1000); // Wait for 1 second
}
Question: 5.
Write a program to interface LED and Buzzer with Arduino board, so that buzzer is put on whenever LED is on and Buzzer is put off when LED is off.

Code:
// Define pins
const int ledPin = 10; // Connect LED to digital pin 10
const int buzzerPin = 8; // Connect Buzzer to digital pin 8
void setup() {
// Set both pins as OUTPUT
pinMode(ledPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Turn ON LED and Buzzer
digitalWrite(ledPin, HIGH);
digitalWrite(buzzerPin, HIGH);
delay(1000); // Wait for 1 second
// Turn OFF LED and Buzzer
digitalWrite(ledPin, LOW);
digitalWrite(buzzerPin, LOW);
delay(1000); // Wait for 1 second
}
Questions: 6.
Write a program to interface Button and LED, so that LED blinks/glow when button is pressed.
Component Required:
- Button
- LED
- Arduino UNO

Code:
// Define pin numbers
const int buttonPin = 2; // Button connected to digital pin 2
const int ledPin = 13; // LED connected to digital pin 13
void setup() {
pinMode(buttonPin, INPUT); // Set button pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
// Read the button state
int buttonState = digitalRead(buttonPin);
// If button is pressed (HIGH), turn on LED
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
}
Question: 7.
Write a program to interface an LED with IR sensor.
Component-
- IR sensor
- LED
- Arduino Uno

Code:
// Define pin numbers
const int irSensorPin = 2; // IR sensor output connected to digital pin 2
const int ledPin = 13; // LED connected to digital pin 13
void setup() {
pinMode(irSensorPin, INPUT); // Set IR sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int irValue = digitalRead(irSensorPin); // Read IR sensor
if (irValue == LOW) {
// Object detected (depends on sensor logic, LOW usually means detection)
digitalWrite(ledPin, HIGH); // Turn ON LED
} else {
// No object detected
digitalWrite(ledPin, LOW); // Turn OFF LED
}
}
Question: 8.
Arduino program to change the blinking speed of led using the potentiometer.

Code:
// Define pin numbers
const int ledPin = 13; // LED connected to digital pin 13
const int potPin = A0; // Potentiometer connected to analog pin A0
void setup() {
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
// Read the value from potentiometer (0 to 1023)
int potValue = analogRead(potPin);
// Map the potentiometer value to a suitable delay time (e.g., 100 to 1000 ms)
int delayTime = map(potValue, 0, 1023, 100, 1000);
// Blink the LED with the delay controlled by potentiometer
digitalWrite(ledPin, HIGH); // Turn LED ON
delay(delayTime); // Wait
digitalWrite(ledPin, LOW); // Turn LED OFF
delay(delayTime); // Wait
}
Question: 9.
Write a program to interface Button, buzzer and LED, whenever the button is pressed the buzzer gives beep for 100ms and LED status is toggled.

Code:
// Define pin numbers
const int buttonPin = 2; // Button connected to digital pin 2
const int buzzerPin = 8; // Buzzer connected to digital pin 8
const int ledPin = 13; // LED connected to digital pin 13
// Track LED state
bool ledState = LOW;
// Track previous button state
bool lastButtonState = LOW;
void setup() {
pinMode(buttonPin, INPUT); // Set button pin as input
pinMode(buzzerPin, OUTPUT); // Set buzzer pin as output
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
bool currentButtonState = digitalRead(buttonPin);
// Detect rising edge (button press)
if (currentButtonState == HIGH && lastButtonState == LOW) {
// Beep the buzzer for 100ms
digitalWrite(buzzerPin, HIGH);
delay(100);
digitalWrite(buzzerPin, LOW);
// Toggle the LED
ledState = !ledState;
digitalWrite(ledPin, ledState);
// Simple debounce delay
delay(200);
}
// Update the last button state
lastButtonState = currentButtonState;
}
Question: 10.
Write a program to interface Light Dependent Resistor (LDR) and display the values read on the Serial monitor after delay of 2 seconds each.

Code:
// Define the analog pin connected to the LDR
const int ldrPin = A0;
void setup() {
// Start the Serial communication
Serial.begin(9600);
}
void loop() {
// Read the analog value from the LDR
int ldrValue = analogRead(ldrPin);
// Print the value to the Serial Monitor
Serial.print("LDR Value: ");
Serial.println(ldrValue);
// Wait for 2 seconds
delay(2000);
}
Question: 11.
Write a program to interface LCD with Arduino board and display ‘Hello world’ on it.

Code:
#include <LiquidCrystal.h>
// Initialize the library with the numbers of the interface pins
// Syntax: LiquidCrystal(rs, enable, d4, d5, d6, d7);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// Set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello World");
}
void loop() {
// Nothing to do here
}
Questions: 12.
Write a program to interface any analog (pollution) sensor and display the values read on Serial monitor.
Component-
Arduino
Mq135 (Air pollution Sensor)

Code:
// Define the analog pin connected to MQ135 sensor
const int mq135Pin = A0;
void setup() {
// Start Serial Communication
Serial.begin(9600);
}
void loop() {
// Read analog value from MQ135
int airQualityValue = analogRead(mq135Pin);
// Display the value on Serial Monitor
Serial.print("MQ135 Sensor Value: ");
Serial.println(airQualityValue);
// Wait for 1 second before next reading
delay(1000);
}
Question: 13.
Write a program to interface LED and Bluetooth module, to switch on the LED if 1 is passed through Bluetooth and switch off the LED if 0 is send.

Code:
// Define the LED pin
const int ledPin = 13;
void setup() {
// Set the LED pin as output
pinMode(ledPin, OUTPUT);
// Start serial communication with Bluetooth module
Serial.begin(9600);
}
void loop() {
// Check if data is available from Bluetooth
if (Serial.available()) {
char command = Serial.read(); // Read the received character
if (command == '1') {
digitalWrite(ledPin, HIGH); // Turn ON LED
} else if (command == '0') {
digitalWrite(ledPin, LOW); // Turn OFF LED
}
}
}
Question: 14.
Print “hello world “on the serial monitor when send message “hello word” from Arduino.
Code:
String receivedData = "";
void setup() {
// Start serial communication
Serial.begin(9600);
}
void loop() {
// Check if data is available
while (Serial.available()) {
char c = Serial.read(); // Read each character
receivedData += c; // Append to the received string
delay(10); // Small delay for proper reception
}
// Check if full message received
if (receivedData.length() > 0) {
// Compare received string with "hello word"
if (receivedData == "hello word") {
Serial.println("hello world");
}
// Clear received data
receivedData = "";
}
}
Questions: 15.
Write a program to interface DHT sensor with LED. The program will switch on LED once the temperature rises above 30 degrees?

Code:
#include <DHT.h>
// Define the pin where the DHT sensor is connected
#define DHTPIN 2
// Define DHT sensor type: DHT11 or DHT22
#define DHTTYPE DHT11 // Change to DHT22 if using DHT22
// Initialize DHT sensor
DHT dht(DHTPIN, DHTTYPE);
// Define LED pin
const int ledPin = 13;
void setup() {
// Start Serial Communication
Serial.begin(9600);
// Initialize DHT sensor
dht.begin();
// Set LED pin as output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Wait a short time between readings
delay(2000);
// Read temperature in Celsius
float temperature = dht.readTemperature();
// Print temperature to Serial Monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" *C");
// Check if temperature is valid and above 30Β°C
if (!isnan(temperature) && temperature > 30.0) {
digitalWrite(ledPin, HIGH); // Turn ON LED
} else {
digitalWrite(ledPin, LOW); // Turn OFF LED
}
}
β M4-R5 (IoT) ke liye Viva MCQ:
π Note: IoT practical ke baad viva me sensors, Arduino, circuits aur basic programming concepts par MCQs puchhe jaate hain. Aap is module ke viva ke liye MCQ questions yahaan se prepare kar sakte hain:
π M4-R5 Viva MCQ Practice β Click Here
π§ͺ Common Practical Questions in IoT
- Write a program to blink LED using Arduino
- Display temperature using DHT11 sensor
- Create a smart door using IR sensor
- Control LED using smartphone via Wi-Fi module
- Design a simple home automation system
π§ Preparation Tips β M4-R5 Practical Ke Liye
β
Arduino IDE ka use daily karo
β
LED, buzzer, DHT11 jaise sensors pe hands-on lo
β
Input-output (analog/digital) ka difference samjho
β
Circuit diagram draw karne ki practice rakho
β
WiFi module (ESP8266) aur cloud communication ka basic idea lo
β FAQs β Students ke Doubts
Q1: Arduino ya NodeMCU dono aate hain kya exam me?
Usually Arduino diya jaata hai, but concepts dono pe same hote hain.
Q2: Programming ka language kya hota hai?
Mostly Arduino C language (jo C/C++ jaisa hota hai), kabhi kabhi MicroPython.
Q3: Sensors ka wiring ya code yaad rakhna hota hai kya?
Haan, kaafi baar basic circuit aur code likhne ko diya jaata hai β diagram optional hota hai.
π Final Suggestion
- Har sensor ka code 2β3 baar likh ke dekho
- Physical setup ka idea rakho (even if virtual simulator use kar rahe ho)
- Breadboard + wiring diagram banana aana chahiye
- Code + output + explanation likhna practice karo
- Mock practical test bhi try karo agar mil jaye to
β Aapka Next Step:
- Download karo PDF papers
- Practice karo Arduino + Sensor ka code
- Main Practical Page pe jaakar baaki modules bhi check karo
- Apne doston ke sath link share karo
βSensor se data lena seekh liya, toh aap duniya ko automate kar sakte ho!β ππ€
π Bookmark kar lo ye page β naye solutions add hote rahenge.
π¬ Agar koi doubt ho toh comment ya contact form ka use karein.