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

Dependencies:   DevInterfaces I2Cinterfaces MCP4725 mbed

Writer.h

Committer:
katrijnverhasselt
Date:
2016-05-18
Revision:
0:b40341017545

File content as of revision 0:b40341017545:

#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);
};