#include <STM32_TM1637.h> // http://rcl-radio.ru/wp-content/uploads/2020/02/STM32_TM1637_V1_3.zip
STM32_TM1637 tm(2,3);// CLK, DIO
const float u_p = 5.10;
float u_i, u_sum;
void setup(){
tm.brig(5);
pinMode(A0,INPUT);
tm.print_float(50,2 ,0,0,0,0b01110111);
delay(1000);
tm.print_float(0,0 ,0b01000000,0b01000000,0b01000000,0b01000000);
delay(1000);
}
void loop(){
for(int i=0;i<10;i++){
u_i=analogRead(A0)*u_p/1023;
u_sum = u_sum+u_i;
delay(50);
}
u_i=u_sum/10;u_sum=0;
tm.print_float((u_i-(u_p/2))*25,1,0,0,0,0);
}