This project draws a graph of the x, y, and z values for the accelerometer sensor.It also indicates when the device has been shaken.
You can test this project on the emulator if you don't have a device to see what the output would look like.
The aia project is attached.
-----hAPPy INVENTORing!Scott
(you have received this message from the App Inventor Developers Library)
---
You received this message because you are subscribed to the Google Groups "App Inventor Developers Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-develope...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-developers-library+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-developers-library+unsubscribe@googlegroups.com.
Hi Abraham!I had suspected my X sensor was noisyI suppose you already know this, but you can take several samples from a sensor property then average them to smooth out a sensor result.
I did not do that in this example.
I did average OrientationSensor Azimuth values in my simple compass project to keep the dial that indicates current heading from swinging too wildly.---Scott
On Monday, April 28, 2014 9:58:12 AM UTC-5, Abraham Getzler wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-developers-library+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Changes log:140428 09:30PM CST: fixed the Shaking label so it resets after two seconds; swapped x,y colors to match diagram arrows---
This project draws a graph of the x, y, and z values for the accelerometer sensor.It also indicates when the device has been shaken.
The diagram below shows that if the device is laid face up on a table top, the ZAccel value from gravity will be positive.Turning the device on it's left side will make the XAccel value positiveStanding the device upright as in the diagram will give YAccel a positive value.This screen shot of the actual app shows how each axis is affected by gravity starting with the device face up on a tabletop then...
- rotating to the left until the left side is touching the table then rotating back to face-up (green trough)
- rotating right until the right side is touching the table top then back to face-up (green mound)
- rotating forward until the bottom of the device is touching the table top then back to face-up (red trough)
- rotating backward until the top of the device is touching the table then back to face-up (red mound)
This is repeated three times as shown in the graph.Note that when rotating about the YAccel-axis, YAccel is near 0.And when rotating about the XAccel-axis, XAccel is near 0.ZAccel oscillates from 9.8 when the device is face-up to 0 when it is facing left, right, forward, or backward resulting in a force of 0.
You can test this project on the emulator if you don't have a device to see an approximation of what the output might look like.Pressing Ctrl+F11 toggles portrait and landscape orientations which triggers the XAccl and YAccel values to change.ZAccel always remains at about 4.9, however.
The aia project is attached.
--
(you have received this message from the App Inventor Developers Library)
---
You received this message because you are subscribed to the Google Groups "App Inventor Developers Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-develope...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-developers-library+unsubscribe@googlegroups.com.