My First Web Page: Lesson 8: JavaScript, STEM and Internal Device Sensors
Create Your Own Live Mathematics and STEM Web Pages
W3Schools.com: Learn JavaScript
Google: Device Orientation and Motion
Mozilla: Device Orientation and Motion
- Introduction: A Sampler
- Lesson 2: Styles and Layout
- Lesson 3: Adding Beautiful Mathematics to your web page
- Lesson 4: Interacting with your web page
- Lesson 5(a): Adding a GeoGebra Applet
- Lesson 5(b): Adding a Geometry Expressions Applet
- Lesson 6(a): Creating a GeoGebra Assessment Task
- Lesson 6(b): Creating a Geometry Expressions Assessment Task
- Lesson 7: Interacting with Third Party Apps
- Lesson 8: JavaScript, STEM and Internal Device Sensors
- Lesson 9: JavaScript, STEM and GPS
- Lesson 10: Adding Web Bluetooth Support (1): Talking to your SensorTag
- Lesson 11: Adding Web Bluetooth Support (2): Talking to your LaunchPad
- Lesson 12: Introduction to HTML Graphics: Canvas
Mobile devices know where they are and, importantly, which way that they are facing. They include sensors such as accelerometer (DeviceMotion) and magnetometer (Compass - DeviceOrientation) which offer data for the reading with just a little JavaScript prompting!
This opens up wonderful classroom opportunities for student learning and deeper understanding of key concepts like acceleration and geomagnetism. In later lessons we will learn about the powerful possibilities of using Bluetooth Low Energy (BLE) devices to bring our STEM lessons to life, but first it is important to see that the simplest solution probably lies in the phone carried by every student.
Note that older laptop computers also used motion sensors to help to protect their spinning disc drives, but with the advent of solid state drives, this is no longer a priority. In general these days you will need to use mobile devices to access the features described here.
For more detailed background on this interesting and powerful feature, refer to the links above from both Google and Mozilla, who are both very active players in this new field of progressive web apps.
If you have any questions or would like to share your experience with this utility, please drop me an email!
Which Way is Up? Counting Steps using Accelerometer
Adding All Our Sensors
Putting our Internal Sensors to Work
Home ← Live Mathematics and STEM on the Web ← My First Web Page: Introduction ← Lesson 8