Value 3030 is displayed voltage 12336V
Value 3030 is displayed wattage output 12336W
Value 0214 is displayed voltage panel 66.5V DC
Vaule 07 // code for display allarm 07 not have allarm
Value 05 nd
Value 02 nd
Value 02 nd
Value 02 nd
Value 04 nd
Value 019C is temperature displayed 35celsius
Value 0000 nd
Value 3030 1233W home power load
i need suggestion for manipulate this data
i have test cycle in this post
thanks
For hints on how to make a successful post, please read and follow the instructions in the "How to get the best out of the forum" post, linked at the head of every forum category.
String inputString = "";
boolean stringComplete = false; // whether the string is complete
int buffer[350]; // 350
int count = 0;
int temp3;
//SoftwareSerial SSerial(2,3);
void setup() {
Serial.begin(9600);
while(!Serial){}
Serial.println("IN attesa Cavi non collegati...");
SSerial.begin(9600);
}
void loop() {
if (SSerial.available()){
Serial.write(SSerial.read());
// int inByte = SSerial.read();
// Serial.print(inByte, HEX); // A This line my port com monitoring flush data HEX
if (stringComplete) { //not sure if this part work i have disabled//Serial.print(inByte, HEX); but serial.print a this time print ascii
Serial.println(inputString);
inputString = "95"; // clear the string: THIS IS START STRING same value every cycle ??
stringComplete = false; //Reset the flag
count = 0; //Reset the array counter
}
}
// while (SSerial.available()) {
// get the new byte:
byte inChar = SSerial.read();
// add it to the inputString:
inputString += inChar;
buffer[count] = inChar;// this buffer start in hex reading?this is ascii
count++;
// if the incoming character is a $, set a flag so the main loop can do something about it:
// if (inChar == ' // CODE IS NOT COMPLETE
if(inChar == '$') { stringComplete = true; } //this for complete ? A this this next part programm running and print data to serial com.data is more variable not stable not sure request my buffer
Serial.print("Watt USED: ");
//watt used code convert 30 30 from hex to decimal and then display 1233W
temp3 += buffer[2];
temp3 += buffer[3];
Serial.println(temp3); //so you can see the captured string
'
You should post code by using code-tags. There are two simple ways to do this.
First way is to click on the code tags icon at the top of the posting window
Another wasy is to use an automatic function for doing this in the Arduino-IDE.
Three steps
1)press Ctrl-T for autoformatting your code
2)do a rightclick with the mouse and choose "copy for forum"
3)paste clipboard into write-window of a posting
Looks like you are testing for SSerial.available(), then reading multiple characters from the serial buffer, without knowing how many are actually available.
this output suggests reading voltages and power (Watts).
do you need a way to identify that the input is a Voltage or Power? separate the sub-fields, and translate the ASCII values into decimal values?
In the video i send the dump for display
And inverter reply.
I need manipulation data recevied by inverter.
Thank s
The comunication possible is master slave.
The display send the code
And the inverter reply to display.
This is format data dumped is in hex.
In this string up the post..
I need find value 95 and capture this next string
30 30 30 30 02 14 07 05 02 02 02 04 01 9C 00 00 30 30