SAndroidEOfficial / framework

SAndroidE - Sensors for Android Embedded. A free framework allowing external devices to be easily managed in Android
http://es3.unibs.it/SAndroidE
Other
7 stars 1 forks source link

Set of sampling interval and hysteresis to read pins #47

Closed giowild closed 7 years ago

giowild commented 7 years ago

Currently the sampling period to check if a pin value is changed, is a fixed value (e.g. 200ms in nano firmware, other value in arduino, etc.). Moreover, the thresold at which the value is considered changed, and that means it must be sent to smartphone, is also fixed.

It would be nice to let the app developer configure these values using Sandroide.

Should these values be unique for all pins or each pin may have its own values?

Creating a pair for each pins is not easy on the firmware side, because it means one of these two:

giowild commented 7 years ago

@drkangel what you think is the best way to achieve it?

drkangel commented 7 years ago

The first option is surely the best one... but you should check if the library used to create the FWs for the different remote device makes it available, and if it's feasible creating so many timers on devices with poor resources. The second option is not necessarily energy-intensive if you conveniently set the available periods (for example the t2=2t1 t3=2t2 etc. using as basetime the shorter period choosen from the user). From the SandroidE library point of view a set of new functions for the BLEGPIO Object to handle this new feature could be added.

giowild commented 7 years ago

for example the t2=2t1 t3=2t2 etc.

nice idea!

giowild commented 7 years ago

ok, done in Beta 0.7