Bird
0
0

After enabling serial and rebooting, which device path should a Python script open to communicate over UART on Raspberry Pi?

medium📝 Predict Output Q4 of 15
Raspberry Pi - Serial UART Communication
After enabling serial and rebooting, which device path should a Python script open to communicate over UART on Raspberry Pi?
A/dev/serial0
B/dev/ttyUSB0
C/dev/ttyS1
D/dev/serial1
Step-by-Step Solution
Solution:
  1. Step 1: Understand device naming

    /dev/serial0 is a symbolic link to the primary UART device on Raspberry Pi.
  2. Step 2: Confirm after reboot

    After enabling serial and rebooting, /dev/serial0 is the correct device to open for UART communication.
  3. Final Answer:

    /dev/serial0 -> Option A
  4. Quick Check:

    Use /dev/serial0 for UART communication [OK]
Quick Trick: Use /dev/serial0 as UART device after enabling serial [OK]
Common Mistakes:
MISTAKES
  • Using /dev/ttyUSB0 which is for USB serial adapters
  • Trying /dev/ttyS1 which is usually not the primary UART
  • Using /dev/serial1 which may not be linked to UART

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes