Library for the serial LCD-09396 of Sparkfun
Fork of SerLCDv25 by
SertLCDv25.cpp
- Committer:
- beelin
- Date:
- 2011-08-10
- Revision:
- 0:497632f57657
- Child:
- 1:65590e1ed8ed
File content as of revision 0:497632f57657:
#include "mbed.h" #include "SerLCDv25.h" SerLCDv25::SerLCDv25(PinName rx, PinName tx) { device = new Serial(rx, tx); } void SerLCDv25::clear() { device->printf("%c%c",0xFE,0x01); } void SerLCDv25::cursorUnderline() { device->printf("%c%c",0xFE,0x0E); } void SerLCDv25::cursorBlinkingBox() { device->printf("%c%c",0xFE,0x0D); } void SerLCDv25::cursorClear() { device->printf("%c%c",0xFE,0x0C); } void SerLCDv25::displayON() { device->printf("%c%c",0xFE,0x0C); } void SerLCDv25::displayOFF() { device->printf("%c%c",0xFE,0x08); } void SerLCDv25::printf(char *string) { device->printf("%s",string); } void SerLCDv25::printValue(float *Value) { device->printf("%4.2f",*Value); } void SerLCDv25::putc(char lettre) { device->printf("%c",lettre); } void SerLCDv25::Brightness(int Value) { if (Value<0) { Value=0; } if (Value>100) { Value=100; } Value=Value*29/100+128; device->printf("%c%c",0x7C,Value); }