Difference between revisions of "250a Accelerometer Lab"

From CCRMA Wiki
Jump to: navigation, search
(Make Some (musically-expressive, gesture-controlled) Music!)
 
(62 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<font size=5>Lab 4: Accelerometers, Audio Filters, and (optionally) Multitouch</font><br>
+
<font size=5>Lab 5: Accelerometers, Audio Filters & Graphics</font><br>
Due on Wednesday, October 21th at 5PM
+
See [https://ccrma.stanford.edu/courses/250a/schedule.html this quarter's schedule] for due dates.
  
For this lab you need an iPod Touch (loaners are available) or an iPhone running TouchOSC, and Max/MSP or Pd on a computer.
+
== Set up for lab ==
  
== Get Connected and Get Oriented ==
+
First start up your kit
Download https://ccrma.stanford.edu/courses/250a/labs/lab4/lab4.zip
+
Connect your Satellite CCRMA kit to your laptop and boot it.
 +
* Use a terminal window to login to Satellite CCRMA as usual using the command <code>ssh -XY ccrma@192.168.105.106</code> with the password <code>temppwd</code>.
 +
* Check that your kit has access to the internet through you laptop. You can do this by trying to ping Bing. Run the command <code> ping bing.com</code>/ If it is successful, it will tell you how long it takes to send a packet from your Satellite CCRMA kit to Bing and back.  
  
If you are using Max/MSP and do not have the OSC objects installed, you need to get them from CNMAT. You may find it useful to get their entire suite of max objects from http://cnmat.berkeley.edu/downloads
+
Now copy the lab files to your kit.  
 +
* At the command line in the terminal window, type <code> wget http://ccrma.stanford.edu/courses/250a/labs/lab5.zip </code> to download the lab5 files to your Beagleboard.
 +
* Unzip the file: change into your ~/ directory, and type <code>unzip lab5.zip</code>. This should create a folder called lab5/ with all the files you need.
  
iPod Touches, like many newer portable electronic devices, have a 3-axis accelerometer in them, which allows designers to take into account both orientation of the device with respect to gravity as well as detecting physical gestures that are made with the phone.
+
Run the command <code>arduino &</code> to start the Arduino IDE. 
 +
*Use the Arduino IDE to flash your Arduino with Standard Firmata. (See [https://ccrma.stanford.edu/wiki/Talk:250a_Microcontroller_%26_Sensors_Lab_Pd#Prepare_Arduino this link] if you forget how.)
  
For this lab, instead of writing our own iPod applications (the subject of an entire course), we will use an iPod app called TouchOSC to send accelerometer data