probleme utilisation des fonctions

@Bwon29
Je vous avais répondu quand vous aviez posté dans le;forum en anglais, je ne sais pas ce qui est arrivé à ce post?

@Alain46
Des remarques tout à fait pertinentes sauf celle-ci

analogRead renvoie un integer. Si tu veux stocker la valeur retournée dans un float il te faut faire un transtypage
tvoltage2=(float) analogRead(tinput1);

Aucun typage n’est nécessaire, la promotion implicite (sous forme de conversion) d’un entier en float est tout à fait dans la spécification du C ou C++ puisque un int sur 16 bits tient sans soucis dans un float de 32 bits

Floating–integral conversions
A prvalue of integer or unscoped enumeration type can be converted to a prvalue of any floating-point type. If the value cannot be represented correctly, it is implementation defined whether the closest higher or the closest lower representable value will be selected, although if IEEE arithmetic is supported, rounding defaults to nearest. If the value cannot fit into the destination type, the behavior is undefined. If the source type is bool, the value false is converted to zero, and the value true is converted to one.