estherjk / Androidwearmotionsensors
Licence: mit
Using the accelerometer and gyroscope on an Android Wear device
Programming Languages
java 68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Androidwearmotionsensors
Zx gesture sensor smdThe ZX Distance and Gesture Sensor is a touchless sensor that is capable of looking for simple gestures.
Stars: ✭ 5 (-94.51%)
Mutual labels: sensor
UltrasonicMinimalist library for Ultrasonic Module HC-SR04, PING))) and Seeed SEN136B5B to Arduino
Stars: ✭ 77 (-15.38%)
Mutual labels: sensor
AirmonitorAir quality monitor based on STM32 & MT7681
Stars: ✭ 10 (-89.01%)
Mutual labels: sensor
KotihomeHome automation system based on Arduino with sensors, Raspberry Pi, Node.js and React
Stars: ✭ 32 (-64.84%)
Mutual labels: sensor
Hb Uni Sen WeaSelbstbau-Wetterstation für HomeMatic
Stars: ✭ 51 (-43.96%)
Mutual labels: sensor
Adafruit sensorCommon sensor library
Stars: ✭ 757 (+731.87%)
Mutual labels: sensor
Sos52°North Sensor Observation Service
Stars: ✭ 81 (-10.99%)
Mutual labels: sensor
Hydroponic AutomationA program to monitor and control 8 variables of a hydroponic gardening system
Stars: ✭ 38 (-58.24%)
Mutual labels: sensor
OpensensemapPlatform for storing and exploring sensor data
Stars: ✭ 69 (-24.18%)
Mutual labels: sensor
Temper Hum Hid🌡 TemperHum HID query API in C
Stars: ✭ 10 (-89.01%)
Mutual labels: sensor
Phonepi sampleserverCompanion servers in Node and Python for the PhonePi Sensor Streamer apps.
Stars: ✭ 28 (-69.23%)
Mutual labels: sensor
EdgemlThis repository provides code for machine learning algorithms for edge devices developed at Microsoft Research India.
Stars: ✭ 1,093 (+1101.1%)
Mutual labels: sensor
JetsonjsEmbed a JavaScript/WebGL application on a Nvidia Jetson TX2 and stream the results through websockets. It does not rely on CUDA/Jetpack. HDMI touchscreen, virtual keyboard, GPIO control, wifi config are included.
Stars: ✭ 18 (-80.22%)
Mutual labels: sensor
Pzem 004t V30Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter
Stars: ✭ 78 (-14.29%)
Mutual labels: sensor
HowmanypeoplearearoundCount the number of people around you 👨👨👦 by monitoring wifi signals 📡
Stars: ✭ 6,525 (+7070.33%)
Mutual labels: sensor
Py Sds011Python 3 interface to the SDS011 air particulate density sensor.
Stars: ✭ 48 (-47.25%)
Mutual labels: sensor
EhalEmbedded Hardware Abstraction Library
Stars: ✭ 84 (-7.69%)
Mutual labels: sensor
Ha AverageAverage Sensor for Home Assistant
Stars: ✭ 79 (-13.19%)
Mutual labels: sensor
PysmartnodeMicropython Smarthome framework
Stars: ✭ 58 (-36.26%)
Mutual labels: sensor
Android Wear Motion Sensors
This project demonstrates the use of the accelerometer and gyroscope sensors on an Android Wear device. It displays the raw values for each sensor on its own page. It also performs simple shake and rotation detection using the accelerometer and gyroscope, respectively; when a shake or a rotation is detected, the background color changes to green.
See it in action here using the Moto 360.
Code Overview
The Java files of interest are in wear/src/main/java
:
As the name suggests, MainActivity.java
contains the code for the main activity. The 2D Picker pattern for Android Wear is used to page through the accelerometer and gyroscope fragments. This is accomplished by adding a GridViewPager element to the activity and setting an adapter that provides the pages by extending FragmentGridPagerAdapter (see SensorFragmentPagerAdapter.java
). It also contains a DotsPageIndicator to identify which page is active.
SensorFragment.java
provides the UI behavior for a sensor by displaying the raw data (available through the standard Android API) and performing simple shake / rotation detection. When instantiating a sensor fragment, the newInstance()
function is used to specify the desired sensor (i.e. accelerometer or gyroscope). See SensorFragmentPagerAdapter.java
to see how this is accomplished.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at
[email protected].