Thanks for the advice. It is a 10bit ADC (who's values are manipulated to get 0-4000). I apologise for not fully explaining myself in my first post. What it is I've created is a simple cantilever...
Type: Posts; User: Possédé
Thanks for the advice. It is a 10bit ADC (who's values are manipulated to get 0-4000). I apologise for not fully explaining myself in my first post. What it is I've created is a simple cantilever...
Thanks laserlight. This way produced better results. Thanks to everyone else, and I apologise for asking such a simple question.
Ahh, so round the fractional number to the nearest integer then use the resulting integer and multiply by 20. 2335/20 = 116.75 round to 117 * 20 = 2340?
Hello, thanks for your answers. I have previously tried ledow's method, but it was not working the way I wanted it to. Take a value of 2335, divide it by 20 = 116.75.. 116 * 20 = 2320. 2335 is closer...
Hello all! I have a question regarding the rounding of an integer. The integer value is taken from the voltage input of the microcontroller (ADC) and is updated every tenth of a second. The integer...