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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s