sphero-inc / sphero.js

🚫 DEPRECATED: The Sphero JavaScript SDK to control Sphero robots.
http://sdk.sphero.com
MIT License
342 stars 90 forks source link

Access to heading value from BB8 ? #62

Open reidakdumont opened 8 years ago

reidakdumont commented 8 years ago

Hi,

Is it possible to have access to the heading value of bb8 ? I search for this functionality but I find nothing to get it and it could be useful to have it.

Thanks

deadprogram commented 8 years ago

It is typical to use the Inertial Measurement Unit (IMU) for this info. Please check out the example code https://github.com/orbotix/sphero.js/blob/master/examples/stream-imu-angles.js

Hope that helps!

reidakdumont commented 8 years ago

Hi deadprogram,

yes it helped me but now I have a little issue because the add of the call to streamImuAngles add some sort of lag in the command executing for bb8. Do you know if there is a solution to decrease the framerate of sending data to minimize the add of lag ?

Thanks

deadprogram commented 8 years ago

Perhaps you want to play with different values for the timeout value for sending commands. For example:

var bb8 = new Sphero("F3:F2:6D:55:71:09", { timeout: 300 });

Hope that helps!

deadprogram commented 8 years ago

From now on, I am going to use "HTH" for "Hope that helps!" to save on bytes. :P

deadprogram commented 8 years ago

Hi, @reidakdumont did changing the timeout value help you? Please let us know.