Bird
0
0

You want to control an LED connected to your Raspberry Pi remotely using a web server. Which approach best explains why running a web server on the Pi enables this?

hard🚀 Application Q15 of 15
Raspberry Pi - Web Server and API
You want to control an LED connected to your Raspberry Pi remotely using a web server. Which approach best explains why running a web server on the Pi enables this?
# Pseudocode
Start web server
When user visits URL:
  Receive command (e.g., turn LED on/off)
  Execute GPIO control based on command
  Send response back to user
AThe web server stores LED status but cannot control hardware.
BThe web server automatically powers the LED without commands.
CThe web server listens for internet requests and triggers hardware actions accordingly.
DThe web server only works if the Pi is offline.
Step-by-Step Solution
Solution:
  1. Step 1: Understand web server role in IoT control

    The web server listens for commands sent via internet requests from users.
  2. Step 2: Connect commands to hardware control

    When a command is received, the server runs code to control the GPIO pins, turning the LED on or off.
  3. Final Answer:

    The web server listens for internet requests and triggers hardware actions accordingly. -> Option C
  4. Quick Check:

    Web server + commands = hardware control [OK]
Quick Trick: Web server receives commands to control hardware remotely [OK]
Common Mistakes:
MISTAKES
  • Thinking server powers hardware automatically
  • Believing server only stores data without control
  • Assuming server works offline for remote control

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes