(01-13-2016, 02:29 AM)fanoush Wrote: Anyone already discovered how the controller motion works? is there some accelerometer or anything active in the controller that sends some motion events or it is only about passive light and camera detection of light movement? Are there some libraries on device to detect it and translate it to movement events?
Anyone tried to pair it with other devices?
Not tried to pair any other devices, but indeed the controller does have an accelerometer.
I'll post my code for the controller below, it spits 16 bytes out at a time over bluetooth.
I wrote a struct to shove the bytes into.
Heres some code I reversed / wrote that seems to work ok. The stopcontrols method may not work correctly.
I did work out how to set the LED colour, it was a write to 0x0029 on the device profile, and 0x00 was off, 0x1 was green, and the other colours were chosen by setting the other bits on that 1 byte being written. The colours were fixed so you couldn't have more than 1 bit set at a time.
There are some libs it uses for the camera detection in
The libopencv ones seem to be "The Open Computer Vision Library" its in the open source stuff we got off them.
I think leapfrog use the wrappers libVisionMPI.so and libVideoMPI.so