AQM1602 library
Dependents: mbed_AQM1602 CatPot_Main_T_2v00 CatPot_2v10_T_Main CatPot_2v20_T_Main ... more
See https://developer.mbed.org/users/yasuyuki/notebook/AQM1602/
Diff: AQM1602.h
- Revision:
- 0:4c3df2da124c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AQM1602.h Fri Mar 06 12:51:41 2015 +0000 @@ -0,0 +1,42 @@ +//********************** +// AQM1602.h for mbed +// +// (C)Copyright 2015 All rights reserved by Y.Onodera +// http://einstlab.web.fc2.com +//********************** + +#ifndef AQM1602_H_ +#define AQM1602_H_ + +#define AQM1602_ADDR 0x7c +#define CMD 0x00 +#define DAT 0x40 + +#include "mbed.h" + +//class AQM1602: public Stream{ +class AQM1602{ +public: + AQM1602 (PinName sda, PinName scl); + AQM1602 (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 /* AQM1602_H_ */ +