arduino:divide-by-1023-or-1024
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arduino:divide-by-1023-or-1024 [2025/06/20 13:16] – [Is it wrong to use 1023?] Ilias Iliopoulos | arduino:divide-by-1023-or-1024 [2025/06/21 11:56] (current) – [Finally, to get the voltage from the reading of analogRead(), do we divide by 1023 or 1024? What do AI engines have to say?] Ilias Iliopoulos | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Finally, to get the voltage | + | ===== Finally, to get the voltage |
While I was working lately on a project to build a joystick using salvaged parts from an old RC transmitter https:// | While I was working lately on a project to build a joystick using salvaged parts from an old RC transmitter https:// | ||
Line 7: | Line 7: | ||
Discussion forums hosted several opinions, some purely theoretical, | Discussion forums hosted several opinions, some purely theoretical, | ||
- | As expected, AI machines are trained by the information they find online. One was in favor of 1024, explaining that this is the correct value, because it is consistent to the theory of the operation of Analog to Digital Converters. It also considered 1024 as the value that provides the highest precision, making this approach more applicable to operations that require high accuracy. Yet, asking the machine why some people are in favor of 1023, it took an neutral position, stating that the results do not differ so much. | + | As expected, AI machines are trained by the information they find online. One was in favor of 1024, explaining that this is the correct value, because it is consistent to the theory of the operation of Analog to Digital Converters. It also considered 1024 as the value that provides the highest precision, making this approach more applicable to operations that require high accuracy. Yet, asking the machine why some people are in favor of 1023, it took an neutral position, stating that the results do not differ so much and that although 1024 is " |
- | Another AI engine was absolutely and without any doubt in favor of 1023. After I insisted that 1024 would be a better option, it explained that the difference is subtle and provided a more detailed explanation. | + | Another AI engine was absolutely and without any doubt in favor of 1023. After I insisted that 1024 would be a better option, it explained that the difference is subtle and provided a more detailed explanation. |
So, if our fellow colleagues of the future would like to be informed on our final verdict, would they consider that it is just a matter of personal opinion? At the time that scientists are arguing on quantum mechanics, how can we leave such a trivial issue without a clear and precise answer? | So, if our fellow colleagues of the future would like to be informed on our final verdict, would they consider that it is just a matter of personal opinion? At the time that scientists are arguing on quantum mechanics, how can we leave such a trivial issue without a clear and precise answer? | ||
Line 16: | Line 16: | ||
Several schools of thought crossed their swords: | Several schools of thought crossed their swords: | ||
- | * The purists: //" | + | * The purists: //" |
* The believers: //"The manual says `A*Vref/ | * The believers: //"The manual says `A*Vref/ | ||
* The practical thinkers: //"The difference is so small that we should not bother"// | * The practical thinkers: //"The difference is so small that we should not bother"// | ||
Line 82: | Line 82: | ||
==== Any comments on the various arguments in the online discussions? | ==== Any comments on the various arguments in the online discussions? | ||
- | It seems that arguments | + | Arguments |
- | Also, for the " | + | Yes, of course there are cases where we take decisions |
- | Induced errors should always be taken into account. | + | Induced errors should always be taken into account. |
==== Is it wrong to use 1023? ==== | ==== Is it wrong to use 1023? ==== | ||
Line 102: | Line 102: | ||
I believe that it has been proven beyond doubt at the discussion above, that you get correct answers only if you ask the right questions. | I believe that it has been proven beyond doubt at the discussion above, that you get correct answers only if you ask the right questions. | ||
- | > __"Go back to the description of the problem" | + | > __"If you cannot find the solution |
- | If you obtain a better understanding of the nature of the problem and even re-phrase it in a way that the new expression exposes the parameters that govern the problem, you will have many more chances to solve it. | + | If you obtain a better understanding of the nature of the problem and even re-phrase it in a way that the new expression exposes the parameters that govern |
Same with AI. I purposely did not present here the questions I submitted to the AI engines and their exact answers, since the phrasing of the question produced a totally different result. | Same with AI. I purposely did not present here the questions I submitted to the AI engines and their exact answers, since the phrasing of the question produced a totally different result. | ||
~~DISQUS~~ | ~~DISQUS~~ |
arduino/divide-by-1023-or-1024.1750414612.txt.gz · Last modified: 2025/06/20 13:16 by Ilias Iliopoulos