Archive for the ‘Pi and Python’ Category

New blog for our Tuesday computer science stuff

Friday, October 5th, 2012

http://www.novitiate.co.uk

I have created this new blog and transferred all previous posts to do with the Raspberry pi, python and electronics there.

Why? So you can register and post your own projects, idea, problems and solutions.

Please use your SCHOOL EMAIL when registering and then hassle me to enable your account.

I will no longer use this blog for computer science things.

Gettign started with the Linux command line

Tuesday, October 2nd, 2012

http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything

Worth checking out if you are new to linux.

Updating the firmware for RPI

Monday, October 1st, 2012

https://github.com/Hexxeh/rpi-update

The instructions here will install rpi-updater on your system so you can update firmware if you need to. Dont forget to sudo everything including the line…

wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update

this needs two..

sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update

Logic level. Making the 3.3v GPIO output up to 5v

Monday, October 1st, 2012

Changing 3.3v (GPIO output) to 5v.

http://arduino.cc/forum/index.php?topic=119340.0

I did this and managed to up the 3.3v GPIO output to 4.8v on a prototyping board, might be closer to 5v when soldered.

Robotics servo control

Saturday, September 29th, 2012

Servos work on times pulses that we should be able to program on the GPIOs on the Pi

http://www.robotplatform.com/knowledge/servo/what_makes_a_servo.html

I found a no glue case…

Saturday, September 29th, 2012

http://www.instructables.com/id/RPi-House/

Might be worth trying out

Maplin robot arm on PI

Tuesday, September 25th, 2012

Tricky one this, the modules were the pain

Step 1: Install wxPython – I think this is the GUI module

sudo apt-get update

sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n

Step 2: Install PyUSB – so python can interact with the robot arm by USB. I ended up having to install PIP to get this sorted.

sudo apt-get install python-pip

sudo pip install pyusb

Then the .py files which are available on this guys blog… but to get it workign you have to hunt around at a number of posts and find his code on googlecode

http://python-poly.blogspot.co.uk/2011/01/another-version.html

you need the files;

arm_1_1.py – used to process text files with movement instructions
arm_gui.py – run if you just want to control the arm directly
arm_control.py – the actual code used by the above two programs

Mr Mac has them if you need them.

Python portable setup for a USB memory stick

Monday, September 24th, 2012

http://www.portablepython.com/wiki/Download

Get both version 2 and 3.

GPIO instructions for PI

Friday, September 21st, 2012

step 1:
Update your Python installs with the python dev package. This will avoid a “fatal error: Python.h: No such file or directory”

sudo apt-get install python-dev

step 2:
download the GPIO module. The version may change so ensure you check for the most up to date version http://pypi.python.org/pypi/RPi.GPIO

At the time of writing the current version was 0.4.0a

wget http://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.4.0a.tar.gz

step 3:
Install the module by extracting…

tar zxf RPi.GPIO-0.4.0a.tar.gz

moving into the extracted directory

cd RPi.GPIO-0.4.0a

and running the installer.

sudo python setup.py install

Step 4:

Cleanup your disc by removing the folder and tar file

cd ..
sudo rm -rf RPi.GPIO-0.4.0a/
rm RPi.GPIO-0.4.0a.tar.gz

Python tutorials

Wednesday, September 19th, 2012

Lets start then…

http://cscircles.cemc.uwaterloo.ca/

http://www.codecademy.com/tracks/python

Then signup to this

http://www.udacity.com/view#Course/cs101/CourseRev/apr2012/Unit/671001/Nugget/675002