Gets messages form the pc and translates it to I2C and back.

Dependencies:   DevInterfaces I2Cinterfaces MCP4725 mbed

Committer:
katrijnverhasselt
Date:
Wed May 18 11:35:45 2016 +0000
Revision:
1:8ba039abd9b8
Parent:
0:b40341017545
Fixed it!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
katrijnverhasselt 0:b40341017545 1 #pragma once
katrijnverhasselt 0:b40341017545 2
katrijnverhasselt 0:b40341017545 3 #include "mbed.h"
katrijnverhasselt 0:b40341017545 4 #include <string>
katrijnverhasselt 0:b40341017545 5 #include "Translator.h"
katrijnverhasselt 0:b40341017545 6
katrijnverhasselt 0:b40341017545 7 // Static class that will write messages to
katrijnverhasselt 0:b40341017545 8 class Writer {
katrijnverhasselt 0:b40341017545 9 private:
katrijnverhasselt 0:b40341017545 10 // Private constructor, no instance can be created
katrijnverhasselt 0:b40341017545 11 Writer();
katrijnverhasselt 0:b40341017545 12
katrijnverhasselt 0:b40341017545 13 public:
katrijnverhasselt 0:b40341017545 14 // Sends a message to the computer using the given info and used dacValue as DAC value
katrijnverhasselt 0:b40341017545 15 static bool Send(const Translator::MessageInfo msg, int dacValue);
katrijnverhasselt 0:b40341017545 16 // Sends an error message to the computer using the given info, also makes the LED red!
katrijnverhasselt 0:b40341017545 17 static bool SendError(const Translator::MessageInfo msg);
katrijnverhasselt 0:b40341017545 18 };