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:
Tue Jun 15 20:21:07 2010 +0000
Revision:
0:e05fd3c9c4b3

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tyger23 0:e05fd3c9c4b3 1 /* mbed Embedded Artists OLED library, as found on the LPCXpresso Baseboard
tyger23 0:e05fd3c9c4b3 2 * Copyright (c) 2010, sford
tyger23 0:e05fd3c9c4b3 3 *
tyger23 0:e05fd3c9c4b3 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
tyger23 0:e05fd3c9c4b3 5 * of this software and associated documentation files (the "Software"), to deal
tyger23 0:e05fd3c9c4b3 6 * in the Software without restriction, including without limitation the rights
tyger23 0:e05fd3c9c4b3 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
tyger23 0:e05fd3c9c4b3 8 * copies of the Software, and to permit persons to whom the Software is
tyger23 0:e05fd3c9c4b3 9 * furnished to do so, subject to the following conditions:
tyger23 0:e05fd3c9c4b3 10 *
tyger23 0:e05fd3c9c4b3 11 * The above copyright notice and this permission notice shall be included in
tyger23 0:e05fd3c9c4b3 12 * all copies or substantial portions of the Software.
tyger23 0:e05fd3c9c4b3 13 *
tyger23 0:e05fd3c9c4b3 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
tyger23 0:e05fd3c9c4b3 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
tyger23 0:e05fd3c9c4b3 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
tyger23 0:e05fd3c9c4b3 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
tyger23 0:e05fd3c9c4b3 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
tyger23 0:e05fd3c9c4b3 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
tyger23 0:e05fd3c9c4b3 20 * THE SOFTWARE.
tyger23 0:e05fd3c9c4b3 21 */
tyger23 0:e05fd3c9c4b3 22
tyger23 0:e05fd3c9c4b3 23 #ifndef MBED_EAOLED_H
tyger23 0:e05fd3c9c4b3 24 #define MBED_EAOLED_H
tyger23 0:e05fd3c9c4b3 25
tyger23 0:e05fd3c9c4b3 26 #include "mbed.h"
tyger23 0:e05fd3c9c4b3 27 #include "GraphicsDisplay.h"
tyger23 0:e05fd3c9c4b3 28
tyger23 0:e05fd3c9c4b3 29 class EAOLED : public GraphicsDisplay {
tyger23 0:e05fd3c9c4b3 30 public:
tyger23 0:e05fd3c9c4b3 31 EAOLED(PinName mosi, PinName dnc, PinName sclk, PinName cs, PinName power);
tyger23 0:e05fd3c9c4b3 32 virtual void pixel(int x, int y, int colour);
tyger23 0:e05fd3c9c4b3 33 // virtual void cls();
tyger23 0:e05fd3c9c4b3 34 virtual int width() { return 96; }
tyger23 0:e05fd3c9c4b3 35 virtual int height() { return 64; }
tyger23 0:e05fd3c9c4b3 36
tyger23 0:e05fd3c9c4b3 37 void reset();
tyger23 0:e05fd3c9c4b3 38 void data(int value);
tyger23 0:e05fd3c9c4b3 39 void command(int value);
tyger23 0:e05fd3c9c4b3 40
tyger23 0:e05fd3c9c4b3 41 SPI _spi;
tyger23 0:e05fd3c9c4b3 42 DigitalOut _data;
tyger23 0:e05fd3c9c4b3 43 DigitalOut _cs;
tyger23 0:e05fd3c9c4b3 44 DigitalOut _power;
tyger23 0:e05fd3c9c4b3 45
tyger23 0:e05fd3c9c4b3 46 uint8_t framebuffer[(96 * 64) / 8];
tyger23 0:e05fd3c9c4b3 47 };
tyger23 0:e05fd3c9c4b3 48
tyger23 0:e05fd3c9c4b3 49 #endif