mit
CurrentSense.h
- Committer:
- coldplay
- Date:
- 2018-12-24
- Revision:
- 5:e90c8b57811c
- Parent:
- 4:5ae9f8b3a16f
File content as of revision 5:e90c8b57811c:
#include "mbed.h" #ifndef CURRENT_SENSE_H #define CURRENT_SENSE_H // 3.3V max ADC reading / 0.140V/A from the current amp #define ADC_TO_CURRENT_SCALE (3.3/.140) class CurrentSense { public: CurrentSense(PinName current_pin); float get_current(void); private: AnalogIn current_pin_; }; #endif