-
Notifications
You must be signed in to change notification settings - Fork 0
Gravity
mailmindlin edited this page Sep 25, 2014
·
4 revisions
The gravity block can be placed in any number slot. It has 3 axis, like the accelerometer. Note that you should use a calibration function when using this block, because different devices will either measure nothing (no acceleration) as [0,0,1] or [0,0,9.81]. This is not available on all devices/browsers, so it is advised for projects that implement the gravity sensor to determine this. The gravity sensor can be used in strings as "SENSOR:GRAV-[axis]" where [axis] is X, Y, or Z (i.e., "SENSOR:GRAV-X") Notes:
- Implemented in ɑ0.1.5.1 (allong with the acceleration sensor) by mailmindlin
- The gravity sensorblock is actually the javascript function, e.accelerationIncludingGravity, and is reliant on the acceleration sensor.
Devices that probably have an this sensor:
- MacBook Pro (HDD)
- MacBook Air (HDD only)
- Some laptops
Devices that don't have this sensor:
- MacBook Air (SSD only)
- Every PC ever
- Apple non-laptop computers
- Raspberry Pi (even if you attach an accelerometer, this site won't be able to detect it).