background preloader

Hardware

Facebook Twitter

555 Timer Circuits. Feel, Act, Make sense. Instructables. Processing.org. OpenFrameworks.

Learn

Loja. Arduino. AirCasting. BeagleBoard.org. Pandaboard. Raspberry Pi. Wiring. Update: 14th May, 2013 wiringPi version 2 has been released and now has its own website ( to look after it.

Wiring

Most of the documentation on the projects site has been copied over to it the new site, but there may still be 1 or 2 pages that are still missing. I’d encourage you to use the new site if possible where there will be a forum and wiki (when I get time to implement them!) WiringPi is an Arduino wiring-like library written in C and released under the GNU LGPLv3 license which is usable from C and C++ and many other languages with suitable wrappers (See below) You may be familiar with the Arduino… Briefly; Arduino is really two things; one is a hardware platform, the other software, and part of the software is a package called Wiring. The Raspberry Pi has a 26-pin General Purpose Input/Output (GPIO) connector and this carries a set of signals and buses. The Revision 2 Raspberry Pi has an additional 4 GPIO lines on a separate connector which you have to solder onto the board.

WiringPi-Python. Wiringpi 1.0.5. A python interface to WiringPi library which allows for easily interfacing with the GPIO pins of the Raspberry Pi.

wiringpi 1.0.5

Also supports i2c and SPI WiringPi: An implementation of most of the Arduino Wiring functions for the Raspberry Pi Prerequisites: You must have python-dev installed If you manually rebuild the bindings with swig -python wiringpi.i then cat wiringpi_class.py >> wiringpi.py to get the class-based wrapper Get/setup repo: git clone cd WiringPi-Python git submodule update --init Build & install with: RPi.GPIO 0.4.1a. A module to control Raspberry Pi GPIO channels This package provides a class to control the GPIO on a Raspberry Pi.

RPi.GPIO 0.4.1a

Note that this module is unsuitable for real-time or timing critical applications. This is because you can not predict when Python will be busy garbage collecting. It also runs under the Linux kernel which is not suitable for real time applications - it is multitasking O/S and another process may be given priority over the CPU, causing jitter in your program. If you are after true real-time performance and predictability, buy yourself an Arduino ! Note that the current release does not support SPI, I2C, PWM or serial functionality on the RPi yet. Example Usage : RPiconfig. As the Raspberry Pi doesn't have a conventional BIOS, the various system configuration parameters that would normally be kept and set using the BIOS are now stored in a text file named "config.txt".

RPiconfig

The Raspberry Pi config.txt file is read by the GPU before the ARM core is initialized. This file is an optional file on the boot partition. It would normally be accessible as /boot/config.txt from Linux, but from Windows (or OS X) it would be seen as a file in the accessible part of the card. To edit the configuration file, see the instructions at R-Pi_ConfigurationFile. You can get your current active settings with the following commands: vcgencmd get_config <config> - lists a specific config value. The format is "property=value" where value is an integer. Note: In the newer Raspberry Pi models there is # before every line, if you want changes to have an affect then 'uncomment' meaning remove the #. Adafruit Python. Raspberry Pi Pinout. 3v3 Power The 3v3, 3.3 volt, supply pin on the Pi has a max current draw of 50 mA, enough to power a couple of LEDs but not much more.

Raspberry Pi Pinout

You should use the 5v0 supply instead, and use a regulator if you need 3v3. BCM pin 0 on Rev 1 board and pin 2 on Rev 2 board. WiringPi pin 8. Ladder Board Small Green LED. It's easy to get started writing a digital HIGH or LOW to a GPIO pin, but you've got to remember a few things: Run your script as root Set your pin's mode to OUTPUT (1) Assuming you've installed WiringPi2-Python ( pip install wiringpi2 ) then try pasting the following into a .py file: import wiringpi2 as wiringpiHIGH = 1LOW = 0OUTPUT = 1INPUT = 0wiringpi.wiringPiSetup()wiringpi.pinMode(8,OUTPUT)wiringpi.digitalWrite(8,HIGH) Then run it with: sudo python myscript.py BCM pin 1 on Rev 1 board and pin 3 on Rev 2 board.

Require 'wiringpi2'HIGH = 1LOW = 0OUTPUT = 1INPUT = 0io = WiringPi::GPIO.newio.pin_mode(9,OUTPUT)io.digital_write(9,HIGH) Coder for Raspberry Pi. A simple way to make web stuff on Raspberry Pi.

Coder for Raspberry Pi

Coder is a free, open source project that turns a Raspberry Pi into a simple platform that educators and parents can use to teach the basics of building for the web. New coders can craft small projects in HTML, CSS, and Javascript, right from the web browser. Download Coder. Fritzing.