Extension to serial communication. GetInput() method that takes string input from serial device. Work still in progress.
Diff: Bluetooth.h
- Revision:
- 0:31203426e0fb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Bluetooth.h Tue Sep 21 16:45:49 2021 +0000 @@ -0,0 +1,22 @@ +#ifndef BLUETOOTH_H +#define BLUETOOTH_H + +#include <string> +#include <cstdlib> +#include "mbed.h" + +class Bluetooth : public Serial{ + public: + Bluetooth(PinName tx, PinName rx); + float State(); + void Init(); + private: + bool state; + char GetKey(void); + void PutKey(char key); + void AskUser(string msgString); + float ReturnAnswer(float value); + string GetStringInput(void); +}; + +#endif \ No newline at end of file