We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HI! I wanted to reset the energy but it does not work :( ...
if(thingspeak.readfloatfield(channel, apikey)==1){ uint16_t u16CRC = 0xFFFF; /* declare CRC check 16 bits*/ static uint8_t resetCommand = 0x42; /* reset command code*/ uint8_t slaveAddr =0X01; u16CRC = crc16_update(u16CRC, slaveAddr); u16CRC = crc16_update(u16CRC, resetCommand); preTransmission(); Serial.write(slaveAddr); Serial.write(resetCommand); Serial.write(lowByte(u16CRC)); Serial.write(highByte(u16CRC)); delay(10); postTransmission(); delay(100); } }
The text was updated successfully, but these errors were encountered:
Hey, have you tried using the resetEnergy function in the library?
resetEnergy
Something along the lines of:
PZEM004Tv30 pzem(Serial); psem.resetEnergy(); float energy = pzem.energy(); // -> 0
Sorry, something went wrong.
No branches or pull requests
HI! I wanted to reset the energy but it does not work :( ...
The text was updated successfully, but these errors were encountered: