so i changed the code to look like this:
Code: Select all
//Calculate supply voltage.
float SupplyVoltage = (((float)adcValue_UB / 1023 * 5) /10000) * 110000;
//Output display data.
u8g2.firstPage();
do {
u8g2.drawXBMP(112, 4, 16, 16, LambdaSensorSymbol);
u8g2.drawXBMP(112, 24, 16, 16, BatterySymbol);
u8g2.drawXBMP(112, 44, 16, 16, HeaterSymbol);
u8g2.setFont(u8g2_font_helvB24_tf);
u8g2.setCursor(0,29);
u8g2.print(SupplyVoltage); //ändern mit Volt Spannung
u8g2.setCursor(0,59);
u8g2.print(Lookup_Lambda(adcValue_UA), 2);
} while ( u8g2.nextPage() );
can i do it better or different so i will not use it twice ?
Also the Voltage says ( 11.08V-11,45V) but my Multimeter measures ( 12,12-12,45), so its a huge difference and my multimeter is Correct.
Am i doing something wrong ?