/* FabAcademy 2023 -Emma Pareschi In this skect the brithness of the led goes from 0 to the max intensity. With this sketch you learn about analogWrite and 'for loop' */ int led_pin = 3; //define variable for the led pin // the setup routine runs once when you press reset: void setup() { // declare pin 9 to be an output: pinMode(led_pin, OUTPUT); //set the led_pin as output Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { for (int i = 0; i <= 255; i++) { analogWrite(led_pin, i); delay(10); Serial.println(i); } }