background preloader

Bcm2835: C library for Broadcom BCM 2835 as used in Raspberry Pi

Bcm2835: C library for Broadcom BCM 2835 as used in Raspberry Pi
This is a C library for Raspberry Pi (RPi). It provides access to GPIO and other IO functions on the Broadcom BCM 2835 chip, as used in the RaspberryPi, allowing access to the GPIO pins on the 26 pin IDE plug on the RPi board so you can control and interface with various external devices. It provides functions for reading digital inputs and setting digital outputs, using SPI and I2C, and for accessing the system timers. Pin event detection is supported by polling (interrupts are not supported). It is C++ compatible, and installs as a header file and non-shared library on any Linux-based distro (but clearly is no use except on Raspberry Pi or another board with BCM 2835). The version of the package that this documentation refers to can be downloaded from You can find the latest version at Several example programs are provided. Running as root Installation tar zxvf bcm2835-1.xx.tar.gz . make Reboot. Related:  Rasberry Pi

GPIO Library 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

Project - RaspyFi - Voyage mpd on Raspberry Pi - RaspyFi Project Dear beloved RaspyFi Users RaspyFi has evolved into Which is compatible with Raspberry Pi, Udoo, Cubox and Beaglebone Black. RaspyFi website will remain available for archive references, every new activity will be on Volumio.org See you there! Raspberry pi – Setting up auto-login and auto-loading the gui | Frustrated IT Engineer Home > How To, Raspberry pi, Technology > Raspberry pi – Setting up auto-login and auto-loading the gui Setting up Auto-Login In the GUI left click in the bottom left hand corner on the blue cross to display the options menu (Like the start button in windows) Go up to “other” and then scroll down the list until you get to “terminal” and left click You should now see the “terminal” window which is just like a cmd box in windows and enter the following command Sudo nano /etc/inittab This will open up the boot time system configuration script. Scroll down the file until you reach the line ’1:2345:resoawn:/sbin/getty 115200 tty1′ When you see that line, put a hash # in front of it to disable that line then scroll to the end of line and hit enter. In the blank line that appears add the following command 1:2345:respawn:/bin/login -f pi tty1 / dev/tty1 2>&1 Don’t forget to add the spaces and double check that the line enter is correct. Press Ctrl+X to exit followed by Y to accept the changes. Startx

Step01 – Bare Metal Programming in C Pt1 – Valvers Although the Raspberry-Pi comes with a good Linux distribution, the Pi is about software development, and sometimes we want a real-time system without an operating system. I decided it’d be great to do a tutorial outside of Linux to get to the resources of this great piece of hardware in a similar vein to the [Cambridge University Tutorials]( which are excellently written. However, they don’t create an OS as purported and they start from assembler rather than C. I highly recommend going through the Cambridge University Raspberry Pi tutorials as they are excellent. Cross -Compiling for the Raspberry Pi (BCM2835/6) The GCC ARM Embedded project on Launchpad gives us a GCC toolchain to use for ARM compilation on either Windows or Linux. >arm-none-eabi-gcc arm-none-eabi-gcc: fatal error: no input files compilation terminated. Compiler Version -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s Github part-1/armc-00 ... ...

RPi config.txt 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 #!

Hacking a Raspberry Pi into a wireless airplay speaker - Jordan Burgess The raspberry pi is fully functional credit card-sized computer that is cheap enough ($25) that it can be used just for a single purpose. With this hack the computer imitates an airplay speaker, making it possible to send songs over to an old stereo wirelessly from your phone. The Raspberry Pi generated massive hype in nerdy circles this summer when it came out and we’re beginning now to see some amazing hacks from this tiny computer now. I’ve had mine for a few months now but I hadn’t got around to using it yet. So I’ve now decided to try to make something that I’ve wanted for a while: a product to bring my good but dated speaker system into the 21st century by enabling wireless streaming of music to it. A possible way to do this would be to buy an Airport Express or an Apple TV and connect the audio out to the stereo. Here’s a video of it in action. How to fake airplay compataility To get a Raspberry Pi looking like an airplay receiver I made use of Shairport. Raspberry Pi Graphical method

Passwordless SSH Using Shared Keys This is something I use quite often to ease automated (ie, scripted) jobs that are run on a host that needs to connect to another host via SSH/SCP. Just an aside, my favorite alternative to using shared keys for (faux) passwordless connections is an expect script that "expects" a password prompt, which expect will hand back to the host. But that approach is almost always more difficult, requires an understanding of the expect language and is generally less secure. So, below is one method of implementing shared key authentication for passwordless SSH connections. Just tell me how to do it already! OK :-) For the purposes of this example, I'll refer to the host we're connecting from as host1 and the host we're connecting to (without a password) as host2 Generate a shared key on host1 (the shared key will be /home/user/.ssh/id_rsa.pub) user@host1:~$ ssh-keygen -t rsa -b 1024 Generating public/private rsa key pair. That's it!

s Raspberry Pi Lesson 11. DS18B20 Temperature Sensing @Raspberry_Pi #raspberrypi January 29, 2013 AT 8:28 am Adafruit’s Raspberry Pi Lesson 11. DS18B20 Temperature Sensing @ The Adafruit Learning System. The Occidentalis Linux distribution for Raspberry Pi (and Raspbian as of Dec 2012) includes support for the DS18B20 1-wire temperature sensor. Learn more! OAdafruit’s Raspberry Pi Lesson 10. Stepper motors fall somewhere in between a regular DC motor (Lesson 9) and a servo motor (Lesson 8]). Learn more! Adafruit’s Raspberry Pi Lesson 9. This lesson describes how to control both the speed and direction of a DC motor using Python and a L293D chip. Learn more! Adafruit’s Raspberry Pi Lesson 8. This lesson describes how to control a single servo motor using Python. Learn more! Adafruit’s Raspberry Pi Lesson 7. In this lesson we will explain how to install and use VNC on your raspberry Pi. Learn more. Tutorial: Adafruit’s Raspberry Pi Lesson 6. In this lesson you will learn how to remote control your Raspberry Pi over your local network using Secure Shell (SSH). Learn more.

Raspberry Pi | Wiring | Download & Install WiringPi is now maintained under GIT for ease of change tracking, however there is a Plan B if you’re unable to use GIT for whatever reasons (usually your firewall will be blocking you, so do check that first!) If you do not have GIT installed, then under any of the Debian releases (e.g. Raspbian), you can install it with: sudo apt-get install git-core If you get any errors here, make sure your Pi is up to date with the latest versions of Raspbian: sudo apt-get update sudo apt-get upgrade To obtain WiringPi using GIT: git clone If you have already used the clone operation for the first time, then cd wiringPi git pull origin Will fetch an updated version then you can re-run the build script below. To build/install there is a new simplified script: cd wiringPi . The new build script will compile and install it all for you – it does use the sudo command at one point, so you may wish to inspect the script before running it. Plan B

TinyBASIC One: Documentation This page documents features of TinyBASIC Two 2.1, released 23rd December 2012. Like man-pages?, then check-out the man-page (pdf). Editor Commands list [line] display the contents of the current program. list <line> lists the program from the selected line until the end. edit <line> simple line-based command to re-edit a program statement run execute the current program save [filename] save the program to a disc file. load <filename> load the program buffer from an existing Linux file new discard the current program and start again trace [on|off] set command tracing "on" or "off" or show current setting flavour [vanilla|raspberry] select a flavour or show current flavour. renumber [first[,step]] renumber current program. renumber undo restore program buffer to version before last renumber cd [dir] change working directory. ls show files stored in current directory pwd show name of current working directory help [help] Notes for Porting Code from Palo Alto to TinyBASIC Two Supported Colours with Graphics

sweet pi – sweet home - Funksteckdosen mit dem Raspberry Pi und pilight schalten Funksteckdosen mit dem Raspberry Pi und pilight schalten Da sich hier einiges geändert hat, habe ich mich dafür entschlossen einen neuen Anleitung zum Thema Funksteckdosen schalten mit dem Raspberry Pi zu schreiben. Das Projekt von CurlyMoo auf das sich die alte Anleitung bezogen hat wurde vom Autor CurlyMoo mittlerweile um einiges verbessert und erweitert und heißt nun pilight. Nachtrag vom 25. November 2013: Nun ist die Anleitung auf pilight 2 angepasst. Hier beschreibe ich das vorgehen für die Intertechno Funksteckdosen welche auf 433MHz Basis über Funk schaltbar sind. Was wird zusätzlich benötigt: Die Empfänger sind nicht gerade die Besten, aber sie reichen aus (zumindest bei mir) um den Code der Fernbedienung einmalig auszulesen. 1. Zuerst muss man die für die Installation nötigen Pakete installieren: sudo apt-get install build-essential dialog cmake git Dann kann pilight von CurlyMoo heruntergeladen, kompiliert und installiert werden. Dann die setup.sh ausführbar machen und ausführen.

Windows Installation Windows installation is very simple and works on Windows 2000 / XP, Vista and Seven. First, fetch the Windows installer from this link here and extract the contents to a folder. Next up, run the program called “setup.exe”, you may receive a UAC prompt if running Vista or later. You will now be presented with an interface such as this: Your SD card should be shown on the list. WARNING: This program enumerates ALL removable devices on the system, data loss can occur and I will not be responsible if you image the wrong device. Note if you want to use your SD card for purposes other than Raspbmc and the card only appears to be about 60MB in Windows: That’s because Windows does not recognise the Linux partitions that Raspbmc uses.

Computer Laboratory: Computer Lab Raspberry Pi Tutorials Welcome to the tutorials page. This is where we showcase projects and tutorials created by students during the summer vacation. Each year the Raspberry Pi Foundation supports a number of summer vacation research opportunities for undergraduates (from a range of departments) involving projects with the Raspberry Pi. More tutorials will appear over time, so please check back often. We'd also be very grateful for feedback on the tutorials, from "I got lost" to "there's a typo here" to "you need a picture of this here". More inspiration If you are a local student and have your own tutorial, or an idea for one, why not contact us. Licensing The tutorials are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. All code is licensed under the MIT license. 2012 Summer students

Raspberry PI and Nagios Open Source monitoring » I-Security - news and security tutorials Nagios and Raspberry Pi You may all ask what does security have to do with Nagios? Well, it does. If you can’t know the status of your network / server, you won’t see a problem coming. So, here comes Nagios – an open source monitoring system that includes tons of popular plug-ins. Well, what about Raspberry PI? In this part of the tutorial I will start treating the subject of the Nagios installation on the Raspberry PI. As an OS, I have used a SD card preloaded with Debian “squeeze” 6 (download it from here: torrent or direct download). Once you have the SD ready attach-it to the Raspberry PI and power it up! We will be using a lot apt-get, so it’s better to refresh its repository (if you are behind a proxy use “export http_proxy= to set the proxy for apt-get). My RaspBerry PI up and running Please take into account that Debian comes with a pre-compiled Nagios (3.2) that can be installed with-out any trouble with this command: apt-get install nagios3. And make:

Related: