Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
VFD.h
00001 /* 00002 * File: VfD/VFD.h 00003 * Author: William Jessup Salisbury 00004 * Company: Tufts Hybrid Racing Team 00005 * Copyright: CC BY-NC-SA 3.0 00006 * Date: 3/11/2012 00007 */ 00008 00009 #ifndef VFD_H 00010 #define VFD_H 00011 00012 #include "mbed.h" 00013 #include <string> 00014 00015 const PinName SDA = p28; 00016 const PinName SCL = p27; 00017 const int address = 0x50; 00018 00019 class VFD { 00020 public: 00021 VFD(); 00022 ~VFD(); 00023 void start(void); 00024 void stop(void); 00025 int send_byte(int byte); 00026 int read_byte(int ack); 00027 int init(); 00028 int print(const string msg); 00029 int autoScrollOn(); 00030 int autoScrollOff(); 00031 int lineWrapOn(); 00032 int lineWrapOff(); 00033 int setCursor(const int col, const int row); 00034 int clearScreen(); 00035 int goHome(); 00036 int initLargeNumbers(); 00037 int setBrightness(const int val); 00038 private: 00039 I2C _i2c; 00040 int write(const char * data, int length); 00041 int read(char * data, int length); 00042 }; 00043 00044 #endif
Generated on Wed Jul 27 2022 14:09:09 by
1.7.2