From charlesreid1

A guide to hacking on the Raspberry Pi, a microcomputer that runs a full stack Linux OS, all on a mobile processor:

RaspberryPi PluggedInRPi.jpg

Installing

The page containing instructions for installing an operating system on the Raspberry Pi is over at RaspberryPi/Installing


Interfacing with Headless Pi

If you are running a headless Raspberry Pi, you can follow these instructions for modifying the Raspberry Pi boot sequence so that you can find your Pi on a network: RaspberryPi/Headless


First Steps with Pi

You can find a guide to your first steps with Raspberry Pi, mainly covering the setup process for Raspbian Linux: RaspberryPi/First Steps

Run Web Server on Pi

You can find a guide to running a lightweight web server with Flask or something similar over at RaspberryPi/Web Server

Raspberry Pi Projects

Raspberry Pi Timelapse Photo

Software

Since I hadn't connected my Pi to the net in a while, the first thing I did was to update the package manager:

sudo apt-get update

Next, I upgraded the operating system:

sudo apt-get dist-upgrade

With all of the updating and upgrading out of the way, I moved on to the actual Raspberry Pi camera itself. There is a Python module to control the Pi camera, available through aptitude:

sudo apt-get install python-picamera python-picamera-docs

However, I was still not able to use my camera, because I had to run the Raspberry Pi configuration program. To run it:

sudo raspi-config

You enable the Raspberry Pi camera in the configuration menu.

Setup

The setup I had used one of these as the camera. This is a whopping 5 MP, which is as good as a point-and-shoot, except it's extremely tiny. I was able to get it hooked up to my Raspberry Pi and working just fine with the above steps.

You can use Python code to trigger the camera to take a picture, and you can specify a filename to save to. Here's a quick script I hacked together to take a picture every 2 seconds, and save it to sequentially-numbered files (0001.jpg, 0002.jpg, etc.):

# pic.py

import picamera
import time

camera = picamera.PiCamera()

i = 0
while True:

    filename = "%04d.jpg"%(i)

    camera.capture(filename)
    print "Saving photo to %s"%(filename)

    i += 1
    time.sleep(2)

To run this, I use screen. I log in remotely, then run the screen command. In that screen I run python pic.py. It will print out as it progresses. Running it with screen allows you to disconnect and leave the Pi unattended.


Hello World LED Circuit with GPIO

This project controls a simple LED circuit with the Raspberry Pi's onboard GPIO cable. A python code is used to send high/low voltage signals to pins on the GPIO, and make an LED on a breadboard blink.

Hello_World_Arduino_Pi


Kali Linux on Raspberry Pi

Getting deeper into the world of networking and using the Pi to analyze networks: Kali Pi

Resources