Languages

Menu
Sites
Language
Gear3 to measure gyroscope, acceleration, heart rate

Hello.

 

I have developed the following program.

 

* Gyroscope measures 10 times per second (continued)

* Acceleration is measured 10 times per second (Continued)

* Heart rate is measured once per second for 3 minutes (every 3 hours)

 

* The measured data is written in a file in Gear3 and transmitted to the socket once every hour (using wifi)

 

The program runs without any problems.

 

However, if you run the program, it will run for about 6 hours and all the batteries will be destroyed.

 

I would appreciate it if you could give us a programmatic workaround to increase execution time.

Edited by: You yeonseung on 03 May, 2017

Responses

1 Replies
Armaan-Ul- Islam

Relevant Doc's:

I found some general guideline here for optimizing Power Consumption (But for Location Sensor):

  • Optimizing power consumption
    • You can select the optimal location method to reduce power consumption.
    • You can start and stop a location service instance according to the application life-cycle changes, and destroy it when it is no longer needed.
    • You can use a timeout or an alarm to stop the location service to save battery life when the location service is not available.
    • You can use a callback to stop the location service when the battery is low.

 

Link: https://developer.tizen.org/development/training/native-application/best-practices-location?langswitch=en

 

And here for gesture recognition:

https://developer.tizen.org/zh-hans/development/api-references/native-application?redirect=/dev-guide/3.0.0/org.tizen.native.wearable.apireference/group__CAPI__CONTEXT__GESTURE__MODULE.html#gaf3733ffc829005b3162df4aceecca228

 

Summary :

# Stop the listener every time possible. Then start again to read sensor data.

# Destroy the listener whenever possible.

# Use sensor_listener_set_option(sensor_listener_h listener, sensor_option_e option) function and chose an optimized sensor_option_e from:

SENSOR_OPTION_DEFAULT 

Does not receive data when the LCD is off and in the power save mode

SENSOR_OPTION_ON_IN_SCREEN_OFF 

Receives data when the LCD is off

SENSOR_OPTION_ON_IN_POWERSAVE_MODE 

Receives data in the power save mode

SENSOR_OPTION_ALWAYS_ON 

Receives data when the LCD is off and in the power save mode

 

 

But if you want to read data every second even from background, You can't save your battery much. You have to pay the price.

 

******************************************************************

One thing You need to understand:

It's Only a Li-Ion 380 mAh battery

 

You can't afford much my friend.

*******************************************************************