Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "LedControl.h"
- LedControl lc=LedControl(12,11,10,1);
- unsigned long delaytime=100;
- void setup() {
- lc.shutdown(0,false);
- lc.setIntensity(0,8);
- lc.clearDisplay(0);
- pinMode(2, INPUT_PULLUP);
- attachInterrupt(digitalPinToInterrupt(2), pali, CHANGE);
- }
- int i=0, j=0;
- void loop() {
- }
- void pali() {
- lc.setLed(0,i,j,1);
- i++;
- if(i>8) {
- i=0;
- j++;
- if(j>8) {
- j=0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement