Skip to content

Commit

Permalink
1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
olkal committed Sep 22, 2020
1 parent d2b0259 commit dff0de8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# 18.04.2020: New version 1.2.0!
Latest release and change log here: https://github.com/olkal/HX711_ADC/releases

This an Arduino library for the HX711 24-bit ADC for weight scales.
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=HX711_ADC
version=1.2.1
version=1.2.2
author=Olav Kallhovd
maintainer=Olav Kallhovd
sentence=Library for the HX711 24-bit ADC for weight scales.
Expand Down
4 changes: 2 additions & 2 deletions src/HX711_ADC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ uint8_t HX711_ADC::conversion24bit() //read 24 bit data, store in dataset and s
if(SCK_DELAY) delayMicroseconds(1); // could be required for faster mcu's, set value in config.h
digitalWrite(sckPin, 1);
if(SCK_DELAY) delayMicroseconds(1); // could be required for faster mcu's, set value in config.h
digitalWrite(sckPin, 0);
if (i < (24))
{
dout = digitalRead(doutPin);
Expand All @@ -302,15 +303,14 @@ uint8_t HX711_ADC::conversion24bit() //read 24 bit data, store in dataset and s
data++;
}
}
digitalWrite(sckPin, 0);
}
if(SCK_DISABLE_INTERRUPTS) interrupts();
//convert range from 0x800000 > 0x7FFFFF to 0x000000 > 0xFFFFFF:
data = data ^ 0x800000; // if the 24th bit is '1', change 24th bit to 0
if ((data < 0x000000) || (data > 0xFFFFFF))
{
dataOutOfRange = 1;
Serial.println("dataOutOfRange");
//Serial.println("dataOutOfRange");
}
if (readIndex == samplesInUse + IGN_HIGH_SAMPLE + IGN_LOW_SAMPLE - 1)
{
Expand Down

0 comments on commit dff0de8

Please sign in to comment.