6 x 7 segment display library for PCA9637 driven breakout board
Dependents: FTSE100 InternetDispBoB digitalThermometer Counter ... more
dispBoB.h
- Committer:
- d_worrall
- Date:
- 2011-06-29
- Revision:
- 0:843654413849
- Child:
- 1:d3d2fb119fa3
File content as of revision 0:843654413849:
//NXP PCA9635 library //mbed Team - 28th June 2011 //Daniel Worrall #ifndef MBED_DISPBOB_H #define MBED_DISPBOB_H #include "mbed.h" #include "string" #include "PCA9635.h" #include "ctype.h" class dispBoB { public: //constructor dispBoB(PinName sda, PinName scl, PinName en); //output control /** Clear screen * */ void cls(void); /** Set cursor position * * @param pos display location left to right (0-5) */ void locate(char pos); /** Put an ASCII encoded character onto display at current location * * @param c ASCII encoded character or number (no punctuation) */ void putc(char c); /** Put an ASCII encoded character onto display at specified location * * @param c ASCII encoded character or number * @param pos display location lef to right (0-5) */ void putc(char c, char pos); /** Write a string to the display * * @param str String to be displayed */ void write(string str); /** Write a scrolling string (right to left) to display (no punctuation) * * @param str String to be displayed * @param speed duration of each frame (seconds) */ void scroll(string str, float speed); private: PCA9635 _pca; DigitalOut _en; char _cursor; }; #endif