RASPBERRY PI: Getting started with UART/Serial Port

Install WiringPi

sudo apt-get install python-dev
sudo apt-get install python-setuptools
git clone https://github.com/WiringPi/WiringPi-Python.git
cd WiringPi-Python
git submodule update –init
at ~/WiringPi-Python/WiringPi/wiringPi/piNes.c change < to the ” at #include “wiringPi.h”
sudo python setup.py install

git clone git://git.drogon.net/wiringPi

;or for update (if already cloned before)
cd wiringPi
git pull origin

/boot/cmdline.txt
; original contents
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

;new contents

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

working with GPIO
sudo apt-get install python-rpi.gpio

Comments are closed.