Steady Analog Reading goes up and down


i don't understand why reading goes , down, 200-600ma. reading multimeter shows 200mv , doesn't go , down.

code: [select]
int cappercent=0;
float capv=0;
int amp=0;
int mah=0;
long total=0;
float ref=0.80;


code: [select]
 
  float shunt = analogread (a4);
  amp= shunt*5.0/1024.0*1000.0*ref;
 
  capv= analogread (a5);
  cappercent= capv/1024.0*5.0/2.7*100.0*ref;
 
 
  mah=total/3600;



code: [select]
total= total + amp;   
   
  char buffer[17];
  sprintf(buffer, "a:%04d c:%02d %04d", amp, cappercent, mah);
  lcd.setcursor (0,1);
  lcd.print (buffer);   
 

hi arduinomagbit

quote
i don't understand why reading goes , down, 200-600ma.

quote
reading multimeter shows 200mv , doesn't go , down.


can clarify reading mean?  you've mentioned ma and mv above :)

code: [select]
  float shunt = analogread (a4);
  capv= analogread (a5);


if problem 1 of these values, have tried printing raw integer values returned analogread() statements?  varying unexpectedly?

can post diagram of hardware.

regards

ray


Arduino Forum > Using Arduino > Programming Questions > Steady Analog Reading goes up and down


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support