Index: trunk/code/behaviors/tetris_dance/lab0.c
===================================================================
--- trunk/code/behaviors/tetris_dance/lab0.c	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/lab0.c	(revision 2000)
@@ -0,0 +1,231 @@
+#include <dragonfly_lib.h>
+#include <encoders.h>
+#include <buzzer.h>
+
+/*Colony Lab 0
+ *Dance Competition
+ *Robotics Club Colony Project 2010
+ *
+ *PUT YOUR NAME HERE
+ */
+#define T 100
+#define SPD 190
+int main(void)
+{
+  {
+    
+	/* Initialize dragonfly board */
+	dragonfly_init(ALL_ON);
+	
+	buzzer_init();
+	bom_init(BOM15);
+	orb1_set_color(YELLOW);
+	a6(T/2);
+	orb2_set_color(YELLOW);
+	e7(T*3);
+	delay_ms(T*3);
+	bom_on();
+  }
+	while(1){
+	  {	//i==1
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(BACKWARD, SPD+10);
+			orb1_set_color(GREEN);
+		e6(T*2);
+		b5(T);
+		c6(T);
+			orb2_set_color(GREEN);
+		d6(T*2);
+			orb2_set_color(CYAN);
+		c6(T);
+		
+				motor_l_set(FORWARD, SPD-10);
+				motor_r_set(FORWARD, SPD-10);;
+		b5(T);
+			orb1_set_color(CYAN);
+		a5(T*2);
+		a5(T);
+		c6(T);
+			orb1_set_color(ORANGE);
+			orb2_set_color(ORANGE);
+		e6(T*2);
+			orb1_set_color(RED);
+			orb2_set_color(RED);
+		d6(T);
+		c6(T);
+			orb1_set_color(LIME);
+			orb2_set_color(LIME);
+		b5(T*3);
+		c6(T);
+		d6(T*2);
+			orb1_set_color(BLUE);
+	  }
+
+	{	//i==2
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(BACKWARD, SPD);
+		e6(T*2);
+			orb2_set_color(BLUE);
+		c6(T*2);
+			orb2_set_color(ORB_OFF);
+		a5(T*2);
+			orb1_set_color(ORB_OFF);
+		a5(T);
+		bom_off();
+		
+	{			motors_off();
+		a5(T*1);
+		delay_ms(T*2);
+	}	
+				motor_l_set(FORWARD, SPD-10);
+				motor_r_set(FORWARD, SPD-10);
+
+		delay_ms(T);
+			orb2_set_color(WHITE);
+		d6(T);
+		delay_ms(T);
+			orb1_set_color(WHITE);
+		f6(T);
+			orb1_set_color(PINK);
+			orb2_set_color(PINK);
+		a6(T);
+		c6(T/2);
+		c6(T/2);
+		g6(T);
+		f6(T);
+			orb1_set_color(GREEN);
+			orb2_set_color(GREEN);
+		e6(T*2);
+		delay_ms(T);
+			orb2_set_color(RED);
+			orb1_set_color(RED);	
+		c6(T);
+		e6(T);
+		a5(T/2);
+		g5(T/2);
+
+		d6(T);
+	}				
+	{	//i==3
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(BACKWARD, SPD);
+		c6(T);		
+		b5(T*2);
+
+		delay_ms(T);
+			orb2_set_color(PURPLE);
+			orb1_set_color(PURPLE);
+		c6(T);
+		d6(T*2);
+			orb2_set_color(RED);		
+				motor_r_set(FORWARD, SPD);
+		e6(T*2);
+			orb1_set_color(RED);
+		c6(T*2);
+			orb1_set_color(ORB_OFF);
+		a5(T);
+		a4(T);
+			orb2_set_color(ORB_OFF);
+		a5(T);
+		a4(T);
+		
+	{
+			motors_off();
+		delay_ms(T*2);
+			orb2_set_color(ORANGE);
+			orb1_set_color(ORANGE);
+		e6(T);
+	}
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(FORWARD, SPD);
+		e6(T*3);
+			orb2_set_color(RED);
+			orb1_set_color(RED);
+		c6(T*3);	
+	}	
+	{	//i==4
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(BACKWARD, SPD);
+		c6(T);
+			orb2_set_color(MAGENTA);
+			orb1_set_color(MAGENTA);
+		d6(T*4);
+			orb2_set_color(CYAN);
+			orb1_set_color(CYAN);
+		b5(T*2);	
+			
+				motor_r_set(FORWARD, SPD);
+		b5(T*2);
+			orb2_set_color(PURPLE);
+			orb1_set_color(PURPLE);
+		c6(T*4);
+			orb2_set_color(PINK);
+			orb1_set_color(PINK);
+		a5(T*4);
+			orb2_set_color(BLUE);
+			orb1_set_color(GREEN);
+		ab5(T*4);
+			orb1_set_color(BLUE);
+			orb2_set_color(GREEN);
+		b5(T);
+	}	
+	{	//i==5
+				motor_l_set(FORWARD, SPD);
+				motor_r_set(BACKWARD, SPD);
+		b5(T*2);
+		delay_ms(T);
+			orb2_set_color(ORANGE);
+			orb1_set_color(ORANGE);
+		e6(T*4);
+			orb2_set_color(RED);
+			orb1_set_color(RED);
+			
+				motor_r_set(FORWARD, SPD);
+		c6(T*4);
+			orb2_set_color(MAGENTA);
+			orb1_set_color(MAGENTA);
+		d6(T*4);
+			orb2_set_color(CYAN);
+			orb1_set_color(CYAN);
+		b5(T*4);
+		c6(T*2);
+			orb1_set_color(WHITE);
+		e6(T);
+	}
+				motors_off();
+		
+	{	//CIRCLE
+
+			motor_l_set(FORWARD, SPD);
+			motor_r_set(BACKWARD, SPD);
+		e6(T);
+			orb2_set_color(WHITE);
+			
+		a6(T*4);
+
+	}
+	{	//RESET
+			motor_l_set(FORWARD, SPD+50);
+			motor_r_set(FORWARD, SPD);
+			
+			orb1_set_color(LIME);
+			orb2_set_color(LIME);
+		ab6(T);
+			orb1_set_color(ORB_OFF);
+			orb2_set_color(ORB_OFF);
+			
+			delay_ms(T*13);
+			
+			motor_l_set(BACKWARD, SPD);
+			motor_r_set(FORWARD, SPD);
+			delay_ms(T*3+50);
+	}
+	
+	motors_off();
+	delay_ms(T*5);
+	bom_on();
+	}
+
+
+	return 0;
+}

Property changes on: trunk/code/behaviors/tetris_dance/lab0.c
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/code/behaviors/tetris_dance/music.c
===================================================================
--- trunk/code/behaviors/tetris_dance/music.c	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/music.c	(revision 2000)
@@ -0,0 +1,109 @@
+/*********
+ * Music Library!
+ * Now with twice the fiber!
+ * 
+ *  Jeff Cooper, Fall 2010
+ ***************/
+#ifndef MUSIC_FUNCTIONS
+#define MUSIC_FUNCTIONS
+void c0(int dur){buzzer_chirp(dur, 16);} 
+void db0(int dur){buzzer_chirp(dur, 17);} 
+void d0(int dur){buzzer_chirp(dur, 18);} 
+void eb0(int dur){buzzer_chirp(dur, 19);} 
+void e0(int dur){buzzer_chirp(dur, 20);} 
+void f0(int dur){buzzer_chirp(dur, 21);} 
+void gb0(int dur){buzzer_chirp(dur, 23);} 
+void g0(int dur){buzzer_chirp(dur, 24);} 
+void ab0(int dur){buzzer_chirp(dur, 25);} 
+void a0(int dur){buzzer_chirp(dur, 27);} 
+void bb0(int dur){buzzer_chirp(dur, 29);} 
+void b0(int dur){buzzer_chirp(dur, 30);} 
+void c1(int dur){buzzer_chirp(dur, 32);} 
+void db1(int dur){buzzer_chirp(dur, 34);} 
+void d1(int dur){buzzer_chirp(dur, 36);} 
+void eb1(int dur){buzzer_chirp(dur, 38);} 
+void e1(int dur){buzzer_chirp(dur, 41);} 
+void f1(int dur){buzzer_chirp(dur, 43);} 
+void gb1(int dur){buzzer_chirp(dur, 46);} 
+void g1(int dur){buzzer_chirp(dur, 49);} 
+void ab1(int dur){buzzer_chirp(dur, 51);} 
+void a1(int dur){buzzer_chirp(dur, 55);} 
+void bb1(int dur){buzzer_chirp(dur, 58);} 
+void b1(int dur){buzzer_chirp(dur, 61);} 
+void c2(int dur){buzzer_chirp(dur, 65);} 
+void db2(int dur){buzzer_chirp(dur, 69);} 
+void d2(int dur){buzzer_chirp(dur, 73);} 
+void eb2(int dur){buzzer_chirp(dur, 77);} 
+void e2(int dur){buzzer_chirp(dur, 82);} 
+void f2(int dur){buzzer_chirp(dur, 87);} 
+void gb2(int dur){buzzer_chirp(dur, 92);} 
+void g2(int dur){buzzer_chirp(dur, 98);} 
+void ab2(int dur){buzzer_chirp(dur, 103);} 
+void a2(int dur){buzzer_chirp(dur, 110);} 
+void bb2(int dur){buzzer_chirp(dur, 116);} 
+void b2(int dur){buzzer_chirp(dur, 123);} 
+void c3(int dur){buzzer_chirp(dur, 130);} 
+void db3(int dur){buzzer_chirp(dur, 138);} 
+void d3(int dur){buzzer_chirp(dur, 146);} 
+void eb3(int dur){buzzer_chirp(dur, 155);} 
+void e3(int dur){buzzer_chirp(dur, 164);} 
+void f3(int dur){buzzer_chirp(dur, 174);} 
+void gb3(int dur){buzzer_chirp(dur, 185);} 
+void g3(int dur){buzzer_chirp(dur, 196);} 
+void ab3(int dur){buzzer_chirp(dur, 207);} 
+void a3(int dur){buzzer_chirp(dur, 220);} 
+void bb3(int dur){buzzer_chirp(dur, 233);} 
+void b3(int dur){buzzer_chirp(dur, 246);} 
+void c4(int dur){buzzer_chirp(dur, 261);} 
+void db4(int dur){buzzer_chirp(dur, 277);} 
+void d4(int dur){buzzer_chirp(dur, 293);} 
+void eb4(int dur){buzzer_chirp(dur, 311);} 
+void e4(int dur){buzzer_chirp(dur, 329);} 
+void f4(int dur){buzzer_chirp(dur, 349);} 
+void gb4(int dur){buzzer_chirp(dur, 369);} 
+void g4(int dur){buzzer_chirp(dur, 392);} 
+void ab4(int dur){buzzer_chirp(dur, 415);} 
+void a4(int dur){buzzer_chirp(dur, 440);} 
+void bb4(int dur){buzzer_chirp(dur, 466);} 
+void b4(int dur){buzzer_chirp(dur, 493);} 
+void c5(int dur){buzzer_chirp(dur, 523);} 
+void db5(int dur){buzzer_chirp(dur, 554);} 
+void d5(int dur){buzzer_chirp(dur, 587);} 
+void eb5(int dur){buzzer_chirp(dur, 622);} 
+void e5(int dur){buzzer_chirp(dur, 659);} 
+void f5(int dur){buzzer_chirp(dur, 698);} 
+void gb5(int dur){buzzer_chirp(dur, 739);} 
+void g5(int dur){buzzer_chirp(dur, 783);} 
+void ab5(int dur){buzzer_chirp(dur, 830);} 
+void a5(int dur){buzzer_chirp(dur, 880);} 
+void bb5(int dur){buzzer_chirp(dur, 932);} 
+void b5(int dur){buzzer_chirp(dur, 987);} 
+void c6(int dur){buzzer_chirp(dur, 1046);} 
+void db6(int dur){buzzer_chirp(dur, 1108);} 
+void d6(int dur){buzzer_chirp(dur, 1174);} 
+void eb6(int dur){buzzer_chirp(dur, 1244);} 
+void e6(int dur){buzzer_chirp(dur, 1318);} 
+void f6(int dur){buzzer_chirp(dur, 1396);} 
+void gb6(int dur){buzzer_chirp(dur, 1479);} 
+void g6(int dur){buzzer_chirp(dur, 1567);} 
+void ab6(int dur){buzzer_chirp(dur, 1661);} 
+void a6(int dur){buzzer_chirp(dur, 1760);} 
+void bb6(int dur){buzzer_chirp(dur, 1864);} 
+void b6(int dur){buzzer_chirp(dur, 1975);} 
+void c7(int dur){buzzer_chirp(dur, 2093);} 
+void db7(int dur){buzzer_chirp(dur, 2217);} 
+void d7(int dur){buzzer_chirp(dur, 2349);} 
+void eb7(int dur){buzzer_chirp(dur, 2489);} 
+void e7(int dur){buzzer_chirp(dur, 2637);} 
+void f7(int dur){buzzer_chirp(dur, 2793);} 
+void gb7(int dur){buzzer_chirp(dur, 2959);} 
+void g7(int dur){buzzer_chirp(dur, 3135);} 
+void ab7(int dur){buzzer_chirp(dur, 3322);} 
+void a7(int dur){buzzer_chirp(dur, 3520);} 
+void bb7(int dur){buzzer_chirp(dur, 3729);} 
+void b7(int dur){buzzer_chirp(dur, 3951);} 
+void c8(int dur){buzzer_chirp(dur, 4186);} 
+void db8(int dur){buzzer_chirp(dur, 4434);} 
+void d8(int dur){buzzer_chirp(dur, 4698);} 
+void eb8(int dur){buzzer_chirp(dur, 4978);} 
+#endif

Property changes on: trunk/code/behaviors/tetris_dance/music.c
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/code/behaviors/tetris_dance/slavecode/lab0.c
===================================================================
--- trunk/code/behaviors/tetris_dance/slavecode/lab0.c	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/slavecode/lab0.c	(revision 2000)
@@ -0,0 +1,245 @@
+#include <dragonfly_lib.h>
+#include <encoders.h>
+#include <buzzer.h>
+#include <math.h>
+#include <serial.h>
+/*Colony Lab 0
+ *Dance Competition
+ *Robotics Club Colony Project 2010
+ *
+ * Jeff Cooper
+ *    and
+ * Priya Deo
+ */
+#define T 100
+int main(void)
+{
+	/************
+	 *
+	 * HIVECODE
+	 *
+	 ***********/
+	char k;
+
+	/* Initialize dragonfly board */
+	dragonfly_init(ALL_ON);
+
+	buzzer_init();
+	bom_init(BOM15);
+	/* ****** YOUR CODE BEGINS HERE ******* */
+	
+		orb1_set_color(YELLOW);
+	a6(T/2);
+		orb2_set_color(YELLOW);
+	e7(T*3);
+	delay_ms(T*3);
+	bom_refresh(BOM_ALL);
+	while(bom_get_max() == -1 && !button1_read() ){bom_refresh(BOM_ALL);}
+	while(1)
+	{
+	{
+		bom_on();
+			orb1_set_color(GREEN);
+		e6(T*2);
+		b5(T);
+		c6(T);
+			orb2_set_color(GREEN);
+		d6(T*2);
+			orb2_set_color(CYAN);
+		c6(T);
+		
+
+
+		b5(T);
+			orb1_set_color(CYAN);
+		a5(T*2);
+		a5(T);
+		c6(T);
+			orb1_set_color(ORANGE);
+			orb2_set_color(ORANGE);
+		e6(T*2);
+			orb1_set_color(RED);
+			orb2_set_color(RED);
+		d6(T);
+		c6(T);
+			orb1_set_color(LIME);
+			orb2_set_color(LIME);
+		b5(T*3);
+		c6(T);
+		d6(T*2);
+			orb1_set_color(BLUE);
+		bom_off();
+	  }
+
+	{	//i==2
+
+
+		e6(T*2);
+			orb2_set_color(BLUE);
+		c6(T*2);
+			orb2_set_color(ORB_OFF);
+		a5(T*2);
+			orb1_set_color(ORB_OFF);
+		a5(T);
+		
+
+		a5(T*1);
+		delay_ms(T*2);
+	}	
+	{
+
+
+		delay_ms(T);
+			orb2_set_color(WHITE);
+		d6(T);
+		delay_ms(T);
+			orb1_set_color(WHITE);
+		f6(T);
+			orb1_set_color(PINK);
+			orb2_set_color(PINK);
+		a6(T);
+		c6(T/2);
+		c6(T/2);
+		g6(T);
+		f6(T);
+			orb1_set_color(GREEN);
+			orb2_set_color(GREEN);
+		e6(T*2);
+		delay_ms(T);
+			orb2_set_color(RED);
+			orb1_set_color(RED);	
+		c6(T);
+		e6(T);
+		a5(T/2);
+		g5(T/2);
+
+		d6(T);
+	}				
+	{	//i==3
+
+
+		c6(T);		
+		b5(T*2);
+
+		delay_ms(T);
+			orb2_set_color(PURPLE);
+			orb1_set_color(PURPLE);
+		c6(T);
+
+		d6(T*2);
+			orb2_set_color(RED);		
+
+		e6(T*2);
+			orb1_set_color(RED);
+		c6(T*2);
+			orb1_set_color(ORB_OFF);
+		a5(T);
+		a4(T);
+			orb2_set_color(ORB_OFF);
+		a5(T);
+		a4(T);
+		
+	{
+
+		delay_ms(T*2);
+			orb2_set_color(ORANGE);
+			orb1_set_color(ORANGE);
+		e6(T);
+	}
+
+
+		e6(T*3);
+			orb2_set_color(RED);
+			orb1_set_color(RED);
+		c6(T*3);	
+	}	
+	{	//i==4
+
+
+		c6(T);
+			orb2_set_color(MAGENTA);
+			orb1_set_color(MAGENTA);
+		d6(T*4);
+			orb2_set_color(CYAN);
+			orb1_set_color(CYAN);
+		b5(T*2);	
+			
+
+		b5(T*2);
+			orb2_set_color(PURPLE);
+			orb1_set_color(PURPLE);
+		c6(T*4);
+			orb2_set_color(PINK);
+			orb1_set_color(PINK);
+		a5(T*4);
+			orb2_set_color(BLUE);
+			orb1_set_color(GREEN);
+		ab5(T*4);
+			orb1_set_color(BLUE);
+			orb2_set_color(GREEN);
+		b5(T);
+	}	
+	{	//i==5
+
+
+		b5(T*2);
+		delay_ms(T);
+			orb2_set_color(ORANGE);
+			orb1_set_color(ORANGE);
+		e6(T*4);
+			orb2_set_color(RED);
+			orb1_set_color(RED);
+			
+
+		c6(T*4);
+			orb2_set_color(MAGENTA);
+			orb1_set_color(MAGENTA);
+		d6(T*4);
+			orb2_set_color(CYAN);
+			orb1_set_color(CYAN);
+		b5(T*4);
+		c6(T*2);
+			orb1_set_color(WHITE);
+		e6(T);
+	}
+
+		
+	{	//CIRCLE
+
+
+
+		e6(T);
+			orb2_set_color(WHITE);
+			
+		a6(T*4);
+
+	}
+	{	//RESET
+
+
+			
+			orb1_set_color(LIME);
+			orb2_set_color(LIME);
+		ab6(T);
+			orb1_set_color(ORB_OFF);
+			orb2_set_color(ORB_OFF);
+			
+			delay_ms(T*13);
+			
+
+
+			delay_ms(T*3);
+	}
+	
+
+	bom_refresh(BOM_ALL);
+	while(bom_get_max() == -1){bom_refresh(BOM_ALL);}
+
+	
+	}	
+
+	/* ****** YOUR CODE ENDS HERE ******* */
+
+
+	return 0;
+}
Index: trunk/code/behaviors/tetris_dance/slavecode/music.c
===================================================================
--- trunk/code/behaviors/tetris_dance/slavecode/music.c	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/slavecode/music.c	(revision 2000)
@@ -0,0 +1,109 @@
+/*********
+ * Music Library!
+ * Now with twice the fiber!
+ * 
+ *  Jeff Cooper, Fall 2010
+ ***************/
+#ifndef MUSIC_FUNCTIONS
+#define MUSIC_FUNCTIONS
+void c0(int dur){buzzer_chirp(dur, 16);} 
+void db0(int dur){buzzer_chirp(dur, 17);} 
+void d0(int dur){buzzer_chirp(dur, 18);} 
+void eb0(int dur){buzzer_chirp(dur, 19);} 
+void e0(int dur){buzzer_chirp(dur, 20);} 
+void f0(int dur){buzzer_chirp(dur, 21);} 
+void gb0(int dur){buzzer_chirp(dur, 23);} 
+void g0(int dur){buzzer_chirp(dur, 24);} 
+void ab0(int dur){buzzer_chirp(dur, 25);} 
+void a0(int dur){buzzer_chirp(dur, 27);} 
+void bb0(int dur){buzzer_chirp(dur, 29);} 
+void b0(int dur){buzzer_chirp(dur, 30);} 
+void c1(int dur){buzzer_chirp(dur, 32);} 
+void db1(int dur){buzzer_chirp(dur, 34);} 
+void d1(int dur){buzzer_chirp(dur, 36);} 
+void eb1(int dur){buzzer_chirp(dur, 38);} 
+void e1(int dur){buzzer_chirp(dur, 41);} 
+void f1(int dur){buzzer_chirp(dur, 43);} 
+void gb1(int dur){buzzer_chirp(dur, 46);} 
+void g1(int dur){buzzer_chirp(dur, 49);} 
+void ab1(int dur){buzzer_chirp(dur, 51);} 
+void a1(int dur){buzzer_chirp(dur, 55);} 
+void bb1(int dur){buzzer_chirp(dur, 58);} 
+void b1(int dur){buzzer_chirp(dur, 61);} 
+void c2(int dur){buzzer_chirp(dur, 65);} 
+void db2(int dur){buzzer_chirp(dur, 69);} 
+void d2(int dur){buzzer_chirp(dur, 73);} 
+void eb2(int dur){buzzer_chirp(dur, 77);} 
+void e2(int dur){buzzer_chirp(dur, 82);} 
+void f2(int dur){buzzer_chirp(dur, 87);} 
+void gb2(int dur){buzzer_chirp(dur, 92);} 
+void g2(int dur){buzzer_chirp(dur, 98);} 
+void ab2(int dur){buzzer_chirp(dur, 103);} 
+void a2(int dur){buzzer_chirp(dur, 110);} 
+void bb2(int dur){buzzer_chirp(dur, 116);} 
+void b2(int dur){buzzer_chirp(dur, 123);} 
+void c3(int dur){buzzer_chirp(dur, 130);} 
+void db3(int dur){buzzer_chirp(dur, 138);} 
+void d3(int dur){buzzer_chirp(dur, 146);} 
+void eb3(int dur){buzzer_chirp(dur, 155);} 
+void e3(int dur){buzzer_chirp(dur, 164);} 
+void f3(int dur){buzzer_chirp(dur, 174);} 
+void gb3(int dur){buzzer_chirp(dur, 185);} 
+void g3(int dur){buzzer_chirp(dur, 196);} 
+void ab3(int dur){buzzer_chirp(dur, 207);} 
+void a3(int dur){buzzer_chirp(dur, 220);} 
+void bb3(int dur){buzzer_chirp(dur, 233);} 
+void b3(int dur){buzzer_chirp(dur, 246);} 
+void c4(int dur){buzzer_chirp(dur, 261);} 
+void db4(int dur){buzzer_chirp(dur, 277);} 
+void d4(int dur){buzzer_chirp(dur, 293);} 
+void eb4(int dur){buzzer_chirp(dur, 311);} 
+void e4(int dur){buzzer_chirp(dur, 329);} 
+void f4(int dur){buzzer_chirp(dur, 349);} 
+void gb4(int dur){buzzer_chirp(dur, 369);} 
+void g4(int dur){buzzer_chirp(dur, 392);} 
+void ab4(int dur){buzzer_chirp(dur, 415);} 
+void a4(int dur){buzzer_chirp(dur, 440);} 
+void bb4(int dur){buzzer_chirp(dur, 466);} 
+void b4(int dur){buzzer_chirp(dur, 493);} 
+void c5(int dur){buzzer_chirp(dur, 523);} 
+void db5(int dur){buzzer_chirp(dur, 554);} 
+void d5(int dur){buzzer_chirp(dur, 587);} 
+void eb5(int dur){buzzer_chirp(dur, 622);} 
+void e5(int dur){buzzer_chirp(dur, 659);} 
+void f5(int dur){buzzer_chirp(dur, 698);} 
+void gb5(int dur){buzzer_chirp(dur, 739);} 
+void g5(int dur){buzzer_chirp(dur, 783);} 
+void ab5(int dur){buzzer_chirp(dur, 830);} 
+void a5(int dur){buzzer_chirp(dur, 880);} 
+void bb5(int dur){buzzer_chirp(dur, 932);} 
+void b5(int dur){buzzer_chirp(dur, 987);} 
+void c6(int dur){buzzer_chirp(dur, 1046);} 
+void db6(int dur){buzzer_chirp(dur, 1108);} 
+void d6(int dur){buzzer_chirp(dur, 1174);} 
+void eb6(int dur){buzzer_chirp(dur, 1244);} 
+void e6(int dur){buzzer_chirp(dur, 1318);} 
+void f6(int dur){buzzer_chirp(dur, 1396);} 
+void gb6(int dur){buzzer_chirp(dur, 1479);} 
+void g6(int dur){buzzer_chirp(dur, 1567);} 
+void ab6(int dur){buzzer_chirp(dur, 1661);} 
+void a6(int dur){buzzer_chirp(dur, 1760);} 
+void bb6(int dur){buzzer_chirp(dur, 1864);} 
+void b6(int dur){buzzer_chirp(dur, 1975);} 
+void c7(int dur){buzzer_chirp(dur, 2093);} 
+void db7(int dur){buzzer_chirp(dur, 2217);} 
+void d7(int dur){buzzer_chirp(dur, 2349);} 
+void eb7(int dur){buzzer_chirp(dur, 2489);} 
+void e7(int dur){buzzer_chirp(dur, 2637);} 
+void f7(int dur){buzzer_chirp(dur, 2793);} 
+void gb7(int dur){buzzer_chirp(dur, 2959);} 
+void g7(int dur){buzzer_chirp(dur, 3135);} 
+void ab7(int dur){buzzer_chirp(dur, 3322);} 
+void a7(int dur){buzzer_chirp(dur, 3520);} 
+void bb7(int dur){buzzer_chirp(dur, 3729);} 
+void b7(int dur){buzzer_chirp(dur, 3951);} 
+void c8(int dur){buzzer_chirp(dur, 4186);} 
+void db8(int dur){buzzer_chirp(dur, 4434);} 
+void d8(int dur){buzzer_chirp(dur, 4698);} 
+void eb8(int dur){buzzer_chirp(dur, 4978);} 
+#endif
Index: trunk/code/behaviors/tetris_dance/slavecode/a.out
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/code/behaviors/tetris_dance/slavecode/a.out
===================================================================
--- trunk/code/behaviors/tetris_dance/slavecode/a.out	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/slavecode/a.out	(revision 2000)

Property changes on: trunk/code/behaviors/tetris_dance/slavecode/a.out
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/code/behaviors/tetris_dance/slavecode/Makefile
===================================================================
--- trunk/code/behaviors/tetris_dance/slavecode/Makefile	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/slavecode/Makefile	(revision 2000)
@@ -0,0 +1,521 @@
+########Update This Section########
+#
+#
+
+# Relative path to the root directory (containing lib directory)
+ifndef COLONYROOT
+COLONYROOT = .
+endif
+
+# Target file name (without extension).
+TARGET = lab0
+
+# Uncomment this to use the wireless library
+#USE_WIRELESS = 1
+
+# com1 = serial port. Use lpt1 to connect to parallel port.
+AVRDUDE_PORT = /dev/ttyUSB0
+#$(shell if uname -s |grep -i w32 >/dev/null; then echo 'COM4:'; else echo '/dev/ttyUSB0'; fi)
+
+#
+###################################
+
+# Hey Emacs, this is a -*- makefile -*-
+#----------------------------------------------------------------------------
+# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
+#
+# Released to the Public Domain
+#
+# Additional material for this makefile was written by:
+# Peter Fleury
+# Tim Henigan
+# Colin O'Flynn
+# Reiner Patommel
+# Markus Pfaff
+# Sander Pool
+# Frederik Rouleau
+#
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device, using avrdude.
+#                Please customize the avrdude settings below first!
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+#              with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+#                   bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+#if you want your code to work on the Firefly++ and not Firefly+
+#then add the -DFFPP line to CDEFS
+CDEFS =
+#-DFFPP
+
+# MCU name
+MCU = atmega128
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+F_CPU = 8000000
+
+# Output format. (can be srec, ihex, binary)
+FORMAT = ihex
+
+# List C source files here. (C dependencies are automatically generated.)
+SRC = $(wildcard *.c)
+
+# List Assembler source files here.
+#     Make them always end in a capital .S.  Files ending in a lowercase .s
+#     will not be considered source files but generated files (assembler
+#     output from the compiler), and will be deleted upon "make clean"!
+#     Even though the DOS/Win* filesystem matches both .s and .S the same,
+#     it will preserve the spelling of the filenames, and gcc itself does
+#     care about how the name is spelled on its command-line.
+ASRC =
+
+# Optimization level, can be [0, 1, 2, 3, s].
+#     0 = turn off optimization. s = optimize for size.
+#     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+OPT = s
+
+# Debugging format.
+#     Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
+#     AVR Studio 4.10 requires dwarf-2.
+#     AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
+DEBUG =
+
+# Compiler flag to set the C Standard level.
+#     c89   = "ANSI" C
+#     gnu89 = c89 plus GCC extensions
+#     c99   = ISO C99 standard (not yet fully implemented)
+#     gnu99 = c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options here
+CDEFS += -DF_CPU=$(F_CPU)UL
+CDEFS += -DFFP
+# for wireless library
+ifdef USE_WIRELESS
+	CDEFS += -DROBOT
+endif
+
+# Place -I, -L options here
+CINCS = -I$(COLONYROOT)/Library
+CINCS += -L$(COLONYROOT)/Library
+ifdef USE_WIRELESS
+	CINCS += -I$(COLONYROOT)/code/lib/include/libwireless
+endif
+
+#---------------- Compiler Options ----------------
+#  -g*:          generate debugging information
+#  -O*:          optimization level
+#  -f...:        tuning, see GCC manual and avr-libc documentation
+#  -Wall...:     warning level
+#  -Wa,...:      tell GCC to pass this to the assembler.
+#    -adhlns...: create assembler listing
+CFLAGS =
+# CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
+CFLAGS += -Wall -Wstrict-prototypes
+CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
+CFLAGS += $(CSTANDARD)
+
+#---------------- Assembler Options ----------------
+#  -Wa,...:   tell GCC to pass this to the assembler.
+#  -ahlms:    create listing
+#  -gstabs:   have the assembler create line number information; note that
+#             for use in COFF files, additional information about filenames
+#             and function names needs to be present in the assembler source
+#             files -- see avr-libc docs [FIXME: not yet described there]
+ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
+
+
+#---------------- Library Options ----------------
+# Minimalistic printf version
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
+
+# Floating point printf version (requires MATH_LIB = -lm below)
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
+
+# If this is left blank, then it will use the Standard printf version.
+#PRINTF_LIB =
+#PRINTF_LIB = $(PRINTF_LIB_MIN)
+PRINTF_LIB = $(PRINTF_LIB_FLOAT)
+
+
+# Minimalistic scanf version
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
+
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
+
+# If this is left blank, then it will use the Standard scanf version.
+SCANF_LIB =
+#SCANF_LIB = $(SCANF_LIB_MIN)
+#SCANF_LIB = $(SCANF_LIB_FLOAT)
+
+MATH_LIB = -lm
+
+#---------------- External Memory Options ----------------
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# used for variables (.data/.bss) and heap (malloc()).
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# only used for heap (malloc()).
+#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
+
+EXTMEMOPTS =
+
+#---------------- Linker Options ----------------
+#  -Wl,...:     tell GCC to pass this to linker.
+#    -Map:      create map file
+#    --cref:    add cross reference to  map file
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
+LDFLAGS += $(EXTMEMOPTS)
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
+ifdef USE_WIRELESS
+	LDFLAGS += -lwireless
+endif
+LDFLAGS += -ldragonfly
+
+
+
+#---------------- Programming Options (avrdude) ----------------
+
+# Programming hardware: alf avr910 avrisp bascom bsd
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
+#
+# Type: avrdude -c ?
+# to get a full listing.
+#
+AVRDUDE_PROGRAMMER = avrisp
+
+# programmer connected to serial device
+
+AVRDUDE_WRITE_FLASH = -b 57600 -U flash:w:$(TARGET).hex
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
+
+
+# Uncomment the following if you want avrdude's erase cycle counter.
+# Note that this counter needs to be initialized first using -Yn,
+# see avrdude manual.
+#AVRDUDE_ERASE_COUNTER = -y
+
+# Uncomment the following if you do /not/ wish a verification to be
+# performed after programming the device.
+#AVRDUDE_NO_VERIFY = -V
+
+# Increase verbosity level.  Please use this when submitting bug
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
+# to submit bug reports.
+#AVRDUDE_VERBOSE = -v -v
+
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
+
+#don't check for device signature
+AVRDUDE_FLAGS += -F
+
+
+
+#---------------- Debugging Options ----------------
+
+# For simulavr only - target MCU frequency.
+DEBUG_MFREQ = $(F_CPU)
+
+# Set the DEBUG_UI to either gdb or insight.
+# DEBUG_UI = gdb
+DEBUG_UI = insight
+
+# Set the debugging back-end to either avarice, simulavr.
+DEBUG_BACKEND = avarice
+#DEBUG_BACKEND = simulavr
+
+# GDB Init Filename.
+GDBINIT_FILE = __avr_gdbinit
+
+# When using avarice settings for the JTAG
+JTAG_DEV = /dev/com1
+
+# Debugging port used to communicate between GDB / avarice / simulavr.
+DEBUG_PORT = 4242
+
+# Debugging host used to communicate between GDB / avarice / simulavr, normally
+#     just set to localhost unless doing some sort of crazy debugging when
+#     avarice is running on a different computer.
+DEBUG_HOST = localhost
+
+
+
+#============================================================================
+
+
+# Define programs and commands.
+SHELL = sh
+CC = avr-gcc
+OBJCOPY = avr-objcopy
+OBJDUMP = avr-objdump
+SIZE = avr-size
+NM = avr-nm
+AVRDUDE = avrdude
+REMOVE = rm -f
+REMOVEDIR = rm -rf
+COPY = cp
+WINSHELL = cmd
+
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = -------- begin --------
+MSG_END = --------  end  --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_COFF = Converting to AVR COFF:
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
+MSG_FLASH = Creating load file for Flash:
+MSG_EEPROM = Creating load file for EEPROM:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling:
+MSG_ASSEMBLING = Assembling:
+MSG_CLEANING = Cleaning project:
+
+
+
+
+# Define all object files.
+OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
+
+# Define all listing files.
+LST = $(SRC:.c=.lst) $(ASRC:.S=.lst)
+
+
+# Compiler flags to generate dependency files.
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter end
+
+build: elf hex eep lss sym
+
+elf: $(TARGET).elf
+hex: $(TARGET).hex
+eep: $(TARGET).eep
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+
+
+# Eye candy.
+# AVR Studio 3.x does not check make's exit code but relies on
+# the following magic strings to be generated by the compile job.
+begin:
+	@echo
+	@echo $(MSG_BEGIN)
+
+end:
+	@echo $(MSG_END)
+	@echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+AVRMEM = avr-mem.sh $(TARGET).elf $(MCU)
+
+sizebefore:
+	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
+	$(AVRMEM) 2>/dev/null; echo; fi
+
+sizeafter:
+	@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
+	$(AVRMEM) 2>/dev/null; echo; fi
+
+
+
+# Display compiler version information.
+gccversion :
+	@$(CC) --version
+
+
+
+# Program the device.
+program: $(TARGET).hex $(TARGET).eep
+	$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+
+
+# Generate avr-gdb config/init file which does the following:
+#     define the reset signal, load the target file, connect to target, and set
+#     a breakpoint at main().
+gdb-config:
+	@$(REMOVE) $(GDBINIT_FILE)
+	@echo define reset >> $(GDBINIT_FILE)
+	@echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
+	@echo end >> $(GDBINIT_FILE)
+	@echo file $(TARGET).elf >> $(GDBINIT_FILE)
+	@echo target remote $(DEBUG_HOST):$(DEBUG_PORT)  >> $(GDBINIT_FILE)
+ifeq ($(DEBUG_BACKEND),simulavr)
+	@echo load  >> $(GDBINIT_FILE)
+endif
+	@echo break main >> $(GDBINIT_FILE)
+
+debug: gdb-config $(TARGET).elf
+ifeq ($(DEBUG_BACKEND), avarice)
+	@echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
+	@$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
+	$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
+	@$(WINSHELL) /c pause
+
+else
+	@$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
+	$(DEBUG_MFREQ) --port $(DEBUG_PORT)
+endif
+	@$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
+
+
+
+
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
+COFFCONVERT=$(OBJCOPY) --debugging \
+--change-section-address .data-0x800000 \
+--change-section-address .bss-0x800000 \
+--change-section-address .noinit-0x800000 \
+--change-section-address .eeprom-0x810000
+
+
+coff: $(TARGET).elf
+	@echo
+	@echo $(MSG_COFF) $(TARGET).cof
+	$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
+
+
+extcoff: $(TARGET).elf
+	@echo
+	@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
+	$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
+
+
+
+# Create final output files (.hex, .eep) from ELF output file.
+%.hex: %.elf
+	@echo
+	@echo $(MSG_FLASH) $@
+	$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
+
+%.eep: %.elf
+	@echo
+	@echo $(MSG_EEPROM) $@
+	-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+	--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
+
+# Create extended listing file from ELF output file.
+%.lss: %.elf
+	@echo
+	@echo $(MSG_EXTENDED_LISTING) $@
+	$(OBJDUMP) -h -S $< > $@
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+	@echo
+	@echo $(MSG_SYMBOL_TABLE) $@
+	$(NM) -n $< > $@
+
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(OBJ)
+%.elf: $(OBJ)
+	@echo
+	@echo $(MSG_LINKING) $@
+	$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
+
+
+# Compile: create object files from C source files.
+%.o : %.c
+	@echo
+	@echo $(MSG_COMPILING) $<
+	$(CC) -c $(ALL_CFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files.
+%.s : %.c
+	$(CC) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files.
+%.o : %.S
+	@echo
+	@echo $(MSG_ASSEMBLING) $<
+	$(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+# Create preprocessed source for use in sending a bug report.
+%.i : %.c
+	$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list end
+
+clean_list :
+	@echo
+	@echo $(MSG_CLEANING)
+	$(REMOVE) $(TARGET).hex
+	$(REMOVE) $(TARGET).eep
+	$(REMOVE) $(TARGET).cof
+	$(REMOVE) $(TARGET).elf
+	$(REMOVE) $(TARGET).map
+	$(REMOVE) $(TARGET).sym
+	$(REMOVE) $(TARGET).lss
+	$(REMOVE) $(OBJ)
+	$(REMOVE) $(LST)
+	$(REMOVE) $(SRC:.c=.s)
+	$(REMOVE) $(SRC:.c=.d)
+	$(REMOVEDIR) .dep
+
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex eep lss sym coff extcoff \
+clean clean_list program debug gdb-config
+
Index: trunk/code/behaviors/tetris_dance/README
===================================================================
--- trunk/code/behaviors/tetris_dance/README	(nonexistent)
+++ trunk/code/behaviors/tetris_dance/README	(revision 2000)
@@ -0,0 +1,49 @@
+ _____ _____ _____ ____  ___ ____  
+|_   _| ____|_   _|  _ \|_ _/ ___| 
+  | | |  _|   | | | |_) || |\___ \ 
+  | | | |___  | | |  _ < | | ___) |
+  |_| |_____| |_| |_| \_\___|____/ 
+                                   
+	An overly-silly lab0 by
+	Jeff Cooper and Priya Deo,
+		Fall 2010
+======================================
+
+You're reading the README, good for you!
+
+Here's how this code breaks down:
+
+mastercode/:
+	lab0.c
+	music.c
+	Makefile
+
+slavecode/:
+	lab0.c
+	music.c
+	Makefile
+
+music.c
+
+You'll notice that music.c exists three times. 
+It's the same file, don't worry.
+
+Mastercode is the stand-alone version of the tetris dance,
+and also the only one that dances.  It turns the BOM on and off
+at various points during the song to synchronize with the bots
+running slavecode.
+
+Slavecode contains the song and lights but no dance.  It won't
+play the song (or repeat it, when it ends) without a signal from a BOM,
+and it turns on it's own BOM when it gets that signal so you can chain
+them across a room (note: this is a good way to get tired and/or grouchy
+people to step on "those little buggers making that gosh-darned racket.")
+	->The slavecode can be started by pushing button1.  This will
+		turn on the BOM and start other slaves.
+
+
+DISCLAIMER:
+------------
+The music library is cool and relatively accurate, but it can also
+be insanely annoying.  Use it at your own risk and with discretion.
+
