Skip to main content
9 events
when toggle format what by license comment
Jul 1, 2017 at 4:57 history edited Greenonline CC BY-SA 3.0
Added non breaking space before units, code formatting and fixed the "Arduino Uno"s
Mar 19, 2015 at 13:42 answer added Edgar Bonet timeline score: 0
Mar 19, 2015 at 12:22 comment added Edgar Bonet Could you explain why you want to integrate in the first place? Integrating a positive signal will yield a diverging integral, meaning that, as your program runs, the result will increase without bounds. This is problematic. If your store the integral in an integer variable, even a long int, it will eventually overflow. If you store it in a float, it will loose precision as it grows and, eventually, the summation will have no effect, because d+b is exactly equal to d if d is a big enough float.
Mar 18, 2015 at 11:23 answer added Dave Tweed timeline score: 3
Mar 18, 2015 at 11:14 answer added Peter Bloomfield timeline score: 0
Mar 18, 2015 at 11:14 comment added Gerben Since you are using an int , d could overflow in as little as 32 measurements. Also analogRead does take some time, as does the code around it, so the time between measurements will be a bit more that 1 ms. I also don't see how you call dividing by 1000 integration.
Mar 18, 2015 at 11:08 history edited Gerben CC BY-SA 3.0
deleted 14 characters in body
Mar 18, 2015 at 10:52 review First posts
Mar 19, 2015 at 11:44
Mar 18, 2015 at 10:49 history asked Ghosal_C CC BY-SA 3.0