Samson Danziger / Mbed 2 deprecated m3pi-pov

Dependencies:   m3pi mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers m3pi_pov.h Source File

m3pi_pov.h

00001 #ifndef M3PI_POV
00002 #define M3PI_POV
00003 
00004 #include "mbed.h"
00005 #include "m3pi.h"
00006 #include "rtos.h"
00007 
00008 class pov: public Stream {
00009     
00010 public:
00011 
00012     /** Create the pov object connected to default pins.
00013     * 
00014     */
00015     pov();
00016     
00017     /** Create the pov object connected to specific pins.
00018     * 
00019     *   @param l1 LED 1. Default is p13.
00020     *   @param l2 LED 2. Default is p14.
00021     *   @param l3 LED 3. Default is p15.
00022     *   @param l4 LED 4. Default is p16.
00023     *   @param l5 LED 5. Default is p17.
00024     *   @param l6 LED 6. Default is p18.
00025     *   @param l7 LED 7. Default is p19.
00026     *   @param l8 LED 8. Default is p20.
00027     */
00028     pov(PinName l1, PinName l2, PinName l3, PinName l4, PinName l5, PinName l6,
00029             PinName l7, PinName l8);
00030 
00031     /** Initialise the POV display. Default right spin.
00032      *
00033      */
00034     void init(void);
00035 
00036     /** Initialise the POV display. 
00037      *
00038      *  @param spin A negative number for a spin to the left, a positive 
00039      *              number or 0 for a spin to the right.
00040      */
00041     void init(int spin);
00042 
00043     /** Stop the POV display.
00044      *
00045      */
00046     void stop(void);
00047 
00048     /** Display a string on the POV display.
00049      *
00050      *  @param text Text to display.
00051      */
00052     void display(char* text);
00053 
00054 private:
00055 
00056     /** Get a the int array representation of a letter.
00057      *
00058      *  @param c The character to get the int array representation for.
00059      */
00060     char[] _get_char_arr(char c);
00061 
00062 };
00063 
00064 
00065 #endif //M3PI_POV