Dependencies:   mbed

main.cpp

Committer:
faruq
Date:
2010-09-01
Revision:
5:3f3006b4b29b
Parent:
4:804abcb28b86

File content as of revision 5:3f3006b4b29b:

#include "mbed.h"
#include "MAX7456.h"

MAX7456 vo (p5,p6,p7,p20,p19);
DigitalOut myled(LED1);
Serial pc(USBTX, USBRX); // tx, rx

int main() {

vo.format('P');
vo.setdarkness();
vo.initaddress();

vo.test();
vo.htrim('+',20);
vo.vtrim('-',4);

vo.cls();

/**
vo.locate(1,1);
vo.printf("Hello World");
wait(3.0);
vo.cls();
**/


int count = 0;
vo.invert(0);
for (int y = 0 ; y < 16 ; y++) {
     for (int x = 0 ; x < 30 ; x++) {
        vo.locate(x,y);
        count= count+1;
        vo.putc('1');
        wait(0.01);
        printf("/%d/",count);
        }
}
wait(1.5);
vo.invert(0);
vo.locate(1,0);
vo.putc('G');

vo.locate(1,1);
vo.putc('G');

vo.locate(1,2);
vo.putc('G');

vo.locate(1,3);
vo.putc('G');



/*
vo.locate(1,1);
vo.printf("good bye");
wait(2.0);
vo.locate(1,1);
vo.printf("error");
*/
}