Hi people,
I have an old audio system and I lost the remote. Now I want to control preamp board with Arduino Nano. I found a lot of examples on the Internet but nothing concrete. Either I found only for one PT or for the another but nowhere controled together.
My inspiration comes from here, is the same audio system that I have.
I sherch for the datasheet for both PT2323 and PT2258, I found some library for these ICs. And from library studying, I get this:
#include <Wire.h>
#include <PT2323.h>
#include <PT2258.h>
PT2323 pt0; PT2258 pt1;
int inn = 0;int mute, tdd, mix;
int volume = 40;
void setup() {
Wire.setClock(100000);
Wire.begin();
Serial.begin(9600);
if (!pt1.init())
Serial.println("PT2258 Successfully Initiated");
else
Serial.println("Failed to Initiate PT2258");
pt1.setMasterVolume(volume);
pinMode(7,INPUT); // INPUT
pinMode(8,INPUT); // MUTE
pinMode(11,INPUT); // 3D
pinMode(12,INPUT); // Mixed
}
void loop() {
if(digitalRead(7)==HIGH){pt0.setInput(inn);inn++; if(inn>=4){inn=0;}
if(inn==0){Serial.println("INPUT: 1");delay(300);}
if(inn==1){Serial.println("INPUT: 2");delay(300);}
if(inn==2){Serial.println("INPUT: 3");delay(300);}
if(inn==3){Serial.println("INPUT: 4");delay(300);}delay(300);}
if(mute == 1 && digitalRead(8)==HIGH){pt0.setMute(0,0,0,0,0,0,0);mute=0;Serial.println("UNMUTED");delay(300);}
if(digitalRead(8)==HIGH){pt0.setMute(1,1,1,1,1,1,1);mute=1;Serial.println("MUTED");delay(300);}
if(tdd == 1 && digitalRead(11)==HIGH){pt0.setFeature(0,0);tdd = 0;Serial.println("3D OFF");delay(300);}
if(digitalRead(11)==HIGH){pt0.setFeature(0,1);tdd = 1;Serial.println("3D ON");delay(300);}
if(mix == 1 && digitalRead(12)==HIGH){pt0.setFeature(0,0);mix = 0;Serial.println("MIX OFF");delay(300);}
if(digitalRead(12)==HIGH){pt0.setFeature(1,0);mix = 1;Serial.println("MIX ON");delay(300);}
delay(1000);
}
In serial monitor it says that is initialized with PT2258 but nothing works. PT2323 it should work without any initialization but is not ![]()
I tried to simplify everything, but that doesn't work either. Here's what I tryed:
#include <Wire.h>
#include <PT2323.h>
#include <PT2258.h>
PT2323 pt0; PT2258 pt1;
int volume = 40;
void setup() {
Wire.setClock(100000);
Wire.begin();
Serial.begin(9600);
if (!pt1.init())
Serial.println("PT2258 Successfully Initiated");
else
Serial.println("Failed to Initiate PT2258");
}
void loop() {
pt0.setInput(1);
pt0.setMute(0,0,0,0,0,0,0);
pt0.setFeature(1,1);
pt1.setMasterVolume(volume);
}
So "mute" option is 0(it means that is unmuted), Input is set to ch1, MasterVolume is set to 40. What is need to do more to basicaly work? ![]()