Small project to display some OBD values from the Toyota GT86/ Subaru BRZ/ Scion FRS on an OLED display.
Dependencies: Adafruit_GFX MODSERIAL mbed-rtos mbed
Diff: display.h
- Revision:
- 6:506b703a8acf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/display.h Thu May 01 09:29:29 2014 +0000 @@ -0,0 +1,31 @@ +#ifndef DISPLAY_H +#define DISPLAY_H + +#include "mbed.h" + +#include "Adafruit_SSD1306.h" + +class Display +{ +public: + + Display(); + + void clear(); + + void display(); + + void sendTo(const char* text); + +private: + // an SPI sub-class that provides a constructed default format and frequency + class SPI2 : public SPI + { + public: + SPI2(PinName mosi, PinName miso, PinName clk); + }; + + SPI2 m_spi; + Adafruit_SSD1306 m_oled; +}; +#endif //DISPLAY_H \ No newline at end of file