const int blauw = A0;
const int rood = A2;
const int groen = A1;

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16,2);

bool LED_BURN = false; 


int schakelstand =0;

void setup() {
  // put your setup code here, to run once:
pinMode (blauw, OUTPUT);
pinMode (rood, OUTPUT);
pinMode (groen, OUTPUT);
 pinMode (2, INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
schakelstand = digitalRead (2);

if (LED_BURN == false) {

off () ;
}


if (schakelstand == HIGH) {
delay (500);
LED_BURN = !LED_BURN ;
}


if (LED_BURN == true ){
on ();
}


}

void on (){


analogWrite (blauw, 237);
analogWrite (rood,0);
analogWrite (groen,0);
}

void off (){

  analogWrite (blauw, 0);
analogWrite (rood,0);
analogWrite (groen,0);
}
