Android Bluetooth Dual-Joystick Controller
Sends 5 bytes every 200ms (or every 3 sec if idle).
data format: [ STX : radiusL : angleL : radiusR : angleR ]
where: STX = 0x55
radius = {0..10}
angle = {0..35} (or actual/10)
sample:

will send [ 0x55 : 0x0A : 0x12 : 0x05 : 0x09 ]
(**left-joystick is pulled backward; right-joystick leaning to the left)
Source code:
svn co https://yus-repo.googlecode.com/svn/trunk/Android/apps/btjoystick
Installer: BTJoystick.apk .
Joystick widget from Mobile-Anarchy.
demo on my quadruped:
#---------------------------------
edit 10/15/12
version 2: BTJoystick.v2.apk 45.8 KB
modifications:
* preference menu (e.g. "Menu->Connect" & "Menu->Options" )
* add four customizable buttons (send either an ascii char or a string)
* immediately send joystick data when a joystick returns to center position
* selectable data format, intervals and timeout
* prevent accidental closing



Awesome work!! This is almost exactly what I need for my own wireless micro car project. I'll need to change a couple things such as sending center position immediately on joystick release and add some extra time after stop bits so my slow micro controller to handle the data though put. Thanks for providing the source.
ReplyDeleteSuch a great work!
ReplyDeletenice bro from elab here
ReplyDeletenice post
ReplyDeletehttps://mekatronika-corner.blogspot.com/