ADC Library
MCP3424.h
- Committer:
- chrissnow
- Date:
- 2016-04-14
- Revision:
- 0:a6ef27377050
File content as of revision 0:a6ef27377050:
/* MCP3424 library version 1.2 Writed by B@tto Contact : batto@hotmail.fr MCP3424.h - ADC 18 bits i2c library for Wiring & Arduino Copyright (c) 2012 Yann LEFEBVRE. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MCP3424_H #define MCP3424_H #include "mbed.h" class MCP3424 { public: MCP3424(PinName SDA, PinName SCL, uint8_t adresse); ~MCP3424(); void Configuration(char channel,char resolution,bool mode,char PGA); void NewConversion(); bool IsConversionFinished(); long Measure(); private: I2C i2c; int _adresse; long _resultat; char _resolution; bool _mode; char _i; char _testvariable; char _cfgbyte; char _PGA; char _RequestedByte; char _Buffer[4]; }; #endif