X-Git-Url: https://git-public.kairo.at/?p=slides.git;a=blobdiff_plain;f=fosdem2015%2Findex.html;fp=fosdem2015%2Findex.html;h=1522846c9012880fafca5e8daf502cbccd86a82f;hp=0000000000000000000000000000000000000000;hb=b41707de4c4f88a5d499c0854a8762391cfae9fd;hpb=94163958203672382a57ae670096b8f5bf53ebb5 diff --git a/fosdem2015/index.html b/fosdem2015/index.html new file mode 100755 index 0000000..1522846 --- /dev/null +++ b/fosdem2015/index.html @@ -0,0 +1,243 @@ + + + + + + Firefox OS Tricorder + + + + + + + + + + +
+

Table of Contents

+

Firefox OS Tricorder

+ +
+

The following slides are available in this presentation:

+
+
    +
+
+ +
+

Firefox OS Tricorder

+

Reading Device Sensor Data in JavaScript

+ +
+Robert Kaiser, +"KaiRo" <kairo@kairo.at> +
Program Manager, Mozilla QA +
+ +
+

Slides: + http://slides.kairo.at/fosdem2015/

+
+ +
+
+
+ +
+

What is a Tricorder?

+ +
+Starfleet Tricorder, 2370 +

Sensor device as seen on "Star Trek"

+

Displays whatever data is needed at plot speeds and resolutions.

+

+
+
+ +
+

Firefox OS Tricorder App

+ +
+

Displays sensor data

+

marketplace.firefox.com/app/tricorder/

+

Code: github.com/KaiRo-at/tricorder

+
+
+ +
+

Firefox OS Tricorder UI

+ +
+
+
+ +
+

Module

+ +
+ +
+
+ +
+

Position Module

+ +
+

GPS, WiFi/Cell Location

+

API: Geolocation

+

Permission: geolocation

+
+
+ +
+

Position: Code

+ +
+
+  this.watchID = navigator.geolocation.watchPosition(
+    function(position) { ... },
+    function(error) { ... },
+    {enableHighAccuracy: true, maximumAge: 10000, timeout: 60000}
+  );
+
+  navigator.geolocation.clearWatch(this.watchID);
+
+
+
+ +
+

Gravity Module

+ +
+

Accelerometer, Magnetic Compass

+

APIs: deviceorientation, devicemotion events

+

Permissions: ---

+
+
+ +
+

Gravity: Code

+ +
+
+  window.addEventListener("deviceorientation", this.orientEvent, true);
+  window.addEventListener("devicemotion", this.motionEvent, true);
+
+  orientEvent: function(orientData) {
+    orientData.alpha / .beta / .gamma (in °)
+  },
+  motionEvent: function(event) {
+    event.accelerationIncludingGravity.x / .y / .z (in m/s²)
+  },
+
+  window.removeEventListener("deviceorientation", this.orientEvent, true);
+  window.removeEventListener("devicemotion", this.motionEvent, true);
+
+
+
+ +
+

Sound Module

+ +
+

Microphone

+

APIs: WebRTC(getUserMedia), WebAudio

+

Permissions: audio-capture

+
+
+ +
+

Sound: Code

+ +
+
+
+
+
+ +
+

Environment Module

+ +
+

Light, Proximity; Flashlight

+

APIs: devicelight, deviceproximity events; Camera API

+

Permissions: ---; camera (for Flash)

+
+
+ +
+

Environment: Code

+ +
+
+
+
+
+ +
+

Device Module

+ +
+

Battery

+

APIs: Battery

+

Permissions: ---

+
+
+ +
+

Device: Code

+ +
+
+
+
+
+ +
+ +
+

Questions?

+Data & Mister Tricorder +
+
+ + +