Jump to content
Sign in to follow this  
Ellyvas

voltmetru

Recommended Posts

voltage = map(reading, 0, 979, 0.479);

voltage = /=100;

 

intrarea analogica intoarce o valoare de la 0..1023

functia map o converteste in valori de la 0..479

dupa care valoarea este impartita la 100

 

 

ar trebui sa ai valori de la 0 la 4.79 pe ecran.

 

incearca sa scrii linia urmatoare

 

voltage = (float) map(reading, 0, 979, 0.479);

 

RR

 

PS - fa un print in terminal sa vezi daca care e valoare lui voltage

Edited by roadrunner

Share this post


Link to post
Share on other sites

Mersi ma !!! Acum am masurat o baterie si imi afiseaza corect tesiunea :!!

Share this post


Link to post
Share on other sites

Am luat tensiunea de la o baterie de 1.5V , si pe ecranul LCD la mine apare 1.18V care are fi explicatia?

Share this post


Link to post
Share on other sites

Mersi ma !!!

Cu acest mod de exprimare nu cred ca D-l roadrunner va mai ajuta.

Edited by miron1947

Share this post


Link to post
Share on other sites

Va rog sa ma scuzati, dar a fost euforia de moment !!! Chiar anu am vrut sa reactionez asa de necontrolat !! Pot s a va spun cam reusit sa fac codul si sa acumulez tensunea de la multe bateriii, totul merge normal. Si multumesc pt explicatii domnului Roadrunnner. Daca a fost ceva ce nu a tinut de bunul simt, va rog sa ma scuzati !! O Seara buna !!

Share this post


Link to post
Share on other sites

ok, scuzele sunt bune, sunt acceptate, si daca a fost euforie de moment atunci ma bucur ca ai rezolvat treaba.

RR

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use cookies and related technologies to improve your experience on this website to give you personalized content and ads, and to analyze the traffic and audience of your website. Before continuing to browse www.tehnium-azi.ro, please agree to: Terms of Use.