Setup

Setup for the Raspberry Pi Zero W

Mini UART and CPU core frequency

To use the Mini UART, the VPU core frequency needs to be fixed.  

At the very end of config.txt, add:

enable_uart=1

core_freq=250

Disable Linux serial console

Reconfigure the linux console:

sudo raspi-config

select option 3 - Interface Options

select option P6 - Serial Port

At the prompt answer No, and then Yes

Exit

Run program on startup:


make a directory for the code:

mkdir ~/serial

cd ~/serial

Make a new file:

sudo nano serialRead.c

'/dev/ttyUSB0'

Commands used:

dmesg | grep tty

ps aux | grep serial