Hardware Reference
In-Depth Information
Figure 8-16
The output of the Processing
accelerometer sketch.
Though it may seem like a lot of work to go
from the raw output of an accelerometer to
the visualization shown in Figure 8-16, it's
useful to understand the process. You went from the
translation of acclerations along three axes into analog
voltages, then converted those voltages to digital values
in the microcontroller's memory using analogRead() .
From there, you converted the digital values into voltage
readings, and then converted those to acceleration mea-
surements relative to the acceleration due to gravity.
Then, you used some trigonometry to convert the
results to angles in degrees.
The advantage of having the results in degrees is that
it's a known standard measurement, so you didn't have
to do a lot of mapping when you sent the values to Pro-
cessing. Instead, Processing could take the output from
an accelerometer that gave it pitch and roll in degrees.
You don't always need this level of standardization. For
many applications, all you care about is that the accel-
erometer readings are changing. However, if you want to
convert those readings into a measurement of attitude
relative to the ground, the process you went through is
the process you'll use.
X
Address 2007 by Mouna Andraos and Sonali Sridhar
Address shows that location technologies don't have to be purely utilitarian.
Photo by J. Nordberg.
 
Search WWH ::




Custom Search