Introduction: Audio Input Selector, or Water Level

My friend asked me, can I build for him a simple input channel selector, with relays for DIY amplifier?
Important, when the amlifier powered off, the device can remember the last selected channel!!!

Yes of course!

The projects:
4 push button

4 input channel switched by 4 relay

Supplies

Items:

1x Arduino nano Atmel mega 328P

4x C945 NPN transistor

4x LED

5x 1K resistor

1x 330R

3x 3K3

1x 4K7

Step 1: Test

push putton cheap edition a GND wire ;)

Step 2: Program

#include 
#include 

 #define chanel1 2
 #define chanel2 4
 #define chanel3 7
 #define chanel4 8
 #define measure 14 //A0
 #define monitor 13 //nano led
 int sensorValue;
bool firstrun=true;
int addr=1;
  
uint8_t memoria=1;

void Chanel1(){
//channel1
 if((0

Attachments

Step 3: Alternate Use Water Level?

If you change the push button to wire, maybe usable water level indicator? Of course change the values in "if" statements. In example, SW1 wire switch on water pump.

You can use insulated wire, but due to direct current solid 1.5 copper is recommended, clean the end at least 5 cm.