From d29f5c93c5a0a707eab5c833564693b37ab204e3 Mon Sep 17 00:00:00 2001 From: dewdude Date: Sun, 29 Dec 2019 17:26:15 -0500 Subject: [PATCH] Added some display code for a display I'm not using. --- pma770.ino | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pma770.ino b/pma770.ino index 9378390..962548d 100644 --- a/pma770.ino +++ b/pma770.ino @@ -1,5 +1,5 @@ /* - PMA770Relay Alpha2 + PMA770Relay 0.1 dewdude@gmail.com - 29-12-2019 @@ -15,6 +15,8 @@ int matrix = A0; byte out = 0; int mx = 0; +LiquidCrystal_I2C lcd(0x27,16,2); + void updateShiftRegister() { digitalWrite(latchPin,LOW); @@ -34,6 +36,8 @@ void setTape2() DontCrossTheStreams(); bitSet(out,7); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("TAPE-2 "); } void setTape1() @@ -41,6 +45,8 @@ void setTape1() DontCrossTheStreams(); bitSet(out,6); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("TAPE-1 "); } void setAUX() @@ -48,6 +54,8 @@ void setAUX() DontCrossTheStreams(); bitSet(out,5); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("AUX "); } void setTune() @@ -55,6 +63,8 @@ void setTune() DontCrossTheStreams(); bitSet(out,4); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("TUNER "); } void setPh1() @@ -63,6 +73,8 @@ void setPh1() bitSet(out,3); bitSet(out,1); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("PHONO-1 "); } void setPh2() @@ -71,6 +83,8 @@ void setPh2() bitSet(out,3); bitSet(out,2); updateShiftRegister(); + lcd.setCursor(7, 1); + lcd.print("PHONO-2 "); } void setup() @@ -79,7 +93,15 @@ void setup() pinMode(dataPin, OUTPUT); pinMode(clockPin, OUTPUT); bitSet(out,5); + lcd.init(); + lcd.backlight(); + lcd.home(); + lcd.setCursor(0, 0); + lcd.print("Denon PMA-770"); + lcd.setCursor(0, 1); + lcd.print("Input: AUX"); updateShiftRegister(); + } void loop() {