background preloader

Hardware

Facebook Twitter

555 Timer Circuits. Feel, Act, Make sense • Sen.se. 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. 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. WiringPi includes a command-line utility gpio which can be used to program and setup the GPIO pins. Pin numbering. 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. 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: sudo python setup.py install Class-based Usage: import wiringpi io = wiringpi.GPIO(wiringpi.GPIO.WPI_MODE_PINS) io.pinMode(1,io.OUTPUT) io.digitalWrite(1,io.HIGH) GPIO with /sys/class/gpio (You must first export the interfaces): import wiringpi io = wiringpi.GPIO(wiringpi.GPIO.WPI_MODE_SYS) io.pinMode(1,io.OUTPUT) io.digitalWrite(1,io.HIGH) Serial: serial = wiringpi.Serial('/dev/ttyAMA0',9600) serial.puts("hello") serial.close() Usage:

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. 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 : 0.4.1a Added VERSION Permit input() of channels set as outputs (Eric Ptak < trouch@trouch.com >) 0.4.0a Added support for Revision 2 boards Added RPI_REVISION Added cleanup() function and removed automatic reset functionality on program exit Added set_rising_event() Added set_falling_event() 0.3.1a 0.3.0a.

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". 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 #. Here is an example file disable_l2cache disable ARM access to GPU's L2 cache. Start_x=1 #! 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.

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) BCM pin 4.

Ground BCM pin 17. BCM pin 22. BCM pin 10. Coder for Raspberry Pi. A simple way to make web stuff on 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 1.33GB | Coder v0.9Now supports Raspberry Pi 2! How to Install and Connect.

Download, unzip, and run the Coder Installer. Mac users, just run the provided installer.PC users, check out our Windows-specific Instructions for more installation details. Insert your new Coder SD card into your Pi, make sure your Pi and your computer are plugged into the network, and power it up. The Pi will be your new web server. On your computer, visit in Chrome to connect to your new Coder and start playing. [Note: You will see a warning about Coder's certificate. Download and run the Coder Installer with any 4GB SD Card. Getting to Know Coder. Click on any app to open it up. Fritzing.