Chris Styles / Mbed 2 deprecated m3pi_POV

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "m3pi.h"
00003 
00004 m3pi m3pi(p23,p9,p10);
00005 
00006 char pov[30] = {
00007 
00008     0x7f,0x08,0x08,0x08,0x7f,0x0,   // H
00009     0x7f,0x49,0x49,0x41,0x41,0x0,   // E
00010     0x00,0x7f,0x01,0x01,0x01,0x0,   // L
00011     0x00,0x7f,0x01,0x01,0x01,0x0,   // L
00012     0x3e,0x41,0x41,0x41,0x3e,0x0,   // O
00013 
00014 };
00015 
00016 
00017 int main() {
00018 
00019     m3pi.locate(0,1);
00020     m3pi.printf("m3pi PoV");
00021     
00022     wait(2.0);
00023 
00024     m3pi.right(1.0); // spin full speed right!
00025 
00026     while (1) {
00027 
00028         for (int i=0;i<30;i++) {
00029             m3pi.leds(pov[i]);
00030             wait(0.005);
00031         }
00032 
00033 
00034         wait (0.1);
00035     }
00036 }