AQM0802 library

Dependents:   mbed_EEPROM mbed_UV mbed_DEMO mbed_LPS25H ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AQM0802.h Source File

AQM0802.h

00001 //**********************
00002 // AQM0802.h for mbed
00003 //
00004 // (C)Copyright 2014 All rights reserved by Y.Onodera
00005 // http://einstlab.web.fc2.com
00006 //**********************
00007 
00008 #ifndef AQM0802_H_
00009 #define AQM0802_H_
00010 
00011 #define AQM0802_ADDR    0x7c
00012 #define CMD 0x00
00013 #define DAT 0x40
00014 
00015 #include "mbed.h"
00016 
00017 //class AQM0802: public Stream{
00018 class AQM0802{
00019 public:
00020     AQM0802 (PinName sda, PinName scl);
00021     AQM0802 (I2C& p_i2c);
00022     void init();
00023 
00024     void put(unsigned char a, unsigned char b);
00025     void get(unsigned char a);
00026     void cls();
00027     void locate (int x, int y);
00028     void print (const char* a);
00029 
00030 protected:
00031     
00032     I2C _i2c;
00033 //    virtual int _putc(int value);
00034 //    virtual int _getc();
00035 
00036     char buf[2];
00037 
00038 };
00039 
00040 
00041 #endif /* AQM0802_H_ */
00042