|
|
@ -12,7 +12,9 @@
|
|
|
|
int latchPin = 11;
|
|
|
|
int latchPin = 11;
|
|
|
|
int clockPin = 9;
|
|
|
|
int clockPin = 9;
|
|
|
|
int dataPin = 12;
|
|
|
|
int dataPin = 12;
|
|
|
|
|
|
|
|
int srReset = 6;
|
|
|
|
int IRin = 7;
|
|
|
|
int IRin = 7;
|
|
|
|
|
|
|
|
int srEnable = 5;
|
|
|
|
int matrix = A0;
|
|
|
|
int matrix = A0;
|
|
|
|
|
|
|
|
|
|
|
|
byte out = 0;
|
|
|
|
byte out = 0;
|
|
|
@ -24,7 +26,7 @@ LiquidCrystal_I2C lcd(0x27,16,2);
|
|
|
|
|
|
|
|
|
|
|
|
void updateShiftRegister()
|
|
|
|
void updateShiftRegister()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
digitalWrite(latchPin,LOW);
|
|
|
|
digitalWrite(latchPin, LOW);
|
|
|
|
shiftOut(dataPin, clockPin, LSBFIRST, out);
|
|
|
|
shiftOut(dataPin, clockPin, LSBFIRST, out);
|
|
|
|
digitalWrite(latchPin, HIGH);
|
|
|
|
digitalWrite(latchPin, HIGH);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -97,6 +99,9 @@ void setup()
|
|
|
|
pinMode(latchPin, OUTPUT);
|
|
|
|
pinMode(latchPin, OUTPUT);
|
|
|
|
pinMode(dataPin, OUTPUT);
|
|
|
|
pinMode(dataPin, OUTPUT);
|
|
|
|
pinMode(clockPin, OUTPUT);
|
|
|
|
pinMode(clockPin, OUTPUT);
|
|
|
|
|
|
|
|
pinMode(srReset, OUTPUT);
|
|
|
|
|
|
|
|
pinMode(srEnable, OUTPUT);
|
|
|
|
|
|
|
|
digitalWrite(srReset,HIGH);
|
|
|
|
remote.enableIRIn();
|
|
|
|
remote.enableIRIn();
|
|
|
|
bitSet(out,5);
|
|
|
|
bitSet(out,5);
|
|
|
|
lcd.init();
|
|
|
|
lcd.init();
|
|
|
@ -107,7 +112,7 @@ void setup()
|
|
|
|
lcd.setCursor(0, 1);
|
|
|
|
lcd.setCursor(0, 1);
|
|
|
|
lcd.print("Input: AUX");
|
|
|
|
lcd.print("Input: AUX");
|
|
|
|
updateShiftRegister();
|
|
|
|
updateShiftRegister();
|
|
|
|
|
|
|
|
digitalWrite(srEnable,LOW);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
void loop() {
|
|
|
|