#include <LiquidCrystal.h>
LiquidCrystal lcd(PA0, PA1, PA2, PA3, PA4, PA5);
float POT_RV;
float VOLTAJE;
void setup()
{
lcd.begin(20, 4);
lcd.clear();
lcd.setCursor(3, 1);
lcd.print("STM32 BLUE PILL");
lcd.setCursor(5, 2);
lcd.print("PRACTICA 1");
delay(2000);
lcd.clear();
lcd.setCursor(3, 1);
lcd.print("Voltaje= ");
}
void loop()
{
POT_RV = analogRead(PB1);
VOLTAJE = ((POT_RV * 5)/4095);
delay(500);
lcd.setCursor(12, 1);
lcd.print(VOLTAJE);
}