Generic communication interface between the wireless board (mote) and the sensor board. Any kind of sensor board can be connected to the mote using this specification given it provides a SPI peripheral, one input pin with interrupt capability and one digital output. The sensor board must implement a special register set from which all required information can be retrieved. Protocol: http://is.gd/wuQorh Github: http://is.gd/ySj1L9

Dependencies:   mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SLCD.h Source File

SLCD.h

00001 #include "mbed.h"
00002 
00003 
00004 /*  ------ sample usage------
00005 
00006     #include "mbed.h"
00007     #include "SLCD.h"
00008     
00009     SLCD slcd;
00010     
00011     main()
00012     {
00013         slcd.printf("1234");    // standard printf function, only charaters in ASCII_TO_WF_CODIFICATION_TABLE will display
00014         slcd.putc("A");         // prints a single character 
00015         slcd.Write_Char('A');   // prints a single character
00016         slcd.All_Segments(y);   // y=1 for ALL segments on, 0 for ALL segments off  
00017         slcd.DPx(y);            // x=DP1 to DP3, y=1 for on 0 for off
00018         slcd.Colon(y);          // y=1 for on, 0 for off
00019         slcd.CharPosition=x;    // x=0 to 3, 0 is start position
00020         slcd.Home();            // sets next charater to posistion 0 (start)
00021         slcd.Contrast (x);      // set contrast x=0 - 15, 0 lightest, 15 darkest    
00022     }   
00023 */
00024 
00025 class SLCD : public Stream {
00026     public:
00027     SLCD();
00028     
00029     void init();
00030     void Write_Char(char lbValue);
00031     void Home (void);
00032     void Contrast (uint8_t lbContrast);
00033     void All_Segments (int);     
00034     void DP1 (int);
00035     void DP2 (int);
00036     void DP3 (int);
00037     void Colon (int);     
00038     uint8_t CharPosition;
00039          
00040     virtual int _putc(int c);
00041     virtual int _getc() {
00042         return 0;
00043     }  
00044 };