Last active
August 29, 2015 14:26
-
-
Save carlosvega20/2a4282d80cd82a9360ca to your computer and use it in GitHub Desktop.
Configure Rasperry Pi, I2C and The RPi.GPIO Python Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#You need to enable i2c port | |
#sudo raspi-config | |
# Choose option: (8) Advanced Options | |
# A7 I2C and then enable yes. | |
#sudo reboot | |
#Update and install python rpi | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install python-dev python3-dev | |
sudo apt-get install python-rpi.gpio python3-rpi.gpio | |
#Get RPi.GPIO and install on python | |
wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz | |
tar zxvf RPi.GPIO-0.5.11.tar.gz | |
cd RPi.GPIO-0.5.11 | |
sudo python setup.py install | |
cd .. | |
rm -rf RPi.GPIO-0.5.11 | |
rm RPi.GPIO-0.5.11.tar.gz | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment