So, a long night, and Im still not 100%$ sure if iv got the right Components on the right side of the lamp. But here is what I have, and the code I have running it so far.
// the setup function runs once when you press reset or power the board
int lhigh = 13;
int llow = 12;
int lind = 11;
int laux = 10;
int ihigh = 9;
int iind = 8;
int iaux = 7;
int bhigh= 0;
int bind = 0;
int baux = 0;
int obhigh= 0;
int obind = 0;
int obaux = 0;
int highstate = 0;
int indstate = 0;
int auxstate = 0;
long lastDebounceTime = 0;
long debounceDelay = 5;
int rhigh;
int rind;
int raux;
void setup() {
// initialize digital pin 13 as an output.
pinMode(lhigh, OUTPUT);
pinMode(llow, OUTPUT);
pinMode(lind, OUTPUT);
pinMode(laux, OUTPUT);
pinMode(ihigh, INPUT);
pinMode(iind, INPUT);
pinMode(iaux, INPUT);
}
// the loop function runs over and over again forever
void loop() {
// High / Low beam light switch
rhigh = digitalRead(ihigh);
if (rhigh != obhigh) {
lastDebounceTime = millis();
obhigh = rhigh;
}
if ((millis() - lastDebounceTime) > debounceDelay) {
if (bhigh != obhigh) {
bhigh = obhigh;
if (bhigh == HIGH) {
highstate = !highstate;
digitalWrite(lhigh, highstate);
digitalWrite(llow, !highstate);
}
}
}
// Indicator light switch
rind = digitalRead(iind);
if (rind != obind) {
lastDebounceTime = millis();
obind = rind;
}
if ((millis() - lastDebounceTime) > debounceDelay) {
if (bind != obind) {
bind = obind;
if (bind == HIGH) {
indstate = !indstate;
digitalWrite(lind, indstate);
}
}
}
// Aux Light light switch
raux = digitalRead(iaux);
if (raux != obaux) {
lastDebounceTime = millis();
obaux = raux;
}
if ((millis() - lastDebounceTime) > debounceDelay) {
if (baux != obaux) {
baux = obaux;
if (baux == HIGH) {
auxstate = !auxstate;
digitalWrite(laux, auxstate);
}
}
}
}