You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//cant seem to display outputs to lcd, stays in one position.
//this is based on MultiDevice Example from the pzem004tv30 library by Mandulaj
//sorry if this is trivial for some of you guys, im a newbie
if (show == 0) {
lcd.setBacklight(255);
lcd.home(); lcd.clear();
lcd.print("");
lcd.setCursor(0,1); lcd.print("");
delay(1000);
//cant seem to display outputs to lcd, stays in one position.
//this is based on MultiDevice Example from the pzem004tv30 library by Mandulaj
//sorry if this is trivial for some of you guys, im a newbie
if (show == 0) {
lcd.setBacklight(255);
lcd.home(); lcd.clear();
lcd.print("");
lcd.setCursor(0,1); lcd.print("");
delay(1000);
} else if (show == 1) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Voltage: "); lcd.print(voltage); lcd.println("V");
lcd.setCursor(0, 1);
lcd.print("Current: "); lcd.print(current); lcd.println("A");
} else if (show == 2) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Power: "); lcd.print(power); lcd.println("W");
lcd.setCursor(0, 1);
lcd.print("Energy: "); lcd.print(energy,3); lcd.println("kWh");
} else if (show == 3) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Frequency: "); lcd.print(frequency, 1); lcd.println("Hz");
lcd.setCursor(0, 1);
lcd.print("PF: "); lcd.println(pf);
}
delay(1500);
show = (show + 1) % 4;
The text was updated successfully, but these errors were encountered: