-
Notifications
You must be signed in to change notification settings - Fork 0
Class Instantiation
Arnd edited this page Jan 31, 2021
·
1 revision
The smoothLED class instantiation has no parameters, the LED isn't initialized until the begin() method is called. One instance of the class is declared for each LED, as many as there are pins on the Arduino.
...
...
smoothLED Board; // Instantiate on-board LED
...
...
Serial.print(F("BOARD LED: "));
if (Board.begin(LED_BUILTIN)) // Start the "Board" instance on pin 13
Serial.println(F("OK"));
else
Serial.println(F("ERROR!"));
Board.set(128); // set to 50% duty cycle
...
...