dependent repository for sendFootSensorsPackets (The UDP packet repos)
Dependents: sendFootSensorsPacketsFinalUDP
Diff: mcp3208.h
- Revision:
- 0:e44491917262
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcp3208.h Fri Jul 01 18:53:27 2016 +0000 @@ -0,0 +1,22 @@ +// +// +// +#ifndef _MCP3208_H +#define _MCP3208_H + +#include <mbed.h> + +class MCP3208 { + protected: + SPI _spi; + DigitalOut _cs; + float _vref; + + public: + MCP3208(PinName mosi=p11, PinName miso=p12, PinName clk=p13, PinName cs=p14); + int binary(int ch); + float volt(int ch); + float vref(float v){return _vref=v;} +}; + +#endif //_MCP3208_H