Converting the results of a waveform in the corresponding voltage #5447
Replies: 1 comment
-
Posted at 2016-10-10 by @gfwilliams Yes, so what happens is normally the 0-3.3v voltage is converted to a number between 0 and 1 (eg via For the waveform, the numbers are integers, so can't be fractional. For 8 bits you have a number that can be between 0 and 255 ( So for instance if you wanted to work out what 49408 was, you'd do Posted at 2016-10-10 by user68392 Hello Gordon, Yes, the numbers that I have put up there are not correct, it was just an example so you would be able to understand what I meant. But I understood perfectly now, your explanation was awesome. And I have another question, I'm using an accelerometer to measure vibrations with this waveform, however this waveform is only for one axis. If I wanted to measure these values in the three axis (X, Y and Z) with this waveform function, how could I do? Posted at 2016-10-10 by @gfwilliams You should just be able to start 3 waveforms recording. You can actually make sure they start at the same time as well - search for Posted at 2016-10-10 by user68392 Thanks a lot Gordon! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-10-10 by user68392
Hello,
I'm studying the waveform below and I'm interested in the corresponding voltages of each point that the waveform returns:
var w = new Waveform(2000, {bits:16});
w.on("finish", function(buf) {
for (var i in buf)
console.log(buf[i]);
});
w.startInput(A0,10000,{repeat:false});
For example, the first points are
49168 - corresponds to 2.7v
49264 - corresponds to 2.6v
49264 - corresponds to 2.6v
49408 - corresponds to 2.8v
49408 - corresponds to 2.8v
Do you know how can I convert? It would help if I knew the minimum and the maximum of the values of these points, for example: minimum: 20000, maximum: 50000
The analog to digital converter converts the analog data in points with corresponding voltages between 0 - 3.3v, correct?
Beta Was this translation helpful? Give feedback.
All reactions