LED Dot Matrix

A library to draw data onto an 8×8 dot matrix display. [insert pic here]

#include "mbed.h"
#include "LEDMatrix.h"
#define PI 3.1415926535897

//LEDMatrix Matrix(22,21,20,19,18,17,16,15,30,29,28,27,26,25,24,23);
LEDMatrix Matrix(13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28);
DigitalOut LED(LED1);
//Ticker reload;
int smiley[8][8] =
{   {0,0,0,0,0,0,0,0},
    {0,1,1,0,0,1,1,0},
    {0,1,1,0,0,1,1,0},
    {0,0,0,0,0,0,0,0},
    {0,1,0,0,0,0,1,0},
    {0,0,1,0,0,1,0,0},
    {0,0,0,1,1,0,0,0},
    {0,0,0,0,0,0,0,0}
};
int blink[8][8] =
{   {0,0,0,0,0,0,0,0},
    {0,1,1,0,0,1,1,0},
    {0,0,0,0,0,1,1,0},
    {0,0,0,0,0,0,0,0},
    {0,1,1,1,1,1,1,0},
    {0,0,1,0,0,1,0,0},
    {0,0,0,1,1,0,0,0},
    {0,0,0,0,0,0,0,0}
};
int main()
{
    Matrix.startDraw();
    while(1)
    {
        Matrix.setData(notok);
        wait(0.25);
        Matrix.setData(notok2);
        wait(0.25);
    }
}

LEDMatrixA class to use an 8x8 LED dot matrix display.
Functions
LEDMatrixCreate the LEDMatrix class, setting up the rows and cols BusOuts.
getPixelGets the value of a pixel.
setPixelSets a pixel on or off.
setRowSets the value of the pixels on a row.
setDataSets the value of the whole screen.
setScanModeSets the value of the whole screen.
startDrawStarts redrawing the screen
stopDrawStops redrawing the screen
class LEDMatrix
A class to use an 8x8 LED dot matrix display.
LEDMatrix(int r1,  
int r2,  
int r3,  
int r4,  
int r5,  
int r6,  
int r7,  
int r8,  
int c1,  
int c2,  
int c3,  
int c4,  
int c5,  
int c6,  
int c7,  
int c8,  
float refresh =  0.0002)
Create the LEDMatrix class, setting up the rows and cols BusOuts.
int getPixel(int x,
int y)
Gets the value of a pixel.
void setPixel(int x,  
int y,  
int on =  1)
Sets a pixel on or off.
void setRow(int row,
int data[])
Sets the value of the pixels on a row.
void setData(int data [][8])
Sets the value of the whole screen.
void setScanMode(int mode)
Sets the value of the whole screen.
void startDraw()
Starts redrawing the screen
void stopDraw()
Stops redrawing the screen