Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pastak/scratchx-websensor
ScratchX extension for WebAPI and Web Sensor API
https://github.com/pastak/scratchx-websensor
Last synced: 10 days ago
JSON representation
ScratchX extension for WebAPI and Web Sensor API
- Host: GitHub
- URL: https://github.com/pastak/scratchx-websensor
- Owner: pastak
- License: mit
- Created: 2015-05-15T00:33:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-15T12:55:41.000Z (over 9 years ago)
- Last Synced: 2024-10-24T23:19:58.793Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scratchx-websensor
- [ScratchX extension](http://llk.github.io/scratch-extension-docs/) for [WebAPI](https://wiki.mozilla.org/WebAPI) and [Web Sensor API](http://smus.com/web-sensor-api/)
## Usage
Extension script URL is `http://pastak.github.io/scratchx-websensor/script.js`
[Here is link for ScratchX with this extension.](http://scratchx.org/?url=http://pastak.github.io/scratchx-websensor/script.js#scratch)
**Caution**
Some blocks only run on Firefox with MacOSX or Android.
Google Chrome and Firefox for other OS don't support these API.
## Blocks
### Light sensor (Int) **Only Firefox**
![](https://i.gyazo.com/608840a12f786d529e00051fc73901b6.png)
This block return value get with front camera.( unit is lux )
### Battery Level (Int) **Only Firefox**
![](https://i.gyazo.com/5a6e87a1436c1a6e1e894bad2d1c7a93.png)
This block return battery level with percentage.
### Acceleration (Float)
![](https://i.gyazo.com/96d23dd07f46a56dfdc68a2d9a1dcbca.png)
This block return acceleration includes the effect of gravity.
### Geolocation (Float)
![](https://i.gyazo.com/683ab603ea1a34d3244bd47dc296cebc.png)
This block return geolocation of place which in you are.