|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
-
- #include <LedDisplay.h>
-
-
-
- #define dataPin 6
- #define registerSelect 7
- #define clockPin 8
- #define enable 9
- #define reset 10
-
- #define displayLength 8
-
-
- LedDisplay myDisplay = LedDisplay(dataPin, registerSelect, clockPin,
- enable, reset, displayLength);
-
- int brightness = 15;
-
- void setup() {
- Serial.begin(9600);
-
-
- myDisplay.begin();
- }
-
- void loop() {
-
- for (int brightness = 0; brightness < 16; brightness++) {
-
- myDisplay.setBrightness(brightness);
-
- myDisplay.setCursor(1);
-
- myDisplay.print("Fading");
- delay(50);
- }
- delay(100);
-
- for (int brightness = 15; brightness >= 0; brightness--) {
-
- myDisplay.setBrightness(brightness);
-
- myDisplay.setCursor(1);
-
- myDisplay.print("Fading");
- delay(50);
- }
-
- delay(300);
- }
|