Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<LiquidCrystal.h>
- LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
- int pomiar=A0;
- int odczyt;
- void setup() {
- Serial.begin(9600);
- lcd.begin(16, 2);
- lcd.print("Napiecie wynosi:");
- }
- void loop() {
- int sensorVoltage=analogRead(pomiar);
- float voltage = sensorVoltage * (5.00 / 1024.00);
- lcd.setCursor(0, 1);
- lcd.print("U=" + (String)voltage + " V");
- Serial.println(voltage);
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement