
In ECET 2026 IoT section, Arduino programming is one of the most scoring topics. Questions often come from digital read and write functions, pin configurations, and basic code snippets.
📘 Concept Notes
🔌 What is Arduino?
- Arduino is an open-source microcontroller platform used in IoT projects.
- Provides digital pins (HIGH/LOW signals) and analog pins for sensors.
- Programs are written in Arduino IDE (C/C++ based).
⚙️ Digital Write in Arduino
- Used to send HIGH or LOW signal to a pin.
- Syntax:
digitalWrite(pin, value);
Where:
pin
= pin number (e.g., 13).value
=HIGH
(5V) orLOW
(0V).
👉 Example: LED ON/OFF
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH); // LED ON
delay(1000);
digitalWrite(led, LOW); // LED OFF
delay(1000);
}
⚡ Digital Read in Arduino
- Used to read signal (HIGH/LOW) from input devices like switches, sensors.
- Syntax:
digitalRead(pin);
👉 Example: Button-controlled LED
int led = 13;
int button = 2;
int state = 0;
void setup() {
pinMode(led, OUTPUT);
pinMode(button, INPUT);
}
void loop() {
state = digitalRead(button);
if(state == HIGH) {
digitalWrite(led, HIGH);
} else {
digitalWrite(led, LOW);
}
}
🔋 Formula – Digital Logic Levels
- Logic HIGH =
(for Arduino Uno)
- Logic LOW =
🛠 Applications of Digital Read/Write in IoT
- LED ON/OFF control.
- Button press detection.
- Motion detection using IR sensors.
- Home automation switches.
- Smart IoT devices (light, fan control).
🔟 10 Expected MCQs – ECET 2026
Q1. In Arduino, digitalWrite(pin, HIGH)
means:
A) Send 0V to pin
B) Send 5V to pin
C) Read from pin
D) Reset pin
Q2. Default logic HIGH voltage in Arduino Uno is:
A) 0V
B) 3.3V
C) 5V
D) 12V
Q3. Which function is used to read digital input?
A) digitalWrite()
B) digitalRead()
C) analogRead()
D) pinMode()
Q4. Pin configured as INPUT is set using:
A) digitalRead()
B) pinMode(pin, INPUT)
C) digitalWrite()
D) None
Q5. If LED is connected to pin 13 and HIGH signal is written, LED will:
A) Blink
B) Stay ON
C) Stay OFF
D) Burn
Q6. digitalRead() returns:
A) Boolean (true/false)
B) Analog value (0–1023)
C) Either HIGH or LOW
D) None
Q7. A push button press corresponds to:
A) HIGH (5V)
B) LOW (0V)
C) Depends on circuit
D) Both A & B possible
Q8. Arduino code pinMode(5, OUTPUT);
means:
A) Pin 5 used for input
B) Pin 5 used for output
C) Pin 5 disabled
D) Pin 5 analog input
Q9. For logic HIGH in Arduino Uno, voltage is:
A)
B)
C)
D)
Q10. Which is NOT an application of digital read/write?
A) LED control
B) Sensor interfacing
C) Data storage in EEPROM
D) Button press detection
✅ Answer Key
Q.No | Answer |
---|---|
Q1 | B |
Q2 | C |
Q3 | B |
Q4 | B |
Q5 | B |
Q6 | C |
Q7 | C |
Q8 | B |
Q9 | C |
Q10 | C |
🧠 Explanations
- Q1 → B: HIGH = 5V output.
- Q2 → C: Arduino Uno works at 5V logic.
- Q3 → B: digitalRead() used for digital input.
- Q4 → B: pinMode sets pin as INPUT.
- Q5 → B: HIGH keeps LED ON.
- Q6 → C: digitalRead() returns HIGH or LOW.
- Q7 → C: Push button output depends on wiring.
- Q8 → B: pinMode(5, OUTPUT) → pin 5 as output.
- Q9 → C: Logic HIGH in Uno = 5V.
- Q10 → C: EEPROM storage is separate, not digital I/O.
🎯 Why Practice Matters
- Arduino questions are direct and code-based.
- Practicing syntax and examples ensures quick scoring.
- IoT section in ECET is a sure-shot scoring area if basics are clear.