#include <LedControl.h> LedControl lclm=LedControl(4,6,5,1); int x = 0; void setup() { } void loop() { for (int count = 0; count < 7; count++) { lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setLed(0,x,x,true); delay(100); lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setLed(0,x,x,false); x = x + 1; } for (int count = 0; count < 7; count++) { lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setLed(0,x,x,true); delay(100); lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setLed(0,x,x,false); x = x - 1; } }
Открыть пример: Online ArduBlock
#include <LedControl.h> LedControl lclm=LedControl(4,6,5,1); void setup() { } void loop() { lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setRow(0,0,B00010000); lclm.setRow(0,1,B00011000); lclm.setRow(0,2,B00011100); lclm.setRow(0,3,B11111110); lclm.setRow(0,4,B11111110); lclm.setRow(0,5,B00011100); lclm.setRow(0,6,B00011000); lclm.setRow(0,7,B00010000); delay(500); lclm.setIntensity(0,15); lclm.shutdown(0,false); lclm.setRow(0,0,B00001000); lclm.setRow(0,1,B00001100); lclm.setRow(0,2,B00001110); lclm.setRow(0,3,B01111111); lclm.setRow(0,4,B01111111); lclm.setRow(0,5,B00001110); lclm.setRow(0,6,B00001100); lclm.setRow(0,7,B00001000); delay(500); }
Открыть пример: Online ArduBlock
Видеоурок: