Gets messages form the pc and translates it to I2C and back.
Dependencies: DevInterfaces I2Cinterfaces MCP4725 mbed
Diff: Writer.h
- Revision:
- 0:b40341017545
diff -r 000000000000 -r b40341017545 Writer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Writer.h Wed May 18 11:22:41 2016 +0000 @@ -0,0 +1,18 @@ +#pragma once + +#include "mbed.h" +#include <string> +#include "Translator.h" + +// Static class that will write messages to +class Writer { +private: + // Private constructor, no instance can be created + Writer(); + +public: + // Sends a message to the computer using the given info and used dacValue as DAC value + static bool Send(const Translator::MessageInfo msg, int dacValue); + // Sends an error message to the computer using the given info, also makes the LED red! + static bool SendError(const Translator::MessageInfo msg); +}; \ No newline at end of file