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/
AQM1602.h
- Committer:
- yasuyuki
- Date:
- 2015-03-06
- Revision:
- 0:4c3df2da124c
File content as of revision 0:4c3df2da124c:
//**********************
// 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_ */