Code to read the VE.Direct-Protocol from serial into a value array. Uses a non-blocking read loop and does checksum verification before adding the data.
I have a 75/10 that is apparently running a newer firmware and is sending 18 variables now. I was able to pull the data down on my Mac using a FTDI cable. Pretty sure my voltage divider is working (verified with voltmeter). I updated the config.h to include the changes, but while I get keywords printed out on the serial monitor, there are no values being shown.
Ideas?
output from FTDI
PID 0xA054 FW 159 SER# HQ21052GGUP V 13130 I 0 VPV 10 PPV 0 CS 0 MPPT 0 OR 0x00000001 ERR 0 LOAD ON IL 0 H19 0 H20 0 H21 0 H22 0 H23 0 HSDS 0 Checksum G
I have a 75/10 that is apparently running a newer firmware and is sending 18 variables now. I was able to pull the data down on my Mac using a FTDI cable. Pretty sure my voltage divider is working (verified with voltmeter). I updated the config.h to include the changes, but while I get keywords printed out on the serial monitor, there are no values being shown.
Ideas?
output from FTDI
PID 0xA054 FW 159 SER# HQ21052GGUP V 13130 I 0 VPV 10 PPV 0 CS 0 MPPT 0 OR 0x00000001 ERR 0 LOAD ON IL 0 H19 0 H20 0 H21 0 H22 0 H23 0 HSDS 0 Checksum G
updated config.h
`#ifdef MPPT_75_10
const byte buffsize = 32; const byte value_bytes = 33; const byte label_bytes = 9; const byte num_keywords = 20;
char keywords[num_keywords][label_bytes] = { "PID", "FW", "SER#", "V", "I", "VPV", "PPV", "CS", "MPPT", "OR", "ERR", "LOAD", "IL", "H19", "H20", "H21", "H22", "H23", "HSDS", "Checksum" };
define PID 0
define FW 1
define SER 2 // Offically SER# but # does not play that well as macro
define V 3 // ScV
define I 4 // ScI
define VPV 5 // PVV
define PPV 6 // PVI = PVV / VPV
define CS 7 // ScS
define MPPT 8 // MPPT
define OR 9 // OR
define ERR 10 // ScERR
define LOAD 11 // SLs
define IL 12 // SLI
define H19 13
define H20 14
define H21 15
define H22 16
define H23 17
define HSDS 18
define CHECKSUM 19
endif`