Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32
Like Tree1Likes

Thread: Need Alpine wired remote control pinout.

  1. #21
    Low Bitrate pulsarsimon's Avatar
    Join Date
    Nov 2009
    Location
    Melbourne Australia
    Posts
    63
    The Alpine IR protocol has over 50 different codes for all the multimedia functions.

    Sure, there's codes which don't have buttons on the standard remote, but get a DVD or iPod unit and there's plenty more options.
    MacMini in an Alfa? - Why not!

  2. #22
    Newbie
    Join Date
    Oct 2005
    Posts
    8
    HI and sorry at first...
    I found also no more info than this topic.

    Im about to buy KENWOOD DNX9240BT to my Subaru Forester 2006 an i have problem with Steerinwheel controls.
    There is somekind of wired remote connection but kenwood doesent make SWC adapters this old cars...

  3. #23
    Newbie
    Join Date
    Nov 2005
    Posts
    4
    Quote Originally Posted by VDORepair View Post
    FordNoMore and JC_JC nice work. You guys rock! I installed a JVC KD-AVX77 in my Porsche 911 (993) a few months ago that had a Sony radio with a converted tiptronic steering wheel that I had modified to the Sony wired remote frequencies for volume and tracks.
    I want to change the steering wheel over for the new JVC stereo and realize after seeing this that I’ll need to create an interface like discussed in this thread. From what I understand is that the new remote jacks for JVC, Alpine, and Kenwood are now sending digital signals instead of interpreting frequencies.
    The first thing I’ll have to find out is if the signals are the same between JVC, Alpine, and Kenwood. The second thing I’ll need to find is someone to code a PIC as I don’t have anything to do this although it doesn’t look that expensive to get a programmer. I’m guessing this is a PIC16F84. This would also be a first for me so I was wondering if anyone here could help me out on this venture.

    I installed a Sony RM-X4S in my car since my car didn't come with steering wheel audio controls. I had a Sony head unit, but upgraded to a Pioneer head unit. Fortunately, the Pioneers work with the Sony RM-X4S. I've now upgraded to a JVC KD-AVX77, but would still like to be able to use the Sony RM-X4S.

    I don't have electronics experience so working on wires and resistors is a no for me.

    Is there any way to get the RM-X4S working with the JVC-KD-AVX77? Maybe somehow modify the RM-X4S so that something like the PAC SWI-JACK recognizes the RM-X4S as a generic Toyota steering wheel remote?

  4. #24
    Newbie
    Join Date
    Mar 2006
    Posts
    4
    Hi,

    Did anyone get a remote working with a JVC head unit? I'm installing a JVC AVX1 in my kitchen, and want a waterproof remote outside on the patio to control it. Im hoping to use some waterproof push buttons, and thought it was going to be as simple as using different resistors for each function.

    Following on from the post about using the IR remote as an interface, would I be able to put a IR receiver connected to the jack plug outside and then just use the IR remote? Any one got a circuit for it? I did a little bit with IR a while bcak in college, but it was more a detector than a signal transmittor. Would it just be as simple as wiring up something like this http://www.google.co.uk/imgres?imgur...ed=0CA8Q9QEwAw ?

    Thanks Gareth

  5. #25
    Newbie
    Join Date
    Apr 2010
    Location
    France
    Posts
    3
    Hello!So,nobody found the "protocol" for kenwood?

  6. #26
    Newbie
    Join Date
    Apr 2010
    Posts
    1
    Quote Originally Posted by JC_JC View Post
    if you have questions just ask.
    JC_JC, I'am trying to implement your variant with Arduino and Forester'09 wheel drive control for my Alpine IVA505. What nominal of resistors did you use in circuit from wheel drive control. I've measured resistance from pressed controls buttons - it's approximatly from 4,7k ohm to 140 ohms and tried to fit resistor, but unsuccessfully. If I use resistor with 3k homs - voltage is between 2-3 volts.
    Thanks.

  7. #27
    Newbie
    Join Date
    Oct 2005
    Location
    Lincolnshire
    Posts
    11
    My dad has decided that he wants to put steering wheel controls in his car, he has bought buttons and two Arduino boards and a wireless transmitter and receiver. We are going to code the two modules, on in the steering wheel and on near the head unit. We will send a code over the airwaves and then send it out into the head unit.

    For those that are interested here are the codes that I have written. I havent coded for 8 years now since I was at college so go steady. Will need to refine the code no doubt when it goes "live"

    Transmitter module - 8 buttons are to be installed in the wheel and connected to the Arduino
    Code:
    //Steering wheel - transmitter side
    //constant loop which monitors all switches, once a switch is depressed it sends a byte to reciever and starts the loop again
    
    #include "SoftwareSerial.h"  //software libary for using a software serial
    
    //DEFINE PINS THAT ARE TO BE USED
    #define txPin 3        //pin for transmitting via RF transmitter
    #define rxPin 2        //pin not used defined for coding only
    #define ledPin 13      //pin for onboard led
    #define mutePin 22     //pin for mute button
    #define volupPin 23    //pin for volume up button
    #define voldwnPin 24   //pin for volume down button
    #define sourcePin 25   //pin for source select button
    #define upPin 26       //pin for up button 
    #define downPin 27     //pin for down button
    #define leftPin 28     //pin for left button
    #define rightPin 29    //pin for right button
    
    
    // set up a new serial connection for communicating with RF transmitter 
    // (this also frees up Arduino's built in serial port for PC communication)
    SoftwareSerial rfSerial =  SoftwareSerial(rxPin, txPin);
    
    byte val = 0;        //makes a byte for information to be sent
    byte offState = 01;  //sends a code to the reciever that it will ignore
    byte mute = 99;      //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte volup = 98;     //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte voldwn = 97;    //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte source = 96;    //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte up = 95;        //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte down = 94;      //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte left = 93;      //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    byte right = 92;     //sends a code to the reciever that will be transfed into the bianary to control headunit in the reciever
    
    
    void setup() {  //setup pins and serial
      pinMode(ledPin, OUTPUT);      // declare led as output
      pinMode(mutePin, INPUT);      //declare mutePin as input      MUTE BUTTON ON WHEEL
      pinMode(volupPin, INPUT);     //declare volupPin as input     VOLUME UP BUTTON ON WHEEL
      pinMode(voldwnPin, INPUT);    //declare voldwnPin as input    VOLUME DOWN BUTTON ON WHEEL
      pinMode(sourcePin, INPUT);    //declare msourcePin as input   SOURCE BUTON ON WHEEL 
      pinMode(upPin, INPUT);        //declare upPin as input        UP BUTTON ON WHEEL
      pinMode(downPin, INPUT);      //declare downPin as input      DOWN BUTTON ON WHEEL
      pinMode(leftPin, INPUT);      //declare leftPin as input      LEFT BUTTON ON WHEEL
      pinMode(rightPin, INPUT);     //declare rightPin as input     RIGHT BUTTON ON WHEEL
    
      rfSerial.begin(2400); // RF Link is a 2400 baud model? (!!!!! check this!!!!!)
      // start by blinking high and then low so we can tell the setup routine has been completed
      digitalWrite(ledPin,HIGH);
      delay(1000);
      digitalWrite(ledPin,LOW);
    }
    
    //SETUP COMPLETE 
    
    void loop(){  //start of loop
    
    START:  //  label for goto start
      
      //MUTE BUTTON PRESSED
      val = digitalRead(mutePin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(mute, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto VOLUP;
      }
    
    VOLUP: //label for goto volup
    
    //VOLUME UP BUTTON PRESSED
      val = digitalRead(volupPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(volup, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto VOLDWN;
      }
    
    VOLDWN: //label for goto voldwn
    
    //VOLUME DOWN BUTTON PRESSED
      val = digitalRead(voldwnPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(voldwn, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto SOURCE;
      }
      
    SOURCE:  //label for goto source
    
    //SOURCE BUTTON PRESSED
      val = digitalRead(sourcePin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(source, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto UPBUTTON;
      }
    
    UPBUTTON:  //label for goto UPBUTTON
    
    //UP BUTTON PRESSED
      val = digitalRead(upPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(up, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto DOWNBUTTON;
      }
      
    DOWNBUTTON:  //label for goto DOWNBUTTON
    //VOLUME DOWN BUTTON PRESSED
      val = digitalRead(downPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(down, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto LEFT;
      }
      
    LEFT:  //label for goto LEFT
    
    //VOLUME DOWN BUTTON PRESSED
      val = digitalRead (leftPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(left, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto RIGHT;
      }
    
    RIGHT: // label for goto RIGHT
    
    //VOLUME DOWN BUTTON PRESSED
      val = digitalRead(downPin);
      if ( val == HIGH ) {         // check if the input is HIGH (button pressed)
        rfSerial.print(down, BYTE); // OK send it to the RF transmitter
      val = offState;    //byte cleared for use next time 
     goto START;         //returns to the start of the loop
      }//byte sent, restart loop
      else {
        goto START;
      }
    
    } // end of loop
    Receiver - connected to the head unit via a jack plug

    Code:
    #include "SoftwareSerial.h"
    
    /* 
    Read from a RF Link receiver module and output through the ALP PIN  
    */
    
    #define rxPin 3  //pin for the reciever to be plugged into   PIN 3
    #define txPin 2  //tx pin not used, defined for coding only
    #define ledPin 13 //onboard led
    #define alpPin 7   //pin to be connect to the tip of the lead that is plugged into headunit   PIN 7
    
    // set up a new serial connection for communicating with RF receiver 
    // (this also frees up Arduino's built in serial port for PC communication)
    SoftwareSerial rfSerial =  SoftwareSerial(rxPin, txPin);
    
    void setup() {
      
      // set up the input and output pins
      pinMode(rxPin, INPUT); // set up pins for serial comm. with RF receiver
      pinMode(ledPin, OUTPUT);
      pinMode (alpPin, OUTPUT);
      
      // serial comms
      rfSerial.begin(2400); // begin serial connection with RF Link unit
      Serial.begin(2400); // begin serial communication over USB to the computer
      // blink LED on and then off just to let us know the setup routine is complete
      digitalWrite(ledPin,HIGH); // turn on LED
      delay(1000);
      digitalWrite(ledPin,LOW); // turn off LED
    }
    
    void loop()
    
    {
      int code = '0'; //sets up an integer for us to store recieved code untill it is processed
      
    START:  //label for goto START
    
      code = rfSerial.read(); // read whatever the RF Link has to offer
      if (code == 01) {
        goto START;  //01 is an off code, if recieved goto start to keep loop running
      }
      
      if (code == 99) {
        mute();  //99 is the mute code, if recieved go to the MUTE label
      }
        
      if (code == 98) {
        volup ();  //98 is the volume up code, if recieved go to the VOLUP label
      }
      
      if (code == 97) {
        voldwn ();  //97 is the volume down code, if recieved go to the VOLDWN label
      }
      
     if (code == 96) {
        source ();  //96 is the source code, if recieved go to the SOURCE label
     }
        
      if (code == 95) {
        up() ;  //95 is the up code, if recieved go to the UP label
      }
      
      if (code == 94) {
        down ();  //94 is the down code, if recieved go to the DOWN label
      }
        
      if (code == 93) {
        left ();  //93 is the left code, if recieved go to the LEFT label
      }
      
      if (code == 92) {
        right ();  //92 is the right code, if recieved go to the RIGHT label
      } 
        
        else {
        Serial.print("nothing"); // send message to computer for testing, REMOVE ON FINAL DEPLOYMENT
        goto START; //no buttons have been pressed, return to the start of the loop to keep listing for button presses
      }
    }
      
    void mute() {
    //send start command
    
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send mute command
    // binary for the mute command  1 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    // MUTE COMMAND SENT
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    
    
    
    void volup()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send volume up command
    //binary for volume up 11011011110101101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    // volume up command send
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO LOOP TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void voldwn ()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send volume down command
    //binary for volume down 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //volume down command sent
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop() ;//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void source()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send source command
    //source command binary 1 0 1 1 0 1 1 1  1 1 0 1 1 0 1 1 0
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    //source command sent
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void up ()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send up command
    //up command binary 1 0 1 0 1 0  1 1 1 1 1 0 1 1 1 1 0
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    //up command sent
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void down ()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send down command
    //down command binary 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    //down command sent
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void right ()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send right command
    //left command binary 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1
      
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //right command sent
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    }
    
    void left ()
    {
    //send start command
    //first send 8ms high
    digitalWrite(alpPin, HIGH);
    delay(8);
    // send 4.5ms low
    digitalWrite(alpPin, LOW);
    delayMicroseconds(4500);
    //start command sent
    
    //send left command
    //left command binary 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 0 1
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //left command sent
    
    //SEND END COMMAND
    //end command binary 1010101
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    
    delayMicroseconds(1000);       //   0 leave the pin low for 100 micro seconds
    
    digitalWrite(alpPin, HIGH);     //   1   sending high 
    delayMicroseconds(500);        //   1   for 500 microseconds
    digitalWrite(alpPin, LOW);      //   1   sending low
    delayMicroseconds(500);        //   1   for 500 microseconds
    //END COMMAND SENT
    loop ();//COMMAND SENT TO HEADUNIT GO TO START TO LISTEN FOR FURTHER BUTTON PRESSED COMMANDS
    
    }

  8. #28
    Newbie
    Join Date
    Apr 2008
    Posts
    1
    Wow! You are basically my electronic life saver! Thank you!

    I'm currently trying to wire up an alpine (cda-105) with 3.5mm input jack to my s2000 dash controls (which pretty much work exactly the same as steering wheel controls you listed)

    I know, this thread is almost 1.5 years old, but I would love some pointers If OP could get a chance.

  9. #29
    Newbie
    Join Date
    Aug 2005
    Posts
    31
    OMG, this is so useful. Does anyone know if it will work for a Clarion HU?
    Is there some sort of repository for these 'codes'?

  10. #30
    Newbie
    Join Date
    May 2012
    Posts
    1
    Quote Originally Posted by roibix View Post
    Hello!So,nobody found the "protocol" for kenwood?
    I have the kenwood protocol here: http://baggertech.com/forum/showthre...ad-Glide-Hacks

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Remote control laptop start up
    By vqstatesman in forum Laptops, Netbooks, Tablets, UMPCs, etc.
    Replies: 1
    Last Post: 09-20-2009, 09:57 AM
  2. Replies: 17
    Last Post: 01-16-2009, 10:48 AM
  3. ...
    By Jantsa in forum Input Devices
    Replies: 0
    Last Post: 08-21-2008, 10:23 AM
  4. Question about XM & Girder & Remote Control
    By juve021 in forum Road Runner
    Replies: 2
    Last Post: 04-27-2005, 09:38 PM
  5. Great ir remote to control mp3car
    By rcpirate in forum General Hardware Discussion
    Replies: 5
    Last Post: 10-16-2002, 01:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •