Temperature Data Logger or Display. Program uses the EA LPCXpresso Board's on-board temp sensor and SD card to constantly monitor the temperature. Optionally, the temp can be displayed on the EA OLED display.

Dependencies:   mbed SDFileSystem

Committer:
tyger23
Date:
Wed Jun 16 16:08:29 2010 +0000
Revision:
1:37f2341e763b
Parent:
0:e05fd3c9c4b3

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tyger23 0:e05fd3c9c4b3 1 /* mbed TextDisplay Library Base Class
tyger23 0:e05fd3c9c4b3 2 * Copyright (c) 2007-2009 sford
tyger23 0:e05fd3c9c4b3 3 * Released under the MIT License: http://mbed.org/license/mit
tyger23 0:e05fd3c9c4b3 4 *
tyger23 0:e05fd3c9c4b3 5 * A common base class for Text displays
tyger23 0:e05fd3c9c4b3 6 * To port a new display, derive from this class and implement
tyger23 0:e05fd3c9c4b3 7 * the constructor (setup the display), character (put a character
tyger23 0:e05fd3c9c4b3 8 * at a location), rows and columns (number of rows/cols) functions.
tyger23 0:e05fd3c9c4b3 9 * Everything else (locate, printf, putc, cls) will come for free
tyger23 0:e05fd3c9c4b3 10 *
tyger23 0:e05fd3c9c4b3 11 * The model is the display will wrap at the right and bottom, so you can
tyger23 0:e05fd3c9c4b3 12 * keep writing and will always get valid characters. The location is
tyger23 0:e05fd3c9c4b3 13 * maintained internally to the class to make this easy
tyger23 0:e05fd3c9c4b3 14 */
tyger23 0:e05fd3c9c4b3 15
tyger23 0:e05fd3c9c4b3 16 #ifndef MBED_TEXTDISPLAY_H
tyger23 0:e05fd3c9c4b3 17 #define MBED_TEXTDISPLAY_H
tyger23 0:e05fd3c9c4b3 18
tyger23 0:e05fd3c9c4b3 19 #include "mbed.h"
tyger23 0:e05fd3c9c4b3 20
tyger23 0:e05fd3c9c4b3 21 class TextDisplay : public Stream {
tyger23 0:e05fd3c9c4b3 22 public:
tyger23 0:e05fd3c9c4b3 23
tyger23 0:e05fd3c9c4b3 24 // functions needing implementation in derived implementation class
tyger23 0:e05fd3c9c4b3 25 TextDisplay();
tyger23 0:e05fd3c9c4b3 26 virtual void character(int column, int row, int c) = 0;
tyger23 0:e05fd3c9c4b3 27 virtual int rows() = 0;
tyger23 0:e05fd3c9c4b3 28 virtual int columns() = 0;
tyger23 0:e05fd3c9c4b3 29
tyger23 0:e05fd3c9c4b3 30 // functions that come for free, but can be overwritten
tyger23 0:e05fd3c9c4b3 31 virtual void cls();
tyger23 0:e05fd3c9c4b3 32 virtual void locate(int column, int row);
tyger23 0:e05fd3c9c4b3 33 virtual void foreground(int colour);
tyger23 0:e05fd3c9c4b3 34 virtual void background(int colour);
tyger23 0:e05fd3c9c4b3 35 // putc (from Stream)
tyger23 0:e05fd3c9c4b3 36 // printf (from Stream)
tyger23 0:e05fd3c9c4b3 37
tyger23 0:e05fd3c9c4b3 38 protected:
tyger23 0:e05fd3c9c4b3 39
tyger23 0:e05fd3c9c4b3 40 virtual int _putc(int value);
tyger23 0:e05fd3c9c4b3 41 virtual int _getc();
tyger23 0:e05fd3c9c4b3 42
tyger23 0:e05fd3c9c4b3 43 // character location
tyger23 0:e05fd3c9c4b3 44 short _column;
tyger23 0:e05fd3c9c4b3 45 short _row;
tyger23 0:e05fd3c9c4b3 46
tyger23 0:e05fd3c9c4b3 47 // colours
tyger23 0:e05fd3c9c4b3 48 int _foreground;
tyger23 0:e05fd3c9c4b3 49 int _background;
tyger23 0:e05fd3c9c4b3 50 };
tyger23 0:e05fd3c9c4b3 51
tyger23 0:e05fd3c9c4b3 52 #endif