Hello All,
My system hardware: Win11 PC, SF MicroMod data logging carrier (DEV-16829), MicroMod Artemis Processor, (DEV-16401), Qwiic Scale (SEN-15242), Rice Lake Weighing Systems ‘S’ style load cell (RL20000B-250)’
Software: Win 11, Arduino IDE, SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.
startup code: SparkFun labored with love to create this code. Feel like supporting open
source? Buy a board from SparkFun!
https://www.sparkfun.com/products/15242
Hardware Connections:
Plug a Qwiic cable into the Qwiic Scale and a RedBoard Qwiic
If you don’t have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
Open the serial monitor at 9600 baud to see the output
*/
#include <Wire.h>
#include <EEPROM.h> //Needed to record user settings
#include “SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h” // Click here to get the library: http://librarymanager/All#SparkFun_NAU8702
NAU7802 myScale; //Create instance of the NAU7802 class
//EEPROM locations to store 4-byte variables
#define LOCATION_CALIBRATION_FACTOR 0 //Float, requires 4 bytes of EEPROM
#define LOCATION_ZERO_OFFSET 10 //Must be more than 4 away from previous spot. Long, requires 4 bytes of EEPROM
bool settingsDetected = false; //Used to prompt user to calibrate their scale
//Create an array to take average of weights. This helps smooth out jitter.
#define AVG_SIZE 4
float avgWeights[AVG_SIZE];
byte avgWeightSpot = 0;
void setup() {
Serial.begin(9600);
Serial.println(“Qwiic Scale Example”);
Error message from Arduino Serial Monitor:
“Port monitor error: command ‘open’ failed: Invalid serial port. Could not connect to COM3 serial port.”
Additional Info: The Device Manager on my PC showed just two serial ports, COM1 and COM3. I tried several different baud rates on each port and always get the same error message.
Thanks for looking, Mick