Dependencies:   mbed

main.cpp

Committer:
chris
Date:
2010-11-10
Revision:
2:6028d4d81668
Parent:
1:53d19dcd6c2e

File content as of revision 2:6028d4d81668:

#include "mbed.h"
#include "m3pi.h"

m3pi m3pi(p23,p9,p10);

char pov[30] = {

    0x7f,0x08,0x08,0x08,0x7f,0x0,   // H
    0x7f,0x49,0x49,0x41,0x41,0x0,   // E
    0x00,0x7f,0x01,0x01,0x01,0x0,   // L
    0x00,0x7f,0x01,0x01,0x01,0x0,   // L
    0x3e,0x41,0x41,0x41,0x3e,0x0,   // O

};


int main() {

    m3pi.locate(0,1);
    m3pi.printf("m3pi PoV");
    
    wait(2.0);

    m3pi.right(1.0); // spin full speed right!

    while (1) {

        for (int i=0;i<30;i++) {
            m3pi.leds(pov[i]);
            wait(0.005);
        }


        wait (0.1);
    }
}