A simple wrapper for the Raw serial class to transmit double variables.

Dependents:   EquatorStrutDigitalMonitor

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LightWeightSerialTransmit.h Source File

LightWeightSerialTransmit.h

00001 #ifndef LIGHT_WEIGHT_SERIAL_TRANSMIT_H
00002 #define LIGHT_WEIGHT_SERIAL_TRANSMIT_H
00003 
00004 #include "mbed.h"
00005 #include "RawSerial.h"
00006 
00007 class LWSerialTX
00008 {
00009 public:
00010     LWSerialTX(int baudRate);
00011     
00012     enum Delimiters
00013     {
00014         Tab = 9,
00015         Comma = 44,
00016         Space = 32
00017     };
00018     
00019     void Transmit(double output);
00020     void Delimiter(Delimiters delimiter);
00021     void NewLine();
00022     void NewFile();
00023     
00024 private:
00025     RawSerial* SerialConnection;
00026 };
00027 
00028 #endif