Menu
Last update: July 1, 2016 11:22
src
main
com
raspoid
AnalogComponent.java
Component.java
Config.java
GPIOComponent.java
GPIOPin.java
I2CComponent.java
I2CPin.java
PWMComponent.java
PWMPin.java
Pin.java
RaspberryPiModel.java
Tools.java
UARTPin.java
additionalcomponents
behavioral
brickpi
examples
exceptions
network
test

/*******************************************************************************
 * Copyright (c) 2016 Julien Louette & Gaƫl Wittorski
 * 
 * This file is part of Raspoid.
 * 
 * Raspoid is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Raspoid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Raspoid.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
package com.raspoid.additionalcomponents.ir;

import com.raspoid.examples.additionalcomponents.ir.IRSignalDetector;

/**
 * Implementation of an IRProtocol corresponding to the
 * Sunfounder Media Remote.
 * 
 * <p>Each signal corresponds to one button of the remote.
 * We detected each signals with the {@link IRSignalDetector}.</p>
 * 
 * <p>Sunfounder Media Remote: <a href="http://raspoid.com/download/datasheet/SunfounderMediaRemote">Picture</a></p>
 * 
 * @author Julien Louette &amp; Ga&euml;l Wittorski
 * @version 1.0
 */
public class IRProtocolSunfounderMediaRemote extends IRProtocol {
    
    /**
     * Button "0".
     */
    public static final IRSignal button0 = new IRSignal("button_0",
            new int[] {0, 8520, 4300, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 1580, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1560, 560, 1580, 560, 1580, 560, 540, 560, 1580, 540, 1600, 540, 560, 560, 1580, 540, 560, 560, 540, 560, 560, 540, 1580, 560, 560, 540, 560, 520, 1620, 540, 560, 560, 1580, 560, 1580, 560, 1580, 540, 37840, 8580, 2140, 540});
    
    /**
     * Button "1".
     */
    public static final IRSignal button1 = new IRSignal("button_1",
            new int[] {0, 8540, 4320, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 560, 540, 560, 560, 540, 560, 1580, 540, 1600, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 560, 540, 560, 520, 1620, 560, 1580, 540, 560, 560, 540, 560, 560, 540, 560, 560, 1580, 560, 1580, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 1600, 540, 1580, 560, 37860, 8580, 2140, 560});
    
    /**
     * Button "2".
     */
    public static final IRSignal button2 = new IRSignal("button_2",
            new int[] {0, 8520, 4300, 560, 560, 520, 560, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 540, 560, 1580, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 560, 540, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 560, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 1600, 540, 560, 560, 540, 560, 1580, 560, 1580, 560, 1580, 560, 37860, 8580, 2140, 560});
    
    /**
     * Button "3".
     */
    public static final IRSignal button3 = new IRSignal("button_3",
            new int[] {0, 8580, 4320, 520, 580, 520, 580, 540, 560, 560, 560, 540, 560, 520, 580, 560, 540, 560, 560, 520, 1620, 540, 1600, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 540, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 560, 560, 1580, 560, 540, 560, 1580, 560, 540, 560, 560, 540, 560, 560, 540, 560, 1580, 560, 540, 560, 1580, 560, 37860, 8600, 2120, 560});
    
    /**
     * Button "4".
     */
    public static final IRSignal button4 = new IRSignal("button_4",
            new int[] {0, 8500, 4300, 560, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 560, 540, 560, 540, 560, 560, 540, 1600, 540, 560, 560, 540, 560, 560, 540, 560, 560, 1580, 560, 1580, 560, 1580, 560, 540, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 37840, 8600, 2140, 560});
    
    /**
     * Button "5".
     */
    public static final IRSignal button5 = new IRSignal("button_5",
            new int[] {0, 8600, 4300, 560, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 560, 540, 560, 540, 560, 1580, 560, 1580, 560, 1580, 560, 560, 540, 560, 560, 540, 560, 1580, 560, 1580, 560, 540, 560, 560, 540, 560, 560, 1580, 560, 1580, 560, 1580, 560, 37860, 8580, 2140, 560});
    
    /**
     * Button "6".
     */
    public static final IRSignal button6 = new IRSignal("button_6",
            new int[] {0, 8460, 4320, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 540, 560, 1580, 560, 1580, 560, 1580, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 560, 560, 1580, 560, 540, 560, 1580, 560, 1580, 560, 540, 560, 1580, 560, 560, 540, 1600, 540, 560, 560, 1580, 560, 540, 560, 540, 560, 1580, 560, 560, 540, 1600, 540, 37860, 8580, 2140, 540});
    
    /**
     * Button "7".
     */
    public static final IRSignal button7 = new IRSignal("button_7",
            new int[] {0, 8600, 4320, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 540, 1600, 560, 1580, 560, 1580, 560, 1580, 540, 560, 560, 1580, 560, 540, 560, 560, 540, 560, 560, 540, 560, 1580, 560, 540, 560, 1580, 560, 540, 560, 1600, 540, 1580, 560, 1580, 560, 1580, 560, 560, 540, 1600, 540, 37840, 8600, 2140, 560});
    
    /**
     * Button "8".
     */
    public static final IRSignal button8 = new IRSignal("button_8",
            new int[] {0, 8600, 4300, 560, 540, 560, 560, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 560, 1580, 540, 1600, 520, 1580, 560, 1580, 560, 540, 560, 1580, 560, 540, 560, 560, 540, 1580, 560, 540, 560, 1580, 560, 560, 540, 1600, 540, 560, 540, 1600, 540, 1580, 560, 560, 560, 1580, 540, 560, 560, 1580, 540, 37820, 8600, 2140, 540});
    
    /**
     * Button "9".
     */
    public static final IRSignal button9 = new IRSignal("button_9",
            new int[] {0, 8580, 4320, 540, 560, 560, 540, 560, 540, 560, 560, 540, 560, 560, 540, 560, 560, 540, 560, 540, 1580, 560, 1580, 540, 1600, 560, 1580, 540, 1600, 540, 1580, 560, 1580, 560, 1580, 540, 560, 560, 1580, 540, 540, 560, 1580, 560, 560, 540, 560, 540, 1600, 540, 560, 560, 1560, 560, 540, 560, 1580, 560, 560, 540, 1580, 560, 1580, 560, 560, 540, 1600, 540, 37800, 8600, 2140, 540});
    
    /**
     * Button "on/off".
     */
    public static final IRSignal onOffButton = new IRSignal("on_off_button",
            new int[] {0, 8580, 4320, 520, 580, 520, 580, 540, 560, 540, 580, 520, 560, 520, 580, 520, 580, 540, 560, 540, 1600, 520, 1600, 540, 1600, 520, 1620, 520, 1600, 520, 1620, 520, 1620, 520, 1600, 520, 1620, 520, 580, 520, 1620, 520, 580, 520, 580, 520, 560, 540, 1600, 520, 580, 540, 560, 540, 1600, 540, 560, 540, 1580, 520, 1620, 520, 1620, 500, 580, 540, 1600, 520});
    
    /**
     * Button "Mode".
     */
    public static final IRSignal modeButton = new IRSignal("mode_button",
            new int[] {0, 8520, 4320, 540, 580, 520, 580, 520, 580, 520, 600, 520, 560, 540, 580, 520, 580, 520, 580, 520, 1620, 520, 1600, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1600, 540, 580, 520, 1620, 520, 1600, 540, 520, 520, 580, 520, 580, 540, 1580, 520, 580, 520, 1620, 520, 580, 520, 580, 520, 1620, 520, 1600, 540, 1600, 520, 580, 540, 1600, 520});
    
    /**
     * Button "NoSound".
     */
    public static final IRSignal noSoundButton = new IRSignal("no_sound_button",
            new int[] {0, 8560, 4320, 540, 580, 520, 580, 520, 580, 520, 580, 520, 580, 520, 600, 520, 580, 520, 580, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 520, 1620, 500, 1600, 520, 1620, 520, 580, 520, 580, 520, 580, 520, 1620, 520, 580, 520, 580, 540, 560, 540, 580, 520, 1600, 540, 1600, 540, 1600, 520, 580, 540, 1600, 520, 37780, 8540, 2180, 520});
    
    /**
     * Button "play/pause".
     */
    public static final IRSignal playPauseButton = new IRSignal("play_pause_button",
            new int[] {0, 8540, 4340, 520, 580, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 580, 520, 540, 540, 1580, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 560, 540, 560, 540, 1600, 540, 560, 540, 580, 520, 580, 520, 1600, 540, 580, 520, 1600, 540, 1600, 520, 580, 520, 1620, 520, 1620, 520, 1620, 520, 580, 520, 1620, 520, 37780, 8560, 2160, 520});
    
    /**
     * Button "previous".
     */
    public static final IRSignal previousButton = new IRSignal("previous_button",
            new int[] {0, 8540, 4320, 540, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 580, 520, 560, 520, 580, 520, 1620, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 580, 520, 580, 540, 560, 540, 560, 540, 580, 520, 580, 520, 1620, 520, 540, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 520, 1600, 520, 1620, 520, 580, 520, 1620, 520, 37800, 8540, 2160, 520});
    
    /**
     * Button "next".
     */
    public static final IRSignal nextButton = new IRSignal("next_button",
            new int[] {0, 8560, 4280, 540, 580, 520, 580, 540, 580, 520, 580, 500, 580, 520, 580, 540, 560, 540, 580, 520, 1600, 540, 1600, 540, 1580, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 540, 1580, 520, 1620, 520, 1620, 520, 580, 520, 580, 520, 560, 520, 580, 540, 1600, 520, 580, 540, 560, 540, 580, 520, 1600, 540, 1580, 540, 1600, 520, 1620, 520, 580, 520, 1620, 520, 37740, 8560, 2160, 520});
    
    /**
     * Button "EQ".
     */
    public static final IRSignal eqButton = new IRSignal("eq_button",
            new int[] {0, 8460, 4340, 520, 580, 520, 580, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 500, 580, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 520, 1620, 520, 1620, 520, 580, 520, 580, 540, 560, 540, 560, 540, 580, 520, 580, 500, 560, 540, 580, 520, 1600, 540, 1600, 540, 1600, 520, 1600, 540, 1600, 540, 37760, 8540, 2160, 520});
    
    /**
     * Button "-".
     */
    public static final IRSignal minusButton = new IRSignal("minus_button", 
            new int[] {0, 8540, 4300, 560, 580, 520, 580, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 580, 520, 1600, 540, 1600, 540, 1580, 540, 1600, 520, 1620, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 560, 540, 1600, 540, 560, 540, 1600, 540, 580, 520, 580, 520, 580, 520, 580, 520, 1620, 520, 580, 520, 1620, 520, 580, 520, 1620, 520, 1600, 540, 1600, 540, 37760, 8560, 2160, 520});
    
    /**
     * Button "+".
     */
    public static final IRSignal plusButton = new IRSignal("plus_button",
            new int[] {0, 8560, 4340, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 580, 520, 580, 520, 580, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1620, 520, 580, 520, 580, 520, 1620, 520, 580, 520, 580, 520, 580, 520, 580, 540, 580, 520, 1600, 520, 1620, 520, 580, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 540, 37800, 8560, 2160, 520});
    
    /**
     * Button "switch".
     */
    public static final IRSignal switchButton = new IRSignal("switch_button",
            new int[] {0, 8560, 4320, 540, 580, 520, 580, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 580, 520, 1620, 520, 1600, 540, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 560, 540, 580, 520, 1600, 540, 1600, 540, 560, 540, 580, 520, 580, 520, 580, 520, 1620, 520, 1620, 520, 580, 520, 580, 520, 1620, 520, 1620, 520, 1600, 540, 37800, 8560, 2160, 500});
    
    /**
     * Button "U/SD".
     */
    public static final IRSignal usdButton = new IRSignal("usd_button",
            new int[] {0, 8560, 4320, 520, 580, 540, 580, 520, 580, 520, 580, 520, 580, 520, 580, 540, 560, 540, 580, 520, 1600, 540, 1600, 540, 1600, 520, 1620, 520, 1620, 520, 1620, 520, 1620, 520, 1600, 540, 1600, 540, 560, 540, 1600, 540, 1600, 540, 560, 540, 560, 540, 580, 520, 580, 520, 580, 520, 1620, 520, 580, 520, 580, 520, 1620, 520, 1620, 520, 1620, 520, 1600, 540, 37800, 8560, 2160, 520});
    
    /**
     * Constructor for the instantiation of a new Sunfounder
     * Media Remote with all signals recorded. 
     */
    public IRProtocolSunfounderMediaRemote() {
        addSignal(button0);
        addSignal(button1);
        addSignal(button2);
        addSignal(button3);
        addSignal(button4);
        addSignal(button5);
        addSignal(button6);
        addSignal(button7);
        addSignal(button8);
        addSignal(button9);
        addSignal(onOffButton);
        addSignal(modeButton);
        addSignal(noSoundButton);
        addSignal(playPauseButton);
        addSignal(previousButton);
        addSignal(nextButton);
        addSignal(eqButton);
        addSignal(minusButton);
        addSignal(plusButton);
        addSignal(switchButton);
        addSignal(usdButton);
    }
}