Releases: sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library
Releases · sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library
Version 1.0.6
This release:
- Version bump - using branch
main
- Corrects a comment in the code - thank you @dankamongmen #12
Version 1.0.5
This release:
- Updates the examples so they use 115200 baud
- Updates Example2 so the EEPROM storage will work correctly on ESP32
- Updates the type for
getReading
andzeroOffset
toint32_t
long
will work on most platforms butint32_t
is more correct
- Sets the default zeroOffset to zero and the default calibrationFactor to 1.0
- This prevents Not A Number divide-by-zero errors before calibration
- Adds a default LDO ramp delay of 250ms to give the LDO (AVDD) time to ramp to the correct voltage
- This can be changed if needed with
setLDORampDelay
- This can be changed if needed with
- Adds new methods to make it easier to access the NAU7802's 24-bit signed and 32-bit registers
- Adds
get24BitRegister
,set24BitRegister
,get32BitRegister
,set32BitRegister
- Adds helper methods
setChannel1Offset
,getChannel1Offset
,setChannel1Gain
,getChannel1Gain
to make it easy to read and change the Channel 1 offset and gain registers
- Adds
- Updates
calibrateAFE
so the calibration type can be definedcalibrateAFE(NAU7802_CALMOD_OFFSET)
will perform an external offset calibration
- Adds a timeout parameter for
calculateZeroOffset
,calculateCalibrationFactor
,getWeight
andgetAverage
- Previously this was hard coded to 1000ms and could result in divide-by-zero errors if the sample rate * number of samples exceeded this
- Adds Example7 which shows how to calibrate the scale using External calibration
- This sets the NAU7802's offset register to the measured (zero weight) value
- The NAU7802 then performs the offset subtraction instead of the library. Although, strictly, the library still does it too - but the library zeroOffset can be left as zero and
calculateZeroOffset
becomes unnecessary - This may provide better performance over the default Internal calibration
- The example also shows how to change the LDO voltage. 3.0V is a better choice for Qwiic systems. The default is 3.3V which means the LDO isn't actually regulating; AVDD sits at about 3.25V
- EEPROM works correctly on ESP32