/*
Brigitte Kock 
22/11/2017
Blinking a LED
 */
int LED = 8; //pinnumber of the LED = variable 
int LED2 = 4;
int LED3 = 3;
int wait = 1000; //milliseconds

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output. pinMode(pinnumber, IN or OUTPUT)
  pinMode(LED, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);  
}

// the loop function runs over and over again foreverint 
void loop() {
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED2, LOW);
  delay(wait);              // wait for a second
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(LED2, HIGH);
  delay(wait);              // wait for a second
  rise();
}

void rise() {
  for (int i=0; i <= 255; i++){
      analogWrite(LED3, i); // give a number between 0 and 255 to control the brightness, analogWrite only works for the ~ (PWM) pins
   }
}