|
|
|
@ -63,6 +63,13 @@ const uint8_t pinGndChOn2 = 10;
|
|
|
|
|
const uint8_t pinLedChOn2 = 11;
|
|
|
|
|
const uint8_t pinBtnChOn2 = 12;
|
|
|
|
|
|
|
|
|
|
/***************************************************************************//**
|
|
|
|
|
* @brief Relay
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
const uint8_t pinRelay1 = 13;
|
|
|
|
|
const uint8_t pinRelay2 = A7;
|
|
|
|
|
TimedPin RelayMute(pinRelay2);
|
|
|
|
|
|
|
|
|
|
/***************************************************************************//**
|
|
|
|
|
* @brief LED
|
|
|
|
|
*******************************************************************************/
|
|
|
|
@ -80,7 +87,7 @@ bool MidiCfgTxOnly; /// duplex or only tx configuration (without MIDI rx lin
|
|
|
|
|
|
|
|
|
|
MixerMuteState AirMutes[2] = {
|
|
|
|
|
MixerMuteState(22, &LedChOn1, BTN_CH_ON1, EV_UI_RX_MUTE_CH1_ON, EV_UI_RX_MUTE_CH1_OFF),
|
|
|
|
|
MixerMuteState(23, &LedChOn2, BTN_CH_ON2, EV_UI_RX_MUTE_CH2_ON, EV_UI_RX_MUTE_CH2_OFF)
|
|
|
|
|
MixerMuteStateRly(23, &LedChOn2, &RelayMute, BTN_CH_ON2, EV_UI_RX_MUTE_CH2_ON, EV_UI_RX_MUTE_CH2_OFF)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
MixerFaderState AirFaders[2] = {
|
|
|
|
@ -133,11 +140,16 @@ void setup() {
|
|
|
|
|
pinMode(pinBtnChOn1, INPUT_PULLUP);
|
|
|
|
|
pinMode(pinBtnChOn2, INPUT_PULLUP);
|
|
|
|
|
|
|
|
|
|
pinMode(pinRelay1, OUTPUT);
|
|
|
|
|
pinMode(pinRelay2, OUTPUT);
|
|
|
|
|
pinMode(pinGndDec1, OUTPUT);
|
|
|
|
|
pinMode(pinGndInc2, OUTPUT);
|
|
|
|
|
pinMode(pinGndDec2, OUTPUT);
|
|
|
|
|
pinMode(pinGndChOn1, OUTPUT);
|
|
|
|
|
pinMode(pinGndChOn2, OUTPUT);
|
|
|
|
|
|
|
|
|
|
digitalWrite(pinRelay1, LOW);
|
|
|
|
|
digitalWrite(pinRelay2, LOW);
|
|
|
|
|
digitalWrite(pinGndDec1, LOW);
|
|
|
|
|
digitalWrite(pinGndInc2, LOW);
|
|
|
|
|
digitalWrite(pinGndDec2, LOW);
|
|
|
|
@ -151,6 +163,7 @@ void setup() {
|
|
|
|
|
LedDec1.begin();
|
|
|
|
|
LedInc2.begin();
|
|
|
|
|
LedDec2.begin();
|
|
|
|
|
RelayMute.begin();
|
|
|
|
|
|
|
|
|
|
MIDI.setHandleControlChange(MidiCCHandler);
|
|
|
|
|
MIDI.begin(MIDI_CHANNEL_OMNI); // Initiate MIDI communications, listen to all channels
|
|
|
|
@ -212,6 +225,7 @@ void loop() {
|
|
|
|
|
LedDec1.update();
|
|
|
|
|
LedInc2.update();
|
|
|
|
|
LedDec2.update();
|
|
|
|
|
RelayMute.update();
|
|
|
|
|
}
|
|
|
|
|
// execute every 100ms ******************************************************
|
|
|
|
|
if (Tmr100ms.Check(t)) {
|
|
|
|
|