dependent repository for sendFootSensorsPackets (The UDP packet repos)

Dependents:   sendFootSensorsPacketsFinalUDP

mcp3208.h

Committer:
mmellor
Date:
2016-07-01
Revision:
0:e44491917262

File content as of revision 0:e44491917262:

//
//
//
#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