olehs / PZEM004T

Arduino communication library for Peacefair PZEM-004T Energy monitor
MIT License
226 stars 114 forks source link

Delay #49

Closed 303055 closed 6 years ago

303055 commented 6 years ago

Hi olehs,

Why is there 2 seconds delay between receiving information? Can it shorten? Thx

olehs commented 6 years ago

No, it's hardware issue.

olehs commented 6 years ago

You can shorten delay between readings with setReadTimeout, but this will cause reading errors (-1.0)

303055 commented 6 years ago

Hello olehs, Thank you for your quick reply !

So like this:

void setup () { Serial.begin (9600); pzem.setAddress (ip); pzem.setReadTimeout (1000); // 1000ms }

Thx

olehs commented 6 years ago

1000ms is the default timoute. You have to decrease it. PZEM returns 2 readings in 1 second.

303055 commented 6 years ago

Thx olehs work fine for me

@+

303055 commented 6 years ago

thx olehs

work fine for me

@+