Тема: BD37534FV+LCD2004+энкодер+ИК пульт
Требуется тестирование!!!
Управление энкодер, 2 кнопки (IN и SET) и ИК пульт.
#define IR_1 0x2FDD02F // Кнопка вверх
#define IR_2 0x2FD32CD // Кнопка вниз
#define IR_3 0x2FD906F // Кнопка >
#define IR_4 0x2FDF20D // Кнопка <
#define IR_5 0x2FD708F // Кнопка IN
#define IR_6 0x2FD6A95 // Кнопка MENU
#include <Wire.h>
#include <LiquidCrystal_I2C.h> // http://forum.rcl-radio.ru/misc.php?action=pan_download&item=45&download=1
#include <BD37534FV.h> // https://github.com/liman324/BD37534FV/archive/master.zip
#include <Encoder.h> // http://rcl-radio.ru/wp-content/uploads/2019/05/Encoder.zip
#include <EEPROM.h>
#include <MsTimer2.h> // http://rcl-radio.ru/wp-content/uploads/2018/11/MsTimer2.zip
#include <boarddefs.h>
#include <IRremote.h> // http://rcl-radio.ru/wp-content/uploads/2019/06/IRremote.zip
BD37534FV bd;
LiquidCrystal_I2C lcd(0x27,20,4); // Устанавливаем дисплей
IRrecv irrecv(12); // указываем вывод модуля IR приемника
Encoder myEnc(9, 8);// DT, CLK
decode_results ir;
byte a1[8] = {0b00000,0b10101,0b10101,0b10101,0b10101,0b10101,0b10101,0b00000};
byte a2[8] = {0b00000,0b10100,0b10100,0b10100,0b10100,0b10100,0b10100,0b00000};
byte a3[8] = {0b00000,0b10000,0b10000,0b10000,0b10000,0b10000,0b10000,0b00000};
byte a4[8] = {0b10000,0b11000,0b11100,0b11110,0b11100,0b11000,0b10000,0b00000};
unsigned long time,times_in,oldPosition = -999,newPosition;
byte in,in_x,w,w1,w2[4],w3,z,z0,z1,q,i,www,gr1,gr2;
int menu,menu0,menu_1,menu_2,vol,bass,treb,mid,vol_d,bass_d,treb_d,mid_d;
int temp0,gain0,gain1,gain2,gain3,gain_d;
int bass_f,bass_q,treb_f,treb_q,mid_f,mid_q,loud_f,loud_g;
int lf,rf,lr,rr,sub,sub_f,faza;
byte mesto[8]={4,13,4,13,4,13,4,13};
byte mesto1[8]={0,0,1,1,2,2,3,3};
byte mesto2[7]={0,11,0,11,11,0,11};
byte mesto3[7]={0,0,1,1,2,3,3};
String bass_nam[4]={"60 Hz", "80 Hz", "100 Hz", "120 Hz"};
String treb_nam[4]={"7.5 kHz", "10 kHz", "12.5kHz", "15 kHz"};
String mid_nam[4] ={"500 Hz", "1 kHz", "1.5 kHz", "2.5 kHz"};
String lon_nam[4] ={"250 Hz", "400 Hz", "800 Hz", "disable"};
String sub_nam[5] ={" OFF ", " 55 Hz", " 85 Hz", " 120 Hz", " 160 Hz"};
float bass_nam_1[4]={0.5, 1.0, 1.5, 2.0};
float mid_nam_1[4]={0.75, 1.0, 1.25, 1.5};
float treb_nam_1[2]={0.75, 1.25};
void setup() {Serial.begin(9600);
irrecv.enableIRIn();lcd.init();lcd.backlight();
lcd.setCursor(0,1);lcd.print(" Sound Processor");lcd.setCursor(0,2);lcd.print(" BD37534FV"); delay(2000);
lcd.createChar(0,a1);lcd.createChar(1,a2);lcd.createChar(2,a3);lcd.createChar(3,a4);
pinMode(10,INPUT); // МЕНЮ КНОПКА SW энкодера
pinMode(2,INPUT); // МЕНЮ НАСТРОЕК
pinMode(3,INPUT); // IN
MsTimer2::set(3, to_Timer);MsTimer2::start();
if(EEPROM.read(100)!=0){for(int i=0;i<101;i++){EEPROM.update(i,0);}}// очистка памяти при первом включении
vol = EEPROM.read(0)-79;treb = EEPROM.read(1)-20;mid = EEPROM.read(2)-20;bass = EEPROM.read(3)-20;
in = EEPROM.read(4);gain1 = EEPROM.read(5);gain2 = EEPROM.read(6);gain3 = EEPROM.read(7);
bass_f = EEPROM.read(8);bass_q = EEPROM.read(9);treb_f = EEPROM.read(10);treb_q = EEPROM.read(11);
mid_f = EEPROM.read(12);mid_q = EEPROM.read(13);loud_f = EEPROM.read(14);loud_g= EEPROM.read(15);
lf = EEPROM.read(16)-79;rf = EEPROM.read(17)-79;lr = EEPROM.read(18)-79;rr = EEPROM.read(19)-79;sub = EEPROM.read(20)-79;sub_f = EEPROM.read(21);
faza = EEPROM.read(22);
w2_arr();audio();cl();
}
void loop(){
if(digitalRead(10)==LOW&&menu0==0){menu++;delay(200);time=millis();w=1;w2_arr();if(menu>3){menu=0;}}// меню 0
if(digitalRead(10)==LOW&&menu0==1){menu_1++;delay(200);time=millis();w=1;if(menu_1>7){menu_1=0;}}// меню 1
if(digitalRead(10)==LOW&&menu0==2){menu_2++;delay(200);time=millis();w=1;if(menu_2>6){menu_2=0;}}// меню 2
if(digitalRead(2)==HIGH){menu0++;cl();delay(200);time=millis();w=1;w2_arr();menu=0;menu_1;menu_2;if(menu0>2){menu0=0;}}// меню
if(digitalRead(3)==HIGH){in++;cl();times_in=millis();in_x=1;w3=1;www=1;menu0=100;if(in>2){in=0;}}// IN
////////////////////// IR /////////////////////////////////////////////////
if ( irrecv.decode( &ir )) {Serial.print("0x");Serial.println( ir.value,HEX);irrecv.resume();time=millis();w=1;}// IR приемник - чтение, в мониторе порта отображаются коды кнопок
if(ir.value==0){gr1=0;gr2=0;}// запрет нажатий не активных кнопок пульта
if(ir.value==IR_2&&menu0==0){menu++;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu>3){menu=0;}}// кнопка вверх
if(ir.value==IR_1&&menu0==0){menu--;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu<0){menu=3;}}// кнопка вниз
if(ir.value==IR_2&&menu0==1){menu_1++;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu_1>7){menu_1=0;}}// кнопка вверх
if(ir.value==IR_1&&menu0==1){menu_1--;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu_1<0){menu_1=7;}}// кнопка вниз
if(ir.value==IR_2&&menu0==2){menu_2++;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu_2>6){menu_2=0;}}// кнопка вверх
if(ir.value==IR_1&&menu0==2){menu_2--;gr1=0;gr2=0;cl1();time=millis();w=1;if(menu_2<0){menu_2=6;}}// кнопка вниз
if(ir.value==IR_6){menu0++;gr1=0;gr2=0;cl();time=millis();w=1;w2_arr();menu=0;menu_1;menu_2;if(menu0>2){menu0=0;}}// кнопка MENU
if(ir.value==IR_5){in++;gr1=0;gr2=0;cl();times_in=millis();in_x=1;w3=1;www=1;menu0=100;if(in>2){in=0;}}// кнопка IN
/////////////////////////////// MENU0 = VOLUME TERBLE MIDDLE BASS ///////////////////////////////////////////////////////////////////////
if(menu0==0){
switch(menu){
case 0: temp0 = vol;q=0;break;
case 1: temp0 = bass;q=1;break;
case 2: temp0 = mid;q=2;break;
case 3: temp0 = treb;q=3;break;}
if(ir.value==IR_3){temp0++;gr1=1;gr2=0;cl1();time=millis();w=1;w2[q]=1;www=1;}// кнопка >
if(ir.value==0xFFFFFFFF and gr1==1){temp0++;gr2=0;cl1();time=millis();;w=1;w2[q]=1;www=1;}// кнопка >>>>>>
if(ir.value==IR_4){temp0--;gr1=0;gr2=1;cl1();time=millis();;w=1;w2[q]=1;www=1;}// кнопка <
if(ir.value==0xFFFFFFFF and gr2==1){temp0--;gr1=0;cl1();time=millis();w=1;w2[q]=1;www=1;}// кнопка <<<<<<
if (newPosition != oldPosition){oldPosition = newPosition;
temp0=temp0+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;w2[q]=1;www=1;}
switch(menu){
case 0: vol = temp0;vol_func();break;
case 1: bass = temp0;bass_func();break;
case 2: mid = temp0;mid_func();break;
case 3: treb = temp0;treb_func();break;}
au();
for(i=0;i<4;i++){if(menu==i){lcd.setCursor(0,i);lcd.write((uint8_t)3);}else{lcd.setCursor(0,i);lcd.print(" ");}}
lcd.setCursor(1,0);lcd.print("VOLUME ");if(vol>=0){lcd.print(" ");}lcd.print(vol);lcd.print(" ");vol_d=map(vol,-79,15,0,24);
lcd.setCursor(1,1);lcd.print("BASS ");if(bass>=0){lcd.print(" ");}lcd.print(bass);lcd.print(" ");bass_d=map(bass,-20,20,0,24);
lcd.setCursor(1,2);lcd.print("MIDDLE ");if(mid>=0){lcd.print(" ");}lcd.print(mid);lcd.print(" ");mid_d=map(mid,-20,20,0,24);
lcd.setCursor(1,3);lcd.print("TREBLE ");if(treb>=0){lcd.print(" ");}lcd.print(treb);lcd.print(" ");treb_d=map(treb,-20,20,0,24);
if(w2[0]==1){
for(z=0,z0=0,z1=0;z<=vol_d;z++,z1++){if(z1>2){z1=0;z0++;}
if(z1==1){lcd.setCursor(z0+12,0);lcd.write((uint8_t)0);lcd.setCursor(z0+1+12,0);lcd.print(" ");}}
if(z1==3){lcd.setCursor(z0+12,0);lcd.write((uint8_t)1);}
if(z1==2){lcd.setCursor(z0+12,0);lcd.write((uint8_t)2);}w2[0]=0;}
if(w2[1]==1){
for(z=0,z0=0,z1=0;z<=bass_d;z++,z1++){if(z1>2){z1=0;z0++;}
if(z1==1){lcd.setCursor(z0+12,1);lcd.write((uint8_t)0);lcd.setCursor(z0+1+12,1);lcd.print(" ");}}
if(z1==3){lcd.setCursor(z0+12,1);lcd.write((uint8_t)1);}
if(z1==2){lcd.setCursor(z0+12,1);lcd.write((uint8_t)2);}w2[1]=0;}
if(w2[2]==1){
for(z=0,z0=0,z1=0;z<=mid_d;z++,z1++){if(z1>2){z1=0;z0++;}
if(z1==1){lcd.setCursor(z0+12,2);lcd.write((uint8_t)0);lcd.setCursor(z0+1+12,2);lcd.print(" ");}}
if(z1==3){lcd.setCursor(z0+12,2);lcd.write((uint8_t)1);}
if(z1==2){lcd.setCursor(z0+12,2);lcd.write((uint8_t)2);}w2[2]=0;}
if(w2[3]==1){
for(z=0,z0=0,z1=0;z<=treb_d;z++,z1++){if(z1>2){z1=0;z0++;}
if(z1==1){lcd.setCursor(z0+12,3);lcd.write((uint8_t)0);lcd.setCursor(z0+1+12,3);lcd.print(" ");}}
if(z1==3){lcd.setCursor(z0+12,3);lcd.write((uint8_t)1);}
if(z1==2){lcd.setCursor(z0+12,3);lcd.write((uint8_t)2);}w2[3]=0;}
}// menu0 = 0
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// MENU 2 ////////////////////////////////////////////////////////
if(menu0==1){
switch(menu_1){
case 0: temp0 = bass_f;break;
case 1: temp0 = bass_q;break;
case 2: temp0 = mid_f;break;
case 3: temp0 = mid_q;break;
case 4: temp0 = treb_f;break;
case 5: temp0 = treb_q;break;
case 6: temp0 = loud_f;break;
case 7: temp0 = loud_g;break;}
if(ir.value==IR_3){temp0++;gr1=1;gr2=0;cl1();time=millis();w=1;www=1;}// кнопка >
if(ir.value==0xFFFFFFFF and gr1==1){temp0++;gr2=0;cl1();time=millis();w=1;www=1;}// кнопка >>>>>>
if(ir.value==IR_4){temp0--;gr1=0;gr2=1;cl1();time=millis();;w=1;www=1;}// кнопка <
if(ir.value==0xFFFFFFFF and gr2==1){temp0--;gr1=0;cl1();time=millis();w=1;www=1;}// кнопка <<<<<<
if (newPosition != oldPosition){oldPosition = newPosition;
temp0=temp0+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;www=1;}
switch(menu_1){
case 0: bass_f = temp0;bass_f_func();break;
case 1: bass_q = temp0;bass_q_func();break;
case 2: mid_f = temp0;mid_f_func();break;
case 3: mid_q = temp0;mid_q_func();break;
case 4: treb_f = temp0;treb_f_func();break;
case 5: treb_q = temp0;treb_q_func();break;
case 6: loud_f = temp0;loud_f_func();break;
case 7: loud_g = temp0;loud_g_func();break;}
au();
for(i=0;i<8;i++){if(menu_1==i){lcd.setCursor(mesto[i],mesto1[i]);lcd.write((uint8_t)3);}else{lcd.setCursor(mesto[i],mesto1[i]);lcd.print(" ");}}
lcd.setCursor(0,0);lcd.print("BASS");lcd.setCursor(5,0);lcd.print(bass_nam[bass_f]);lcd.setCursor(14,0);lcd.print("Q ");lcd.print(bass_nam_1[bass_q]);
lcd.setCursor(0,1);lcd.print("MIDD");lcd.setCursor(5,1);lcd.print(mid_nam[mid_f]);lcd.setCursor(14,1);lcd.print("Q ");lcd.print(mid_nam_1[mid_q]);
lcd.setCursor(0,2);lcd.print("TREB");lcd.setCursor(5,2);lcd.print(treb_nam[treb_f]);lcd.setCursor(14,2);lcd.print("Q ");lcd.print(treb_nam_1[treb_q]);
lcd.setCursor(0,3);lcd.print("LOUD");lcd.setCursor(5,3);lcd.print(lon_nam[loud_f]);lcd.setCursor(14,3);lcd.print("G ");lcd.print(loud_g/10);lcd.print(loud_g%10);lcd.setCursor(18,3);lcd.print("dB");
}// menu0 = 1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(menu0==2){
switch(menu_2){
case 0: temp0 = lf;break;
case 1: temp0 = rf;break;
case 2: temp0 = lr;break;
case 3: temp0 = rr;break;
case 4: temp0 = faza;break;
case 5: temp0 = sub;break;
case 6: temp0 = sub_f;break;}
if(ir.value==IR_3){temp0++;gr1=1;gr2=0;cl1();time=millis();w=1;www=1;}// кнопка >
if(ir.value==0xFFFFFFFF and gr1==1){temp0++;gr2=0;cl1();time=millis();w=1;www=1;}// кнопка >>>>>>
if(ir.value==IR_4){temp0--;gr1=0;gr2=1;cl1();time=millis();;w=1;www=1;}// кнопка <
if(ir.value==0xFFFFFFFF and gr2==1){temp0--;gr1=0;cl1();time=millis();w=1;www=1;}// кнопка <<<<<<
if (newPosition != oldPosition){oldPosition = newPosition;
temp0=temp0+newPosition;myEnc.write(0);newPosition=0;time=millis();w=1;www=1;}
switch(menu_2){
case 0: lf = temp0;lf_func();break;
case 1: rf = temp0;rf_func();break;
case 2: lr = temp0;lr_func();break;
case 3: rr = temp0;rr_func();break;
case 4: faza = temp0;faza_func();break;
case 5: sub = temp0;sub_func();break;
case 6: sub_f = temp0;sub_f_func();break;}
au();
for(i=0;i<7;i++){if(menu_2==i){lcd.setCursor(mesto2[i],mesto3[i]);lcd.write((uint8_t)3);}else{lcd.setCursor(mesto2[i],mesto3[i]);lcd.print(" ");}}
lcd.setCursor(1,0);lcd.print("LF");lcd.setCursor(4,0);lcd.print(lf);lcd.print(" ");lcd.setCursor(7,0);lcd.print("dB ");lcd.setCursor(12,0);lcd.print("RF ");lcd.print(rf);lcd.print(" ");lcd.setCursor(18,0);lcd.print("dB");
lcd.setCursor(1,1);lcd.print("LR");lcd.setCursor(4,1);lcd.print(lr);lcd.print(" ");lcd.setCursor(7,1);lcd.print("dB ");lcd.setCursor(12,1);lcd.print("RR ");lcd.print(rr);lcd.print(" ");lcd.setCursor(18,1);lcd.print("dB");
lcd.setCursor(1,2);lcd.print("Subwoofer");lcd.setCursor(12,2);lcd.print("Faza ");if(faza==0){lcd.print(" 0");}else{lcd.print("180");}
lcd.setCursor(1,3);lcd.print("G ");lcd.setCursor(4,3);lcd.print(sub);lcd.print(" ");lcd.setCursor(7,3);lcd.print("dB ");lcd.setCursor(12,3);lcd.print(sub_nam[sub_f]);
} // menu0 = 2
////////////////////////// GAIN IN /////////////////////////////////////////////////////////////////////////////////////
if(in_x==1){ menu0=100;
switch(in){
case 0: gain0 = gain1;break;
case 1: gain0 = gain2;break;
case 2: gain0 = gain3;break;}
if(ir.value==IR_3){gain0++;gr1=1;gr2=0;cl1();time=millis();times_in=millis();www=1;w=1;w3=1;gain_func();}// кнопка >
if(ir.value==0xFFFFFFFF and gr1==1){gain0++;gr2=0;cl1();time=millis();times_in=millis();www=1;w=1;w3=1;gain_func();}// кнопка >>>>>>
if(ir.value==IR_4){gain0--;gr1=0;gr2=1;cl1();time=millis();times_in=millis();www=1;w=1;w3=1;gain_func();}// кнопка <
if(ir.value==0xFFFFFFFF and gr2==1){gain0--;gr1=0;cl1();time=millis();times_in=millis();www=1;w=1;w3=1;gain_func();}// кнопка <<<<<<
if (newPosition != oldPosition) {oldPosition = newPosition;
gain0=gain0+newPosition;myEnc.write(0);newPosition=0;time=millis();times_in=millis();www=1;w=1;w3=1;gain_func();}
switch(in){
case 0: gain1 = gain0;break;
case 1: gain2 = gain0;break;
case 2: gain3 = gain0;break;}
au();
lcd.setCursor(2,1);lcd.print("Gain IN ");lcd.print(in+1);lcd.setCursor(12,1);lcd.print(" ");lcd.print(gain0);lcd.print(" ");lcd.setCursor(16,1);lcd.print("dB");gain_d=gain0+1;
if(w3==1){
for(z=0,z0=0,z1=0;z<=gain_d;z++,z1++){if(z1>2){z1=0;z0++;}
if(z1==1){lcd.setCursor(z0+7,2);lcd.write((uint8_t)0);lcd.setCursor(z0+1+7,2);lcd.print(" ");}}
if(z1==3){lcd.setCursor(z0+7,2);lcd.write((uint8_t)1);}
if(z1==2){lcd.setCursor(z0+7,2);lcd.write((uint8_t)2);}} w3=0;
if(millis()-times_in>3000){in_x=0;cl();menu0=0;w2_arr();}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// EEPROM ///////////////////////////////////////////////////////////////
if(millis()-time>10000 && w==1){
EEPROM.update(0,vol+79);EEPROM.update(1,treb+20);EEPROM.update(2,mid+20);EEPROM.update(3,bass+20);
EEPROM.update(4,in);EEPROM.update(5,gain1);EEPROM.update(6,gain2);EEPROM.update(7,gain3);
EEPROM.update(8,bass_f);EEPROM.update(9,bass_q);EEPROM.update(10,treb_f);EEPROM.update(11,treb_q),
EEPROM.update(12,mid_f);EEPROM.update(13,mid_q);EEPROM.update(14,loud_f);EEPROM.update(15,loud_g);
EEPROM.update(16,lf+79);EEPROM.update(17,rf+79);EEPROM.update(18,lr+79);EEPROM.update(19,rr+79);EEPROM.update(20,sub+79);EEPROM.update(21,sub_f);
EEPROM.update(22,faza);
menu=0;menu_1=0;menu_2=0;w=0;w2_arr();}
}// loop
void faza_func(){if(faza>1){faza=0;}if(faza<0){faza=1;}}
void sub_f_func(){if(sub_f>4){sub_f=0;}if(sub_f<0){sub_f=4;}}
void lf_func(){if(lf<-79){lf=-79;}if(lf>15){lf=15;}};
void rf_func(){if(rf<-79){rf=-79;}if(rf>15){rf=15;}};
void lr_func(){if(lr<-79){lr=-79;}if(lr>15){lr=15;}};
void rr_func(){if(rr<-79){rr=-79;}if(rr>15){rr=15;}};
void sub_func(){if(sub<-79){sub=-79;}if(sub>15){sub=15;}};
void au(){if(www==1){audio();www=0;}}
void loud_f_func(){if(loud_f>3){loud_f=0;}if(loud_f<0){loud_f=3;}}
void loud_g_func(){if(loud_g>20){loud_g=20;}if(loud_g<0){loud_g=0;}}
void mid_q_func(){if(mid_q>3){mid_q=0;}if(mid_q<0){mid_q=3;}}
void treb_q_func(){if(treb_q>1){treb_q=0;}if(treb_q<0){treb_q=1;}}
void bass_q_func(){if(bass_q>3){bass_q=0;}if(bass_q<0){bass_q=3;}}
void mid_f_func(){if(mid_f>3){mid_f=0;}if(mid_f<0){mid_f=3;}}
void treb_f_func(){if(treb_f>3){treb_f=0;}if(treb_f<0){treb_f=3;}}
void bass_f_func(){if(bass_f>3){bass_f=0;}if(bass_f<0){bass_f=3;}}
void gain_func(){if(gain0<0){gain0=0;}if(gain0>20){gain0=20;}}
void bass_func(){if(bass>20){bass=20;}if(bass<-20){bass=-20;}}
void mid_func(){if(mid>20){mid=20;}if(mid<-20){mid=-20;}}
void treb_func(){if(treb>20){treb=20;}if(treb<-20){treb=-20;}}
void vol_func(){if(vol<-79){vol=-79;}if(vol>15){vol=15;}}
void w2_arr(){w2[0]=1;w2[1]=1;w2[2]=1;w2[3]=1;}
void cl(){ir.value=0;delay(300);lcd.clear();}
void cl1(){ir.value=0;delay(200);}
void audio(){
bd.setSetup_1(1,2,0); // default (1,2,0)
bd.setSetup_2(sub_f,1,0,faza);
// int sub_f ------ OFF 55Hz 85Hz 120Hz 160Hz = int 0...4
// int sub_out ---- LPF Front Rear Prohibition = int 0...3
// int level_metr - HOLD REST = int 0..1
// int faza ------- 0 180 = int 0...1
bd.setLoudness_f(loud_f); // 250Hz 400Hz 800Hz Prohibition = int 0...3
bd.setIn(in); // 0...2
bd.setIn_gain(gain0,0); // in_gain -- 0...20 = 0...20 dB, mute -- 0 default
bd.setVol(vol); // -79...+15 dB = int -79...15
bd.setFront_1(rf); // -79...+15 dB = int -79...15
bd.setFront_2(lf); // -79...+15 dB = int -79...15
bd.setRear_1(rr); // -79...+15 dB = int -79...15
bd.setRear_2(lr); // -79...+15 dB = int -79...15
bd.setSub(sub); // -79...+15 dB = int -79...15
bd.mix();
bd.setBass_setup(bass_q,bass_f); // 0.5 1.0 1.5 2.0 --- int 0...3, 60Hz 80Hz 100Hz 120Hz --- int 0...3
bd.setMiddle_setup(mid_q,mid_f); // 0.75 1.0 1.25 1.5 --- int 0...3, 500Hz 1kHz 1.5kHz 2.5kHz --- int 0...3
bd.setTreble_setup(treb_q,treb_f); // 0.75 1.25 --- int 0...1, 7.5kHz 10kHz 12.5kHz 15kHz --- int 0...3
bd.setBass_gain(bass); // --20 ... +20 dB = int -20 ... 20
bd.setMiddle_gain(mid); // --20 ... +20 dB = int -20 ... 20
bd.setTreble_gain(treb); // --20 ... +20 dB = int -20 ... 20
bd.setLoudness_gain(loud_g); // 0 ... 20 dB = int 0 ... 20
}
void to_Timer(){newPosition = myEnc.read()/4;}