Skip to content

Install on Raspberry Pi

Chris Rowe edited this page May 3, 2015 · 18 revisions

Before you get started

Required Hardware

  1. Raspberry Pi – Grab one from http://www.adafruit.com/products/2358 if you don't have one already
  2. 8GB SD Card (Smaller cards may work)
  3. Sensor

3 Setup Options

Keyboard/mouse/monitor

  1. Hardware: keyboard, mouse, hdmi cable + power supply + usb cable + ethernet cable + monitor
  2. Install OS: instructions to setup NOOBS are the easiest way to install if you did not get a card with Raspian pre installed.

Console Cable

  1. Hardware: console cable + ethernet cable
  2. Install OS: Download + install (Raspian)
  3. Connect: using a console cable

SSH

  1. Hardware: ethernet cable + power supply + usb cable
  2. Install OS:
  3. Connect:

OS/software check

Before we do anything else

sudo apt-get update // This makes sure your package list is up to date.

To check what OS is on your Pi use lsb-release

sudo apt-get install lsb-release // Install
lsb_release -a // Run

You should see

Distributor ID: Debian
Description: Debian GNU/Linux 7.x (wheezy)
Release: 7.x
Codename: wheezy

Check your node version.

$ node --version // v0.10.x is recommended if you will be interacting with USB devices

If node is not installed or an older version...

wget http://node-arm.herokuapp.com/node_0.10.36_armhf.deb
sudo dpkg -i node_0.10.36_armhf.deb
# Check version again  
node -v

OPK setup

mkdir drivers
cd drivers
git clone https://github.com/openpipekit/opk-temper1-cli.git
git clone https://github.com/openpipekit/opk-phant-cli.git
 
./opk-temper1-cli/install
sudo ./opk-temper1-cli/detect
 
sudo ./opk-temper1-cli/pull --path 0001:0005:01 --scale farenheit
 
sudo ./opk-temper1-cli/pull --path 0001:0005:01 --scale farenheit | ./opk-phant-cli/push --url data.sparkfun.com --public_key NJymJmGb9otlJgXpJRVz --private_key 5dyndn9mb1tE26ev2WAn --field_name temp
 
watch -n60 "sudo ./opk-temper1-cli/pull --path 0001:0005:01 --scale farenheit | ./opk-phant-cli/push --url data.sparkfun.com --public_key NJymJmGb9otlJgXpJRVz --private_key 5dyndn9mb1tE26ev2WAn --field_name temp"

TIPS:

Screen

  • screen /dev/cu.usbserial 115200
  • detach C-a d
  • screen -x

http://aperiodic.net/screen/quick_reference