// Micro Robotics
// Example - Plot Single Dots
//
#include "LedControl.h"
#include "binary.h"
#define DIN 3
#define CS 4
#define CLK 5
#define DEV 1 //No of Devices
int x = 0;
int y = 0;
LedControl lc=LedControl(DIN,CLK,CS,DEV);
void setup() {
lc.shutdown(0,false);
lc.setIntensity(0,8); // Set the brightness (0-15)
lc.clearDisplay(0);
Serial.begin(9600);
}
void loop() {
print_status();
lc.setLed(0,y,x,true); //void setLed(int addr, int row, int col, boolean state);
delay(100);
x++;
if (x == 8)
{
y++;
x = 0;
}
if (y == 8)
{
y = 0;
x = 0;
lc.clearDisplay(0);
}
}
void print_status()
{
Serial.print("x=");Serial.print(x);
Serial.print(" ");
Serial.print("y=");Serial.println(y);
}