Files

copied

Scanning the repository...

Last update 5 years 1 month by Charles Julian Knight
FilessequencerADS1110-ADC-read
..
ADS1110-ADC-read.ino
ADS1110-ADC-read.ino
#include "Wire.h" #define ads1110 0x48 uint16_t data; void setup() { Serial.begin(9600); Wire.begin(); // ADC default setup Wire.beginTransmission(ads1110); Wire.write(0x8C); Wire.endTransmission(); } void loop() { data = readADC(); Serial.print("Data >> "); // double d = data / 65535.0; Serial.println(data); delay(100); } uint16_t readADC(){ byte highbyte, lowbyte; Wire.requestFrom(ads1110, 3); while(Wire.available()) // ensure all the data comes in { highbyte = Wire.read(); // high byte * B11111111 lowbyte = Wire.read(); // low byte Wire.read(); //configRegister } return highbyte * 256 + lowbyte; }
Report a bug