values problem

Hi

I am programming a certain board. My values come approximately 3 times high than the actual ones .need help in programming. I give an example.

  1. My values should come 14 but they come 40
  2. My values should come 18 but they come 56.

so how to include this factor in arduino programming so that it reads approx.14 instead of 40 and approx 18 instead of 56.

thanks

What board are you using?

and upload your code please.

The value of the ASCII character ‘8’ is 5610, or 0x38.

Coincidence?

If your values are consistently higher than what you expect by ~3, to me that says:

  • Your expectations are wrong
  • Your sensor is stuffed
  • Your calculations converting the raw data into values are wrong

In any case, scaling the value back to what you want it to be, is not the right solution imo.

That said, you could use map maybe?

I am programming a certain board.

Which board ?
What program ?

My values come approximately 3 times high than the actual ones

Where do these values come from ?
How do you know what the values should be ?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile: