I’m just starting to understand the hardware and setup so that I can properly calibrate the voltage and CT sensors and update the firmware; I have EmonPi and 2 EmonTx V3’s in my working monitoring system. I have researched and read around this topic and bought a EmonTx shield, AC voltage sensor, CT sensor and USB to serial UART programmer to sandbox with the calibration and uploading firmware processes before I carry it out to the EmonTx V3 and EmonPi.
I am using Mac OSX, I have loaded Arduino IDE and CP210x USB to UART Bridge VCP Drivers for Macintosh OSX, all fine and well i.e. I can see serial ports “dev/cu.SLAB_USBtoUART” (blue light is solid) and “dev/cu.usbmodem1431 (Arduino/Genuino Uno)” when connecting to Arduino Uno directly using usb.
The problem I’m having is when I upload this basic script:
// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3
#include “EmonLib.h” // Include Emon Library
EnergyMonitor emon1; // Create an instance
emon1.voltage(0, 260, 1.7); // Voltage: input pin, calibration, phase_shift
emon1.current(1, 111.1); // Current: input pin, calibration.
emon1.calcVI(20,2000); // Calculate all. No.of half wavelengths (crossings), time-out
emon1.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)
float realPower = emon1.realPower; //extract Real Power into variable
float apparentPower = emon1.apparentPower; //extract Apparent Power into variable
float powerFActor = emon1.powerFactor; //extract Power Factor into Variable
float supplyVoltage = emon1.Vrms; //extract Vrms into Variable
float Irms = emon1.Irms; //extract Irms into Variable
It compiles, uploads and I can see data updated every 2 seconds via the serial monitor in Arduino IDE with the direct usb connection to the Arduino Uno, fine. Nevertheless, when I restart Arduino IDE with the “dev/cu.SLAB_USBtoUART” connection it will not upload and get an error message (see attached screenshot)
What crucial process/es have I missed out or what am I doing that is blatantly wrong (can’t see the wood for the trees moment)?