I cant make it work ![]()
A friend helped me and the code is compiling without problem but it doesent work.
The button make no differense when i press it and the led in pin 7 is contant on.
int inPin = 2;Â Â Â Â
int inPinTwo = 3;Â
int inPinThree = 4;Â
int outPin = 5;Â Â Â
int outPinTwo = 6;Â Â
int outPinThree = 7;Â Â
int state = HIGH;
int reading;Â
int previous = LOW;
int stateTwo = HIGH;
int readingTwo;Â
int previousTwo = LOW;
int stateThree = HIGH;
int readingThree;Â
int previousThree = LOW;
long time = 0;Â Â Â Â
long debounce = 200;Â
void setup()
{
 pinMode(inPin, INPUT);
 pinMode(inPinTwo, INPUT);
 pinMode(inPinThree, INPUT);
 pinMode(outPin, OUTPUT);
 pinMode(outPinTwo, OUTPUT);
 pinMode(outPinThree, OUTPUT);
}
void loop()
{
 reading = digitalRead(inPin);
 readingTwo = digitalRead(inPinTwo);
 readingThree = digitalRead(inPinThree);
Â
 if (reading == HIGH && previous == LOW && millis() - time > debounce) {
  if (state == HIGH)
   state = LOW;
  else
   state = HIGH;
{Â
   if (readingTwo == HIGH && previousTwo == LOW && millis() - time > debounce) {
  if (stateTwo == HIGH)
   stateTwo = LOW;
  else
   stateTwo = HIGH;
   }
  Â
   {
   if (readingThree == HIGH && previousThree == LOW && millis() - time > debounce) {
  if (stateThree == HIGH)
   stateThree = LOW;
  else
   stateThree = HIGH;
  time = millis(); Â
 }
 digitalWrite(outPin, state);
 digitalWrite(outPinTwo, stateTwo);
 digitalWrite(outPinThree, stateThree);
 previous = reading;
  }
 }
}
}