/* Hello Wokwi! */
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Pakk Tech");
delay(1000);
lcd.setCursor(0, 1);
lcd.print("MPPT Max 60V 60A");
delay(1000);
lcd.clear();
}
void loop() {
int Pin1; // 0-1023 I/P
double Vin1;
Pin1 = analogRead(A0); // Probe Input
Vin1 = (Pin1 * 25.0 / 1023); // Pin to Vin (Reduction Factor 11)
lcd.setCursor(0, 0);
lcd.print(Vin1, 1);
lcd.print("V"); // Custom Text
int Pin2; // 0-1023 I/P
double Vin2;
Pin2 = analogRead(A1); // Probe Input
Vin2 = (Pin2 * 25.0 / 1023); // Pin to Vin (Reduction Factor 11)
lcd.setCursor(6, 0);
lcd.print(Vin2, 1);
lcd.print("A"); // Custom Text
int Power;
Power = (Vin1 * Vin2);
lcd.setCursor(12, 0);
lcd.print(Power);
lcd.print("P"); // Custom Text
delay(500);
}