Sunday, January 17, 2010

The Secret Santa 2009 Project

Sound of video NSFW


Hi Res Pic

I built this as a Secret Santa gift for a comedy website I frequent. It's basically a Big Mouth Billy Bass (BMBB) made to speak a selection of inside jokes. It features a 10 position switch that can select 10 different people (we call them gAberS, or used to anyway. It's a long story.) The display lets you know who is selected. Once a GabbEr is selected, you depress the red play button. Then the fish will speak the inside joke for that gaBBeR.

You can view my victims reaction along with pictures and video on the website here

From the engineering side, the Secret Santa 2009 (SS09) consists of a main or CPU board, a power supply board, a hacked Rio MP3 player, a 4x20 LCD display and an audio amplifier board ripped from an old pair of computer speakers.

MAIN CPU BOARD

The CPU board has a pair of 18F452 PICs. One controls the BMBB and MP3 player. The other is dedicated to the display. Various LEDs and the 10 position switch are connected to both PICs. The fish has three motors to move its head, tail and mouth. I used TIP3055's t0 drive the mouth and tail. I used two relays to move the head due to its large current draw. The stock BMBB used 6vdc to control all three motors. I used 6vdc for the mouth and tail and both 4 and 6vdc for the head. If you apply only 4 volts to it, it will move half way and stop. This allowed me to make the BMBB more animated. This action can be seen in the video.

I used an ADG202, which is just a handful of switches in an IC, to control the MP3 player. More on this under the MP3 player section. I also used an ADG202 to short the motor for the head when power was removed. It's pulled back in place by a spring, and if you don't short the coils, the head slams into the base.

I used capacitors and diodes to shunt any voltages produced from the motor coils. I had to use a toroid for the head motor. It kept locking up until I put the toroid in place. It's on the schematic as a isolation XFMR because I couldn't find a toroid in Eagle.

The schematic is here.

MP3 PLAYER

This is the second MP3 player I have hacked. I used the EGG MP3 player for my Secret Santa 2008 last year. This year I used a RIO Fuse MP3 player that I got off craigslist for $8, which sux as far as hacking is concerned.

More pics of the Secret Santa 2008 (SS08) here.

First, the EGG was dream to hack. It has a built in amplifier. Second, it can be powered off 12VDC. Third, hacking the switches is cake. It just puts ground on one side. For the the track advance, you have to put ground through a 100 ohm resistor on the track advance switch.

The only downside is that there is no built in memory. You need an SD card or USB stick. I used a USB stick. There is also no display, so it can be difficult to figure out whats going on.

Pictures of the hacked EGG MP3 player can been in the SS08 link above.

The Rio Fuse has built in memory and a display, so that made hacking it easier. But the switches were difficult to deal with, the pins are so close together. And making the 1.5VDC means extra components. I also had major problems with noise coming from the LM317, more on that later.

Hi Res pics.

The power on switch and volume control just puts 1.5vdc from one side of the switch to the other, so that was easy. For the play, track advance, and stop, it shorted a particular pin to a common pin, which was not ground or Vdd. I determined this with a scope. So I used the ADG202 switch IC to interface the MP3 player with the the PIC. So if I wanted to play an mp3 file, the PIC, through the ADG202, would turn the player on, turn the volume to max, go to the track I want, play the track, delay, stop the track, then turn the mp3 player off.

Like this:
*****************************************************
delay_ms(1000);
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);


output_high(PIN_B3); //position head
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 2.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(100);



//delay for length of track//


output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);


*******************************************************************************

In the schematic, I had the mp3 player on PORT A. It's actually on PORT D, so when you compare the schematic and the source code, remember that I mixed up PORTS A and D. I didn't feel like changing all of that stuff in the schematic.

I had problems with noise coming out of the speaker, which was coming from the LM317 that generated the 1.5VDC to power the MP3. I confrimed this by powering the MP3 with one AAA battery. It produced no noise while powered with the battery. I never could fiqure out how to get rid of it, so I had to do my best to cover it up. I adjusted the built in equalizer and maxed the volume out. This helped reduce the noise quite a bit. I used the POT on the amplifier to control the system volume. Does anyone know how to stop the noise?

For the track advance, I just copied the same code over and over again. So if I wanted it to play track 4, I would repeat the track advance part of the code three times.

POWER SUPPLY BOARD

I needed a handful of voltage levels to control my hacked BMBB. 1.5 volts for the MP3 player, 4 volts for the half-way position of the head and LCD back light, 5 volts for logic, and 6 volts for the fish head, mouth and tail. I used a 12 volt / 3 amp power supply from an old sewing machine for the main voltage feed. I used standard regulators for the 5 and 6 volts and a pair of LM317's for the 4 volts and 1.5 volts.

Here is the schematic

DISPLAY

The display is a Batron BTHQ 42005VSS 4x20 LCD. Get the data sheet here. This one had a bad back light. I just removed it and soldered in a high intensity white LED from Radio Shack. Worked like a charm!


Hi Res

AUDIO AMPLIFIER

This amplifies the audio out of the MP3 player. I just ripped a board out of an old set of computer speakers. It's powered with 12VDC, so all I had to do is just mount a connector to the board and solder it in. I used the original speaker that came with the BMBB.

THE FINISHED PRODUCT


Hi Res

SOURCE CODE

There are two PICs, each with their own code, written in C. The PIC that runs the display used a code I got off the net. You can find it here. I just edited the data written to the display. I also edited the driver to use the pins I wanted.
The editor is taking all the spaces out so the code looks stupid. If anyone knows how I can share the code the way it was written please let me know. I will post the link here.

Display source in C.

*************************************************************************************

#include <18f452.h>
#fuses HS, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 10000000) //10MHz
#include

//===================================
void main()
{


// The lcd_init() function should always be called once,
// near the start of your program.
lcd_init();

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);



{



output_low(PIN_B7);
output_low(PIN_B6);
output_low(PIN_B5);
output_low(PIN_B4);
output_low(PIN_B3);
output_low(PIN_B2);
output_low(PIN_B1);
output_low(PIN_B0);


output_high(PIN_A1);
output_low(PIN_A2);
output_low(PIN_A3);


printf(lcd_putc, "\f ");
printf(lcd_putc, "\n WWW.ZUG.COM/LIVE ");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n ");
delay_ms(3000);

lcd_gotoxy(7, 4);
printf(lcd_putc, "PRESENTS");
delay_ms(3000);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);

lcd_gotoxy(2, 2);
printf(lcd_putc, "SECRET SANTA 2009");
delay_ms(3000);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n BUILT BY MANHOLE ");
printf(lcd_putc, "\n FOR ");
printf(lcd_putc, "\n SHELL BELLE ");
delay_ms(3000);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n * ");
delay_ms(1000);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n ** ");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n **** ");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n ***** ");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n ********* ");
delay_ms(500);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n ************ ");
delay_ms(300);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n *************** ");
delay_ms(200);

printf(lcd_putc, "\f ");
printf(lcd_putc, "\n ENERGIZING FLUX ");
printf(lcd_putc, "\n CAPACITOR ");
printf(lcd_putc, "\n ****************** ");
delay_ms(100);


// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 10 ");
delay_ms(500);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 20 ");
delay_ms(500);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 30 ");
delay_ms(500);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 42 ");
delay_ms(2000);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 53 ");
delay_ms(800);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 88 ");
delay_ms(800);

// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(10);

printf(lcd_putc, "\f LOADING ");
printf(lcd_putc, "\n A.I. NEURAL NETWORK");
printf(lcd_putc, "\n ");
printf(lcd_putc, "\n system core is 99 ");
delay_ms(800);



// Clear the LCD.
printf(lcd_putc, "\f");
delay_ms(500);



printf(lcd_putc, "\f A.I. STATUS IS: ");
printf(lcd_putc, "\n ACTIVE ");
printf(lcd_putc, "\n connecting to ");
printf(lcd_putc, "\n interwebs.... ");

output_high(PIN_A0);
delay_ms(10000);





while (true) {


if(input_state(PIN_B7)==1){

printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n GAbBEr ");
printf(lcd_putc, "\n the honorable ");
printf(lcd_putc, "\n PHLA ");
delay_ms(250);
}

else if(input_state(PIN_B6)==1){

printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n gabBEr ");
printf(lcd_putc, "\n the kickass ");
printf(lcd_putc, "\n JEENI ");
delay_ms(250);
}




else if(input_state(PIN_B5)==1){
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n gABber ");
printf(lcd_putc, "\n the always funny ");
printf(lcd_putc, "\n SUICIDE RANGER ");
delay_ms(250);
}




else if(input_state(PIN_B4)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n gAbbEr ");
printf(lcd_putc, "\n stupid nOob ");
printf(lcd_putc, "\n FUCKSOCK ");
delay_ms(250);
}





else if(input_state(PIN_B3)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n GabBeR ");
printf(lcd_putc, "\n the smashing ");
printf(lcd_putc, "\n TRIXXIE ");
delay_ms(250);
}

else if(input_state(PIN_B2)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n gabBer ");
printf(lcd_putc, "\nthe incredibly sexy ");
printf(lcd_putc, "\n STRAW ");
delay_ms(250);
}


else if(input_state(PIN_B1)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n gabbER ");
printf(lcd_putc, "\n the lovely ");
printf(lcd_putc, "\n SHELL BELLE ");
delay_ms(250);
}



else if(input_state(PIN_B0)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n GaBbEr ");
printf(lcd_putc, "\n our beloved artist ");
printf(lcd_putc, "\n UNCLE PHUC ");
delay_ms(250);
}

else if(input_state(PIN_A2)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n GAbBeR ");
printf(lcd_putc, "\nyour future overlord");
printf(lcd_putc, "\n MANHOLE ");
delay_ms(250);
}

else if(input_state(PIN_A3)==1) {
printf(lcd_putc, "\f PLEASE SELECT ");
printf(lcd_putc, "\n GAbbER ");
printf(lcd_putc, "\n our poor poor ");
printf(lcd_putc, "\n PUBAH ");
delay_ms(250);
}
}
}
}


*************************************************************************************






The code for the main PIC that contols the fish and MP3 is below. It's pretty strait foward. It runs through a boot process and then loops, checking the position of the 10 position switch and the play switch. When the play switch is pressed, it looks at the position of the 10 position switch and runs that part of the code. The PIC that controls the display also monitors the 10 position switch.

Main PIC code in C
*************************************************************************************
#include <18f452.h>
#fuses XT,NOPROTECT,NOLVP,NOWDT
#use delay(clock=3686400)




void main() {

output_low(PIN_D4);
output_low(PIN_D5);

delay_ms(5000);

while (true) {

if(input_state(PIN_D5)==1)

{

output_high(PIN_D4); //turn mp3 off
delay_ms(1000);
output_low(PIN_D4);
delay_ms(5000);

}


else if(input_state(PIN_D5)==0)

{

delay_ms(1000);

}

SET_TRIS_A( 0x10 ); //port a i/o

output_low(PIN_A0); //lights blue on
output_high(PIN_A1);
output_high(PIN_A2);
output_high(PIN_A3);
output_high(PIN_A4);
output_low(PIN_A5); //blue lights on

output_low(PIN_E1); //ensure SW1 does not activate

output_low(PIN_C0); // all low for SW2
output_low(PIN_C1);
output_low(PIN_C2);
output_low(PIN_C3);
output_low(PIN_C4);
output_low(PIN_C5);
output_low(PIN_C6);
output_low(PIN_C7);
output_low(PIN_B6);
output_low(PIN_B7);

output_low(PIN_D0); //set the MP3 switch to all low
output_low(PIN_D1);
output_low(PIN_D2);
output_low(PIN_D3);
output_low(PIN_D4);
output_low(PIN_D7); //set for demo mode switch
output_low(PIN_D6);
output_low(PIN_D5);

output_low(PIN_B3);
output_low(PIN_B4);
output_low(PIN_B5);





//** This is the intro*******************************************************************//

while (true) {

if(input_state(PIN_D7)==1){



delay_ms(2000);


output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);

delay_ms(2000);

output_high(PIN_E2); //red shell led

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D1); //play track 1.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(100);

delay_ms(10000);

output_high(PIN_E0); //blue shell led

delay_ms(9500);



delay_ms(10000);

output_high(PIN_B3); //position head

output_high(PIN_B1); //theres
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //something
delay_ms(400);
output_low(PIN_B1);
delay_ms(100); //30000

output_high(PIN_B1); //strange
delay_ms(800);
output_low(PIN_B1);
delay_ms(500); //31100

output_high(PIN_B1); //in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //neighboor
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //hood //32170
delay_ms(300);
output_low(PIN_B1);
delay_ms(1090);

output_high(PIN_B1); //who //33260
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //ya
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1);
delay_ms(200); //gonna
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //call
delay_ms(300);
output_low(PIN_B1);
delay_ms(500); //37230

output_low(PIN_B3); //position head

delay_ms(2900);


output_high(PIN_B3); //position head

output_high(PIN_B1); //theres
delay_ms(25);
output_low(PIN_B1);
delay_ms(25);

output_high(PIN_B1); //something //37280
delay_ms(400);
output_low(PIN_B1);
delay_ms(150);

output_high(PIN_B1); // wierd //38100
delay_ms(400);
output_low(PIN_B1);
delay_ms(1000);

output_high(PIN_B1); //and//39260
delay_ms(100); //
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //it//40000
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //don't//40000
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //look
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //40200 //good
delay_ms(300);
output_low(PIN_B1);
delay_ms(1200);

output_high(PIN_B1); //who //42050
delay_ms(100);
output_low(PIN_B1);
delay_ms(60); //

output_high(PIN_B1); //ya
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //gonna
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // call //43000
delay_ms(300);
output_low(PIN_B1);
delay_ms(500);

output_low(PIN_B3); //position head

delay_ms(7000);

output_high(PIN_B0); //position tail for fart
delay_ms(3000);
output_low(PIN_B0);
delay_ms(1000);


output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

}

else if(input_state(PIN_D7)==0)

{

delay_ms(4000);

output_high(PIN_E2); //red shell led

delay_ms(12000);

output_high(PIN_E0); //blue shell led

delay_ms(1000);}



while (true) {

if(input_state(PIN_E1)==1){

output_high(PIN_A1); //green off
output_high(PIN_A4);
output_low(PIN_A2); //turn red on
output_low(PIN_A3);

while (true) {


if(input_state(PIN_C0)==1) //Uncle Phuc

{
delay_ms(1000);
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);


output_high(PIN_B3); //position head
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 2.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(100);

delay_ms(500); //zug
output_high(PIN_B1);
delay_ms(880);
output_low(PIN_B1);
delay_ms(160);

output_high(PIN_B1); //what
delay_ms(200);
output_low(PIN_B1);

delay_ms(100); //the
output_high(PIN_B1);
delay_ms(100);
output_low(PIN_B1);

delay_ms(100); //hell
output_high(PIN_B1);
delay_ms(100);
output_low(PIN_B1);

delay_ms(100); //is
output_high(PIN_B1);
delay_ms(100);
output_low(PIN_B1);

delay_ms(100); //a
output_high(PIN_B1);
delay_ms(100);
output_low(PIN_B1);

delay_ms(400); //oooohhhhh
output_high(PIN_B1);
delay_ms(1000);
output_low(PIN_B1);

output_low(PIN_B4);
delay_ms(1);


delay_ms(840); //titties
output_high(PIN_B1);
delay_ms(910);
output_low(PIN_B1);

delay_ms(50); //page
output_high(PIN_B1);
delay_ms(930);
output_low(PIN_B1);

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

output_low(PIN_B3); //position head

output_low(PIN_B4);

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}

else if(input_state(PIN_C1)==1) //Shell Belle

{
delay_ms(1000);
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D1); //play track 1.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(100);



delay_ms(29500);

output_high(PIN_B3); //position head

output_high(PIN_B1); //theres
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //something
delay_ms(400);
output_low(PIN_B1);
delay_ms(100); //30000

output_high(PIN_B1); //strange
delay_ms(800);
output_low(PIN_B1);
delay_ms(500); //31100

output_high(PIN_B1); //in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //neighboor
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //hood //32170
delay_ms(300);
output_low(PIN_B1);
delay_ms(1090);

output_high(PIN_B1); //who //33260
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //ya
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1);
delay_ms(200); //gonna
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //call
delay_ms(300);
output_low(PIN_B1);
delay_ms(500); //37230

output_low(PIN_B3); //position head

delay_ms(2900);


output_high(PIN_B3); //position head

output_high(PIN_B1); //theres
delay_ms(25);
output_low(PIN_B1);
delay_ms(25);

output_high(PIN_B1); //something //37280
delay_ms(400);
output_low(PIN_B1);
delay_ms(150);

output_high(PIN_B1); // wierd //38100
delay_ms(400);
output_low(PIN_B1);
delay_ms(1000);

output_high(PIN_B1); //and//39260
delay_ms(100); //
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //it//40000
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //don't//40000
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //look
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //40200 //good
delay_ms(300);
output_low(PIN_B1);
delay_ms(1200);

output_high(PIN_B1); //who //42050
delay_ms(100);
output_low(PIN_B1);
delay_ms(60); //

output_high(PIN_B1); //ya
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //gonna
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // call //43000
delay_ms(300);
output_low(PIN_B1);
delay_ms(500);

output_low(PIN_B3); //position head

delay_ms(6700);

output_high(PIN_B0); //position tail for fart
delay_ms(3000);
output_low(PIN_B0);
delay_ms(1000);

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_C2)==1) //Straw
{
delay_ms(1000);
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);


output_high(PIN_D1); //play track 3.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(100);



delay_ms(4450);

output_high(PIN_B4); //position head

output_high(PIN_B1); //yes
delay_ms(100);
output_low(PIN_B1);
delay_ms(2900);

output_high(PIN_B1); //I
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //am
delay_ms(100);
output_low(PIN_B1);
delay_ms(100); //

output_high(PIN_B1); //who
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //are
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //you
delay_ms(100);
output_low(PIN_B1);
delay_ms(8900); //8100

output_high(PIN_B1); //what
delay_ms(60);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //you
delay_ms(60);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //want
delay_ms(60);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1);
delay_ms(50); //from
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //me
delay_ms(300);
output_low(PIN_B1);
delay_ms(7700);


output_high(PIN_B1); //you
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //thought
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //wrong
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);
output_low(PIN_B4); //position head
delay_ms(7300);



output_high(PIN_B3); //position head


output_high(PIN_B1); //next
delay_ms(110);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //time
delay_ms(110);
output_low(PIN_B1);
delay_ms(110);

output_high(PIN_B1); //you
delay_ms(110);
output_low(PIN_B1);
delay_ms(110);

output_high(PIN_B1); //feel
delay_ms(110);
output_low(PIN_B1);
delay_ms(110);

output_high(PIN_B1); //lonely
delay_ms(200);
output_low(PIN_B1);
delay_ms(1100);

output_high(PIN_B1); //dont
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //go
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //scowring
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //jails
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1);
delay_ms(100); //give
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //me
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // a
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // call
delay_ms(200);
output_low(PIN_B1);
delay_ms(1300);


output_high(PIN_B1); // i'll
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //make
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //you
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //feel
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //like
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //a
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //woman
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);


output_low(PIN_B3); //position head



output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_C3)==1) ///Trixxie
{

output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);


output_high(PIN_D1); //play track 4.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(280);

output_high(PIN_B3); //position head

output_high(PIN_B1); //o
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //k
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);

output_high(PIN_B1); //that
delay_ms(100);
output_low(PIN_B1);
delay_ms(100); //

output_high(PIN_B1); //does
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //it
delay_ms(100);
output_low(PIN_B1);
delay_ms(550);

output_high(PIN_B1); //now
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //listen
delay_ms(300);
output_low(PIN_B1);
delay_ms(550);

output_high(PIN_B1); //why
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //is
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1);
delay_ms(100); //it
output_low(PIN_B1);
delay_ms(300);

output_high(PIN_B1); //that
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //everything
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //today
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //has
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);




output_high(PIN_B1); //involved
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //things
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //either
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //going
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //in
delay_ms(100);
output_low(PIN_B1);
delay_ms(400);

output_high(PIN_B1); //or
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //coming
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //out
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // of
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(300);

output_high(PIN_B1);
delay_ms(100); //ass
output_low(PIN_B1);
delay_ms(500);

output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);

}


else if(input_state(PIN_C4)==1) //fucksock

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 5.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(580);

output_high(PIN_B3); //position head

output_high(PIN_B1); //you
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //remember
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //what
delay_ms(100);
output_low(PIN_B1);
delay_ms(100); //

output_high(PIN_B1); //I
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //told
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //you
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //about
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //trying
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //to
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1);
delay_ms(100); //be
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //funny
delay_ms(100);
output_low(PIN_B1);
delay_ms(2900);


output_high(PIN_B1); //thats
delay_ms(100);
output_low(PIN_B1);
delay_ms(60);

output_high(PIN_B1); //right
delay_ms(100);
output_low(PIN_B1);
delay_ms(800);

output_high(PIN_B1); //now
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);




output_high(PIN_B1); //sit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //down
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(100);
output_low(PIN_B1);
delay_ms(300);

output_high(PIN_B1); //shup
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //up
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);



output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_C5)==1) //suicide ranger

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 6.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 6.wma
delay_ms(100);
output_low(PIN_D1);
delay_ms(20450);

output_high(PIN_B3); //position head

output_high(PIN_B1); //im
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //an
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //indian
delay_ms(250);
output_low(PIN_B1);
delay_ms(50);


output_high(PIN_B1); //out
delay_ms(350);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //law
delay_ms(350);
output_low(PIN_B1);
delay_ms(800);

output_high(PIN_B1); //you
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //can
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //find
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //me
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(700);




output_high(PIN_B1); //i'll
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);


output_high(PIN_B1); //be
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //beaten
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //on
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //tom
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // tom
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);

output_high(PIN_B1); // pull
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //out
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //pipe
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //smoke
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ya
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //some
delay_ms(400);
output_low(PIN_B1);
delay_ms(600);

output_high(PIN_B1); //yea
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //pass
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //it
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //around
delay_ms(100);
output_low(PIN_B1);
delay_ms(1500);

output_high(PIN_B1); //cause
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //im
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //an
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // indian
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // outlaw
delay_ms(200);
output_low(PIN_B1);
delay_ms(900);

output_high(PIN_B1); //half
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //cheroke
delay_ms(1500);




output_low(PIN_B3); //position head

delay_ms(1000);
output_low(PIN_B1);


output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_C6)==1) ///Jennie

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 6.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 7.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 7.wma
delay_ms(100);
output_low(PIN_D1);

output_high(PIN_B3); //position head

delay_ms(580);


output_high(PIN_B1); //for
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //peep
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //show
delay_ms(100);
output_low(PIN_B1);
delay_ms(700);


output_high(PIN_B1); //please
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //insert
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //coin
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //or
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //credit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //card
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);

output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_C7)==1) //phla

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 6.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 7.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 8.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 8.wma
delay_ms(100);
output_low(PIN_D1);

output_high(PIN_B3); //position head

delay_ms(300);


output_high(PIN_B1); //I
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //belong
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //to
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //church
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //of
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //cabbage
delay_ms(300);
output_low(PIN_B1);
delay_ms(750);

output_high(PIN_B1); //let
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //us
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //pray
delay_ms(300);
output_low(PIN_B1);
delay_ms(500);

output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(1000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_B6)==1) //manhole

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 6.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 7.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 8.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 9.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 9.wma
delay_ms(100);
output_low(PIN_D1);



delay_ms(4000);

output_high(PIN_B3); //position head

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);



output_high(PIN_B1); //and
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //beer
delay_ms(200);
output_low(PIN_B1);
delay_ms(2500);


output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //beer
delay_ms(200);
output_low(PIN_B1);
delay_ms(500);
output_low(PIN_B3); //position head

delay_ms(4500);

output_high(PIN_B3); //position head

output_high(PIN_B1); //big
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //beer
delay_ms(300);
output_low(PIN_B1);
delay_ms(2290);

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //beer
delay_ms(200);
output_low(PIN_B1);
delay_ms(2000);


output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //be
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //heer
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //heer
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B3); //position head

delay_ms(4200);
output_high(PIN_B3); //position head

output_high(PIN_B1); //big
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // ole
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // beer
delay_ms(100);
output_low(PIN_B1);
delay_ms(700);


output_high(PIN_B1); //my
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //little
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // berr
delay_ms(200);
output_low(PIN_B1);
delay_ms(1300);

output_high(PIN_B1); //great
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // big
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //tit
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //ies
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //beer
delay_ms(200);
output_low(PIN_B1);
delay_ms(1900);

output_high(PIN_B1); //god
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // damit
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // i
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // love
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // those
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // mother
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // fuckin
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //tit
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //ies
delay_ms(200);
output_low(PIN_B1);
delay_ms(2700);


output_high(PIN_B1); // fuck
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);


output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(5000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}


else if(input_state(PIN_B7)==1) //pubah

{
output_high(PIN_D4); //turn on mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(2000);

output_high(PIN_D0); //turn volume to max
delay_ms(1000);
output_low(PIN_D0);
delay_ms(1000);

output_high(PIN_D3); //track advance to 2.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 3.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 4.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 5.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 6.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 7.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 8.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 9.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D3); //track advance to 10.wma
delay_ms(50);
output_low(PIN_D3);
delay_ms(100);

output_high(PIN_D1); //play track 10.wma
delay_ms(100);
output_low(PIN_D1);



delay_ms(10360);

output_high(PIN_B4); //position head

output_high(PIN_B1); //hey
delay_ms(200);
output_low(PIN_B1);
delay_ms(500);

output_high(PIN_B1); //wait
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //a
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);


output_high(PIN_B1); //minute
delay_ms(100);
output_low(PIN_B1);
delay_ms(1000);

output_high(PIN_B1); //whats
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //that
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);



output_high(PIN_B1); //smell
delay_ms(200);
output_low(PIN_B1);
delay_ms(2000);

output_high(PIN_B1); //smells
delay_ms(200);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //like
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); //somethings
delay_ms(150);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //burning
delay_ms(100);
output_low(PIN_B1);
delay_ms(3500);

output_high(PIN_B1); //well
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //that
delay_ms(75);
output_low(PIN_B1);
delay_ms(50);

output_low(PIN_B4); //position head

output_high(PIN_B1); //don't
delay_ms(75);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //confront
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //me
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //none
delay_ms(100);
output_low(PIN_B1);
delay_ms(990);


output_high(PIN_B1); //long
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //as
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // I
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // get
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // rent
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); //paid
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //on
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //friday
delay_ms(200);
output_low(PIN_B1);
delay_ms(3016);

output_high(PIN_B4); //position head

output_high(PIN_B1); // baby
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); // you
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); // better
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); // get
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); // back
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // the
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // kitchen
delay_ms(100);
output_low(PIN_B1);
delay_ms(2700);

output_high(PIN_B1); //cause
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // I
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // gotta
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // sneaked
delay_ms(800);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // suspision
delay_ms(800);
output_low(PIN_B1);
delay_ms(1500);

output_high(PIN_B1); // a
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // man
delay_ms(300);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // bay
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // be
delay_ms(100);
output_low(PIN_B1);
delay_ms(1400);

output_low(PIN_B4); //position head
delay_ms(10);
output_high(PIN_B3); //position head

output_high(PIN_B1); // bay!
delay_ms(250);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // be!
delay_ms(250);
output_low(PIN_B1);
delay_ms(700);


output_high(PIN_B1); //you
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //just
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //burn
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // balls
delay_ms(1000);
output_low(PIN_B1);
delay_ms(2000);

output_high(PIN_B1); // say
delay_ms(400);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // everybody
delay_ms(150);
output_low(PIN_B1);
delay_ms(150);

output_high(PIN_B1); // have
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); //you
delay_ms(50);
output_low(PIN_B1);
delay_ms(50);


output_high(PIN_B1); //seen
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); //my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // balls
delay_ms(300);
output_low(PIN_B1);
delay_ms(300);

output_high(PIN_B1); //there
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // big
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // salty
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // and
delay_ms(100);
output_low(PIN_B1);
delay_ms(50);

output_high(PIN_B1); // brown
delay_ms(300);
output_low(PIN_B1);
delay_ms(500);



output_high(PIN_B1); // if
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // you
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // ever
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // need
delay_ms(100);
output_low(PIN_B1);
delay_ms(500);


output_high(PIN_B1); // a
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // quick
delay_ms(100);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // pick
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // me up
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // up
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // just
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // stick
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);



output_high(PIN_B1); // balls
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // your
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // mouth
delay_ms(1000);
output_low(PIN_B1);
delay_ms(200);

output_high(PIN_B1); // suck
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // on
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // my
delay_ms(200);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // chocolate
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // salty
delay_ms(300);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // balls
delay_ms(400);
output_low(PIN_B1);
delay_ms(2000);


output_high(PIN_B1); // put
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // em
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // in
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // your
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // mouth
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // and
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // sucken
delay_ms(100);
output_low(PIN_B1);
delay_ms(1800);


output_high(PIN_B1); // suck
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);


output_high(PIN_B1); // on
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // my
delay_ms(100);
output_low(PIN_B1);
delay_ms(100);

output_high(PIN_B1); // balls
delay_ms(200);
output_low(PIN_B1);
delay_ms(1100);

output_low(PIN_B3); //position head

output_high(PIN_D2); //stop track
delay_ms(100);
output_low(PIN_D2);
delay_ms(100);

delay_ms(5000);
output_high(PIN_D4); //turn off mp3 player
delay_ms(1000);
output_low(PIN_D4);
delay_ms(3000);
}
break;
}
}

else if(input_state(PIN_E1)==0)

{
output_high(PIN_A2); //turn off red
output_high(PIN_A3);

output_high(PIN_A0); //turn off blue
output_high(PIN_A5);


output_low(PIN_A1); //turn green on
output_low(PIN_A4);
}




}


}

}

}

*************************************************************************************
BUGS / LESSONS LEARNED

**I would have not thrown out the original board. I would have kept and hacked it and used it to control the current to the 3 motors on the fish. I had major issues with it locking up when acuating these motors.

**I would have used a MP3 player that had a built in amplifier, such as the EGG player I talked about.

**The MP3 player had a nasty habit of turning on when the power was turned on to the system. It is NOT SUPPOSED to do this, since the code turns the player on, plays the track and turns the player off. So if the player is on when the code tells it to turn on, it will just turn itself off. There were many a run when the fish would be talking with no sound coming from the speakers. This was finally fixed by updateing the firmware to the MP3 player.

Lesson learned?

UPDATE SOFTWARE FOR HARDWARE BEFORE HACKING SAID HARDWARE.

Hope you enjoyed! Please let me know of what I could have done better. I'm new to C coding, so I know it's messy. But it works.