eBoard ①⑧⑨
Written for SIA 2017/2018
eagle_RB14Scan.h
Go to the documentation of this file.
1 #ifndef EAGLE_EBOARD_HELPLIB_RB14SCAN
2  #define EAGLE_EBOARD_HELPLIB_RB14SCAN
3 
12 //=====================================================================================================================================================
13 // RB14Scan
14 //=====================================================================================================================================================
15 
16  //-------------------------------------------------------------------------------------------------------------------------------------------------
17  // class
18  //-------------------------------------------------------------------------------------------------------------------------------------------------
19 
49  struct RB14Scan {
53  inline RB14Scan(void);
56  inline int raw(optVAL_t);
59  inline char channel(optVAL_t);
65  inline void write(const char* const val);
66  };
67 
69 
70  //-------------------------------------------------------------------------------------------------------------------------------------------------
71  // definitions
72  //-------------------------------------------------------------------------------------------------------------------------------------------------
73 
74  inline RB14Scan::RB14Scan(void) {}
75  inline int RB14Scan::raw(optVAL_t) {return isConnected();}
76  inline char RB14Scan::channel(optVAL_t) {return ((isConnected())?(readVal()):(-1));}
77  inline void RB14Scan::write(const char* const val) {writeVal(val);}
78 
80 #endif
char channel(optVAL_t)
will return the next char received by the module. A 64 byte Serial buffer is included! ...
RB14Scan(void)
The constructor.
char readVal(char oF='.')
[BLUETOOTH] reads a single value from bluetooth if available!
int raw(optVAL_t)
this will check for connection status [will return true if pin not connected]
bool isConnected(void)
[BLUETOOTH] this will check if the HC-05 is paired
[BLUETOOTH] This is the RB14Scan ghost struct :D
void write(const char *const val)
this will write a constant string to the output
void writeVal(const T &val)
[BLUETOOTH] writes Data to bluetooth
int optVAL_t
Definition: eBoard.h:137