pebble / pebblejs

Program the Pebble with simply JavaScript
MIT License
455 stars 229 forks source link

Accel 'tap' event not very sensitive #158

Closed dalanmiller closed 8 years ago

dalanmiller commented 8 years ago

When trying to us Accel.on('tap', ... I notice that I nearly have to thump/punch the watch for the event to register on my Pebble Classic. Is there a recommended way of increasing the sensitivity? How does pebblejs currently determine a 'tap'?

Meiguro commented 8 years ago

Yes, this is an issue with the base Pebble SDK itself, and not necessarily pebble.js. It's based on the same event used to turn on the motion backlight, and also known as the Accel Tap event in the C API. Unfortunately, there's not much that can be done other than to implement a tap service on top of the raw accel data, but doing so would use up more considerable battery life. The tap event is being generated by a hardware accelerometer wake up functionality, so it uses less power than reading accel samples directly.

You can contact support or devsupport (at) pebble to give your feedback about the tap events on Pebble Classic. Speak about the motion backlight if contacting support, and speak about both or the accel tap event if contacting devsupport.

dalanmiller commented 8 years ago

Would I get the exact same results using Pebble C as I did Pebble.js @Meiguro? (I'm assuming you have a transpiler for Pebble.js which converts it directly to Pebble C)

Meiguro commented 8 years ago

Yes, you would get the same result if using accel tap in Pebble C. Note that for raw data (not tap), Pebble C can obtain them at a higher, larger, and faster rate, but once again with the caveat that you need to make your own tap algorithm.

I'm assuming you have a transpiler for Pebble.js which converts it directly to Pebble C

That would be awesome, but pebble.js is actually just a remote wrapper around a dumb C client with some smartness here and there to make it feel as one cohesive unit.

You can check out Pebble's new rocky.js endeavor for a JavaScript interpreter on the watch. Of course, use pebble.js if you want something on the watch right now, and I will also continue to support pebble.js.

Meiguro commented 8 years ago

Re-open if you have more questions