サーボテスタ

Dependencies:   mbed

LPC1114FNを使ったサーボテスタです。ラジコン用サーボのニュートラル出しや調整に使うことができます。ラジコン用モータコントローラ(ESC)の調整に使うこともできます。

Committer:
takeuchi
Date:
Tue Mar 01 03:46:56 2016 +0000
Revision:
0:ab75773ee4f5
LPC????FN??????????????????????????????????????I2CLCD????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeuchi 0:ab75773ee4f5 1
takeuchi 0:ab75773ee4f5 2 #ifndef MBED_I2CLCD_H
takeuchi 0:ab75773ee4f5 3 #define MBED_I2CLCD_H
takeuchi 0:ab75773ee4f5 4
takeuchi 0:ab75773ee4f5 5 #include "mbed.h"
takeuchi 0:ab75773ee4f5 6
takeuchi 0:ab75773ee4f5 7 class I2cLCD : public Stream {
takeuchi 0:ab75773ee4f5 8 public:
takeuchi 0:ab75773ee4f5 9
takeuchi 0:ab75773ee4f5 10 enum IconType {
takeuchi 0:ab75773ee4f5 11 Mark = 0x0001,
takeuchi 0:ab75773ee4f5 12 Battery_1 = 0x0004,
takeuchi 0:ab75773ee4f5 13 Battery_2 = 0x0002,
takeuchi 0:ab75773ee4f5 14 Battery_3 = 0x0010,
takeuchi 0:ab75773ee4f5 15 Battery_4 = 0x0008,
takeuchi 0:ab75773ee4f5 16 NoSound = 0x0020,
takeuchi 0:ab75773ee4f5 17 Lock = 0x0040,
takeuchi 0:ab75773ee4f5 18 ArrowDown = 0x0080,
takeuchi 0:ab75773ee4f5 19 ArrowUp = 0x0100,
takeuchi 0:ab75773ee4f5 20 Input = 0x0200,
takeuchi 0:ab75773ee4f5 21 Alarm = 0x0400,
takeuchi 0:ab75773ee4f5 22 Tell = 0x0800,
takeuchi 0:ab75773ee4f5 23 Antenna = 0x1000,
takeuchi 0:ab75773ee4f5 24 };
takeuchi 0:ab75773ee4f5 25
takeuchi 0:ab75773ee4f5 26 I2cLCD(PinName sda, PinName scl, PinName rp);
takeuchi 0:ab75773ee4f5 27 #if DOXYGEN_ONLY
takeuchi 0:ab75773ee4f5 28 int putc(int c);
takeuchi 0:ab75773ee4f5 29 int printf(const char* format, ...);
takeuchi 0:ab75773ee4f5 30 #endif
takeuchi 0:ab75773ee4f5 31 void locate(int column, int row);
takeuchi 0:ab75773ee4f5 32 void cls();
takeuchi 0:ab75773ee4f5 33 int rows();
takeuchi 0:ab75773ee4f5 34 int columns();
takeuchi 0:ab75773ee4f5 35 void seticon(IconType type);
takeuchi 0:ab75773ee4f5 36 void clearicon(IconType type);
takeuchi 0:ab75773ee4f5 37 void puticon(int flg);
takeuchi 0:ab75773ee4f5 38
takeuchi 0:ab75773ee4f5 39 protected:
takeuchi 0:ab75773ee4f5 40 virtual int _putc(int value);
takeuchi 0:ab75773ee4f5 41 virtual int _getc();
takeuchi 0:ab75773ee4f5 42
takeuchi 0:ab75773ee4f5 43 int address(int column, int row);
takeuchi 0:ab75773ee4f5 44 void character(int column, int row, int c);
takeuchi 0:ab75773ee4f5 45 void writeCommand( int cmd );
takeuchi 0:ab75773ee4f5 46 void writeData( int data );
takeuchi 0:ab75773ee4f5 47
takeuchi 0:ab75773ee4f5 48 DigitalOut _rs;
takeuchi 0:ab75773ee4f5 49 I2C _i2c;
takeuchi 0:ab75773ee4f5 50 int _column;
takeuchi 0:ab75773ee4f5 51 int _row;
takeuchi 0:ab75773ee4f5 52
takeuchi 0:ab75773ee4f5 53 char contrast;
takeuchi 0:ab75773ee4f5 54 int icon;
takeuchi 0:ab75773ee4f5 55
takeuchi 0:ab75773ee4f5 56 };
takeuchi 0:ab75773ee4f5 57
takeuchi 0:ab75773ee4f5 58 #endif