Chapter 7

Sensors

A typical smartphone or tablet contains sensors which track the device’s location, movement and orientation. Scripts can use these sensors in many ways. Sensors can provide input for navigation aids, they can be an integral part of a game, and they can provide simple input to scripts. The possibilities are endless. These sensors are probably absent from laptops and computers, however.

7.1    The sensors

The full complement of sensors supported by TouchDevelop may not be available on your device. The possible sensors are as follows.

  • GPS (Global Positioning System), which obtains the phone’s current location on the ...

Get TouchDevelop: Programming on the Go, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.