Introduction: Pi and Arduino Setup and First Run

for you!!!

Step 1: Insert the Sd Card

Step 2: Erase the Sd Card

open disk utility

call it boot

change drop down to ms-dos (fat)

Step 3: Download and Install PiBakery

Step 4: Get the PiBakery Setup File From Google Drive 1.xml

it called 1.xml

Step 5: Import 1.xml in to PiBakery

change the Network to your network

change the pass to the Network password

leave the Key the same, that is the password that I will use when I say PI_PASS

Step 6: Write the Card

write to BOOT SD card

with the Raspbian Full Operating System

Step 7: Wait Until It Has Written Successful

Step 8: Put Sd Card in Pi

connect hdmi

connect mouse

connect keyboard

connect power

Step 9: Wait Until It Boots to the Gui

can take I while, Keep the faith!!!

Step 10: Find the Ip Address of the Pi

open a LXTerminal window

sudo ifconfig

in my case the ip address is 192.168.2.50

if it is 127.0.0.1 then check that it is connected to your wifi

Step 11: Setup Ssh to the Pi From Your Mac

go back to your mac

open a terminal window

ssh to the pi with this .. ssh pi@pi ip address

in my case it is

ssh  pi@192.168.2.50 

enter < yes > for the key fingerprint

enter the PI_PASS password

you should now be login in as pi@highChair:~ $

Step 12: Add a Folder for Openframeworks

make a folder

mkdir openframeworks 

cd into it

cd openframeworks 

should be /home/pi/openframeworks

Step 13: Great

Step 14: Go to Goole Drive Download OpenFrameworks_high_chair.dmg on the Mac

download openFrameworks_high_chair.dmg

Step 15: Open the Dmg (mount It)

it has all of openframeworks and the code for the app in it

it is imported that the dmg is mounted for future steps

Step 16: Copy Dmg to the Pi

copy the content of the dmg to the openframeworks folder on the pi

open a terminal window on the mac

scp -r /Volumes/openFrameworks/ pi@pi ip address :/home/pi/openframeworks

in my case

scp -r /Volumes/openFrameworks/ pi@192.168.2.50:/home/pi/openframeworks 

enter the PI_PASS when prompted

wait a long time.......... .. . ... ... ..

Step 17:

Step 18: Install the Dependencies on Pi _ssh_

cd /home/pi/openframeworks/openFrameworks/scripts/linux/debian
sudo ./install_dependencies.sh

say Y wen asked

then wait about an hour

then say Y again

wait about 2 mins then done

Step 19: Plug the Usb From the Arduino in to the Pie

Step 20: Run the App!!!

cd /home/pi/openframeworks/openFrameworks/examples/empty/emptyExample

make run

Step 21: Push the Buttons on the Keyboard

so on the pi keyboard keys are

q = play

a = pause

z = stop

w = rewind

s = SelTrack // hafe working, need a path, we need to chat about how you want it to work

x = status

e = getAllPaths

on the ardunio these are the commands that you need to trigger to do something are....

play

sendToPi("P");

pause

sendToPi("p");

stop

sendToPi("s");

rewind

sendToPi("r");

selTrack // this path is not valid

sendToPiChangeTrack("t","sounds/test10.mp3”);   

status

sendToPi("S");

getAllPaths

sendToPi("W");

Step 22: Get the Latest Version From Bitbucket

go to the folder
cd /home/pi/openframeworks/openFrameworks/examples/empty/emptyExample
git fetch && git checkout master
git pull

the password is PI_PASS from before

then make the app this will take time as it need to compile openframeworks

make 

then

make run 

Step 23: The Webapp Is Up Too

webApp

the credentials are in the google drive in the heroku doc

Termail
$ heroku login

See the logos

heroku logs --tail

Update the web app with git

git add . 
git commit -m "whatever" 
git push heroku master

Step 24: The Location of the Web App