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

Instructions for installing an operating system on the Raspberry Pi: RaspberryPi/Installing


After Installing: Interfacing with Headless Pi

Instructions for interfacing with headless Raspberry Pis, including how to change their boot sequence to find them on a network: RaspberryPi/Headless


After Installing: 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

Raspberry Pi Projects

Hardware Focus

Most recent projects listed first.

Making an Internet of Things Morse Code Keyer with Raspberry Pi

Combining the morse code example below with Flask, a lightweight web server for Python, allows us to create an API for remotely controlling the Raspberry Pi. We can then use the Raspberry Pi to send morse code with the LED.

Here are the details: RaspberryPi/IoT Morse Code Keyer

Morse Code on Raspberry Pi

This page has more details on a quick-and-easy way to get a Morse code library I wrote in Python up and running on the Raspberry Pi: RaspberryPi/Morse Code

Raspberry Pi Timelapse Photo

You can find a short guide to how I built a Raspberry Pi time lapse photo camera here:

RaspberryPi/Timelapse

Hello World LED Circuit with GPIO

This project controls a simple LED circuit with the Raspberry Pi's onboard GPIO cable: Hello World Raspberry Pi

This project uses a python code to send high/low voltage signals to pins on the GPIO, and make an LED on a breadboard blink.

Software Focus

Run Web Server on Pi

You can find a guide to running a lightweight web server with Flask or something similar:

RaspberryPi/Web Server

Kali Linux on Raspberry Pi

Getting deeper into the world of networking and using the Pi for security and networking applications:

Kali Raspberry Pi

Tor Proxy with Pi

More info here: [1]


Wifi Access Point

Installing Requisite Software

Basically, you will be setting up your Pi as a host access point, which requires some software. Specifically, here is the software required:

$ sudo apt-get install hostapd isc-dhcp-server

Set Up DHCP Server

Next, set up the DHCP server by editing /etc/dhcp/dhcp.conf

Remove the following two lines by commenting them out:

option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

Next, add the word "authoritative;" to the section where it gives you information. You should see this in your file:

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

Finally, add the following lines to set up the IP address assignment/configuration:

subnet 192.168.42.0 netmask 255.255.255.0 {
	range 192.168.42.10 192.168.42.50;
	option broadcast-address 192.168.42.255;
	option routers 192.168.42.1;
	default-lease-time 600;
	max-lease-time 7200;
	option domain-name "local";
	option domain-name-servers 8.8.8.8, 8.8.4.4;
}

Set Up DHCP Interfaces

Next, edit the file /etc/default/isc-dhcp-server and update the INTERFACES section to read:

INTERFACES="wlan0"

Now disable the wlan0 interface:

sudo ifdown wlan0

Now change the wlan0 network interface so that it will use manually-assigned IP address information, instead of trying to set everything automatically. Edit /etc/network/interfaces and add/change the lines:

# auto wlan0
allow-hotplug wlan0

iface wlan0 inet static
    address 192.168.42.1
    netmask 255.255.255.0

Finally, edit /etc/hostapd/hostapd.conf to set up the wireless network:

interface=wlan0
driver=rtl871xdrv
ssid=Pi_AP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Note that the driver=rtl871xdrv line may need to change.

More Info

More info here: [2]

Powering the Pi via UART/Serial

UART = Universal Asynchronous Receive/Transmit

While you can normally interface with and power the Pi by plugging it into a computer or a wall wart via the mini USB port, you can also power the Pi via the pins on the board, and communicate with the Pi via a serial connection. This uses the 5V, Ground, TX, and RX pins that are on the right side (the 5V side) of the pins on the Pi board.

By plugging these into a USB serial adapter, which is plugged into a computer, the connection can be used to provide power and a connection to the Pi.

More details: http://villagescience.org/running-raspberry-pi-usb-serial-ttl-adapter/

Notes by Date

Raspberry Pi 2015-07-29 - basic hello world

Raspberry Pi 2015-07-30 - basic hello world writeup

Raspberry Pi 2015-07-31 - morse code writeup, Flask Web API to control hardware

August 2015 - notes from august 2015

August 2016 - notes from august 2016

Resources