Hi, I have started playing around with animation Library. Here is what I am seeking to do: I currently receive the position of a accelerometer , and I am looking to have a white dot moving on my activity based on the absolute position of that sensor. I want to use this as a mouse, I have tried to use the mouse diectely thorugh HID but all I could do with the mouse is have relative movements, I need absolute.
The accelerometer sensor would be installed on the head. So right now I receive the X and Y position of the sensor thorugh a serial BT link from an arduino, and I would like the dot move to the absolute X,Y coordinate in real time, the quickest possible. As if you were pointing on the screen with a laser pointer.
In addition to that, I would like to be able to detect that the dot is above one of the button views of my activity, because when it hovers over it I would have it click automatically that view.
My question: what is the best efficient way to do this? A translate animation? or simply change the position of the white dot view to new coordinates (adjusting the .top parameter of the view), or should I consider using anything else ? My biggest concern is the execution time so that the 'mouse' doesnt lag to much when the head moves.
Thanks !
The accelerometer sensor would be installed on the head. So right now I receive the X and Y position of the sensor thorugh a serial BT link from an arduino, and I would like the dot move to the absolute X,Y coordinate in real time, the quickest possible. As if you were pointing on the screen with a laser pointer.
In addition to that, I would like to be able to detect that the dot is above one of the button views of my activity, because when it hovers over it I would have it click automatically that view.
My question: what is the best efficient way to do this? A translate animation? or simply change the position of the white dot view to new coordinates (adjusting the .top parameter of the view), or should I consider using anything else ? My biggest concern is the execution time so that the 'mouse' doesnt lag to much when the head moves.
Thanks !