You Reply: In order to fix this, try using sudo raspi-config, go to Interfacing Options, then Serial, then select No for the login shell and Yes for the serial port hardware to be enabled. Afterwards, reboot. Then adjust the serial port path in DFRobot_RaspberryPi_A02YYUW.py , changing it from /dev/ttyAMA0 to either /dev/serial0 or /dev/serial1. (For the Raspberry Pi Zero W, it was /dev/serial1).