// Sofie Johanna Madsen int led = 10; // Use pin number 13 int - TopicsExpress



          

// Sofie Johanna Madsen int led = 10; // Use pin number 13 int brightness = 0; // Sets brightness to 0 int fadeAmount = 1;// Sets the fadeAmount to 1 void setup() { // This function is called when the sketch runs. Like the main function in C++ pinMode(led, OUTPUT); // Configures the digital pin to behave as an output Serial.begin(9600); // Sets the baud to 9600 for serial data transmission } void loop() { // Makes the program run again and again forever analogWrite(led, brightness); // The led is set to 0 in brightness brightness = brightness + fadeAmount; // Sets the brightness to be brightness + 1 delay(30); //Puts a delay on the development if (brightness == 1) { Serial.println(The LED is at its lowest brightness); // Prints the sentence to the serial port } if (brightness == 255) { Serial.println(The LED is at its highest brightness); // Prints the sentence to the serial port } } Sorry to be a pain in the ass - but can anyone see why it is not working in the serial port?
Posted on: Fri, 07 Mar 2014 09:24:53 +0000

Trending Topics



Recently Viewed Topics




© 2015