Skip to content

Commit c6994d5

Browse files
committed
Small example changes
1 parent 276f3ba commit c6994d5

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

examples/Example3_Gain_SampleRate/Example3_Gain_SampleRate.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
SparkFun labored with love to create this code. Feel like supporting open
2020
source? Buy a board from SparkFun!
2121
https://www.sparkfun.com/products/15242
22+
23+
Hardware Connections:
24+
Plug a Qwiic cable into the Qwiic Scale and a RedBoard Qwiic
25+
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
26+
Open the serial monitor at 9600 baud to see the output
2227
*/
2328

2429
#include <Wire.h>
@@ -45,7 +50,7 @@ void setup()
4550

4651
myScale.setSampleRate(NAU7802_SPS_40); //Sample rate can be set to 10, 20, 40, 80, or 320Hz
4752

48-
myScale.calibrate(); //Does an internal calibration. Recommended after power up, gain changes, sample rate changes, or channel changes.
53+
myScale.calibrateAFE(); //Does an internal calibration. Recommended after power up, gain changes, sample rate changes, or channel changes.
4954
}
5055

5156
void loop()

examples/Example4_LowPower/Example4_LowPower.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
SparkFun labored with love to create this code. Feel like supporting open
1212
source? Buy a board from SparkFun!
1313
https://www.sparkfun.com/products/15242
14+
15+
Hardware Connections:
16+
Plug a Qwiic cable into the Qwiic Scale and a RedBoard Qwiic
17+
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
18+
Open the serial monitor at 9600 baud to see the output
1419
*/
1520

1621
#include <Wire.h>

examples/Example5_Interrupt/Example5_Interrupt.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
License: This code is public domain but you buy me a beer if you use this
66
and we meet someday (Beerware license).
77
8-
The interrupt pin indicates when a sample has been taken. The pin can be
9-
configured active high or active low.
8+
The interrupt pin indicates when a sample has been taken. This example shows
9+
how the INT pin can be configured active high or active low.
1010
1111
SparkFun labored with love to create this code. Feel like supporting open
1212
source? Buy a board from SparkFun!

examples/Example6_AdvancedI2C/Example6_AdvancedI2C.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ void setup()
2929
Serial.begin(9600);
3030
Serial.println("Qwiic Scale Example");
3131

32-
Wire1.begin(); //Doesn't compile on an Uno. This example is for other platforms that have multiple I2C ports.
33-
Wire1.setClock(400000);
32+
Wire1.begin(); //This line won't compile on an Uno. This example is for other platforms that have multiple I2C ports.
33+
Wire1.setClock(400000); //We can increase I2C clock speed to 400kHz, the NAU7802 supports it
3434

3535
if (myScale.begin(Wire1) == false) //Pass the Wire port to the library
3636
{

0 commit comments

Comments
 (0)