라즈베리 GPIO(python)


GPIO 준비(python)

요즘 raspbian에는 기본적으로 설치되있는듯 합니다

Installing latest raspbian has rpi.gpio

The RPi.GPIO module is installed by default in Raspbian. To make sure that it is at the latest version:

$ sudo apt-get update
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio

To install the latest development version from the project source code library:

$ sudo apt-get install python-dev python3-dev
$ sudo apt-get install mercurial
$ sudo apt-get install python-pip python3-pip
$ sudo apt-get remove python-rpi.gpio python3-rpi.gpio
$ sudo pip install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO
$ sudo pip-3.2 install hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO

To revert back to the default version in Raspbian:

$ sudo pip uninstall RPi.GPIO
$ sudo pip-3.2 uninstall RPi.GPIO
$ sudo apt-get install python-rpi.gpio python3-rpi.gpio

ref: https://sourceforge.net

기본문법 (Basic syntax)

ref: https://sourceforge.net

T-코블러(T-Cobbler)

GPIO핀을 빵보드에 바로 연결해서 사용할 수 있게해줘서 하나쯤 있으면 편합니다

Ref