Austin Buchan / ServoController

Dependencies:   QEI mbed-src

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CurrentSense.h Source File

CurrentSense.h

00001 #include "mbed.h"
00002 
00003 #ifndef CURRENT_SENSE_H
00004 #define CURRENT_SENSE_H
00005 
00006 // 3.3V max ADC reading / 0.525V/A from the current amp
00007 #define ADC_TO_CURRENT_SCALE (3.3/.525)
00008 
00009 class CurrentSense {
00010     public:
00011         CurrentSense(PinName current_pin);
00012         
00013         float get_current(void);
00014     
00015     private:
00016         AnalogIn current_pin_;
00017 };
00018 
00019 #endif