AQM0802 library

Dependents:   mbed_EEPROM mbed_UV mbed_DEMO mbed_LPS25H ... more

See https://mbed.org/users/yasuyuki/notebook/AQM0802/

Revision:
0:6fa303916aa8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AQM0802.h	Tue Jun 24 08:40:21 2014 +0000
@@ -0,0 +1,42 @@
+//**********************
+// AQM0802.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef AQM0802_H_
+#define AQM0802_H_
+
+#define AQM0802_ADDR    0x7c
+#define CMD 0x00
+#define DAT 0x40
+
+#include "mbed.h"
+
+//class AQM0802: public Stream{
+class AQM0802{
+public:
+    AQM0802 (PinName sda, PinName scl);
+    AQM0802 (I2C& p_i2c);
+    void init();
+
+    void put(unsigned char a, unsigned char b);
+    void get(unsigned char a);
+    void cls();
+    void locate (int x, int y);
+    void print (const char* a);
+
+protected:
+    
+    I2C _i2c;
+//    virtual int _putc(int value);
+//    virtual int _getc();
+
+    char buf[2];
+
+};
+
+
+#endif /* AQM0802_H_ */
+