Setting up the Raspberry Pi Zero serial port

In order to use the serial port to talk to sensors, the serial port login/console needs to be disabled. In the Raspbian OS image, this is enabled by default as it enables easy debugging.

The serial port login can be disabled via raspi-config:

  1. Launch the terminal and run this command:
       sudo raspi-config
  1. Select Advanced Options from the main menu of raspi-config:
Select Advanced Options from the raspi-config menu
  1. Select the A8 Serial option from the drop-down menu:
Select A8 Serial from the dropdown
  1. Disable serial login:
Disable serial login
  1. Finish the configuration and reboot at the end:
Save config and reboot