Posts Tagged ‘GPIO’

LogoDesignVertOp

I love hearing about how people are using the Pi-Stop to discover and learn, many thanks for sending me your stories of what you have got up to with them.

Remember you can now buy them directly from 4Tronix and also CPC Farnell.

I recently I was asked about using them with Python, well it was always my intention to produce a full Python workshop with the Pi-Stops, but I hadn’t quite got around to it.  Although there is the Python Pirate workshop, which I ran back on 29th Nov 2014, it used a rather specific python module for to make the Pi-Stop function as a lighthouse signal (lighthouse.py).

I decided it was about time I created a more general python module for the Pi-Stop.  So I have!

Check out the Pi-Stop Github for details and let me know how you get on with it (and feel free to add/request changes).  I shall add additional comments to the file and some additional tips on how to use it, but it should make a good starting point.

Get the module here: pistop.py

Note: It will work with the Raspberry Pi 2 (as well as Model+ versions – in all 6 locations).  But you will need the latest RPi.GPIO (version 0.5.11) for all the pins to work correctly.

Using the new Raspberry Pi 2 (or Model A+/B+) you can run up to 6 Pi-Stops independently, directly off the GPIO header.

When I get chance I’ll start writing some workshops which make use of it, as well as one which explains how it is constructed.

Enjoy!

Advertisements

I’m pleased to announce the Pi-Stop is now available to pre-order from the 4Tronix.co.uk shop.

http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390

The Pi-Stop

 

Take a look at the product page on the 4Tronix site for more details, or on my site, or take a look at the resources available via GitHub (contains a range of workshop materials and resources available to use or adapt for your own needs).

I look forward to sharing this exciting new add-on with everyone!

Sometimes it can be simple.

Posted: January 30, 2013 in Guides
Tags: , , , ,

I’ve been writing some GPIO control stuff recently using a few different languages and tonight it was the turn of python.
Now from using different languages I’ve grown accustomed to using the BCM references for the GPIO pins.  However as some of you may know, these differ slightly between Rev1 and Rev2 of the boards so it is important to ensure your code matches and is easily adapted for the board you are using.

Pinout for Rev1 and Rev2 RaspberryPi

Diagram includes BCM GPIO references (GPIO.BCM), common functions, Header GPIO references, and Pin numbers (GPIO.BOARD).

An easy solution is simply to use a define for each and edit the code accordingly.  But for python I’d often heard it suggested to automatically detect the revision of the board, which seems very sensible to me.

(more…)

Making circuits and trying things out shouldn’t be difficult and with a few basic items you can get started straight away!

Prototype of H-Bridge Motor Controller on a Breadboard

Prototype of H-Bridge Motor Controller on a Breadboard (as featured in MagPi Issue 8)

 

For more information take a look at the:

Guide to…Breadboarding

Adafruit’s Pi T-Cobbler

I recently received the Pi T-Cobbler, a very convenient way to interface with the Raspberry Pi.  It takes the GPIO header and breaks it nicely out into two neatly labelled rows and plugs directly into a breadboard.

Pi-TCobbler Supplied By AdaFruit

Pi T-Cobbler Supplied By AdaFruit

(more…)