Go Down

Topic: Android Bluetooth joystick (Read 100489 times) previous topic - next topic

kas

Same question, same answer, see reply #482

alexander1978

Why not  :)

This a screen shot of "Total RC Commander" V0.1B:

The application is working but for the moment, the screen is optimized only for a 8" tablet
I suspect the application needs at least 7" to display the information correctly
sorry, no phones  :~ :~

Do you have a tablet ??
Please let me have size and resolution


kas

Time has passed  ::)

Total RC Commander V5.2  is now fully optimized for smartphone




I access it daily using my Motorola Moto G



vlad-sh

#498
May 05, 2015, 07:08 am Last Edit: May 05, 2015, 07:40 am by vlad-sh
Hi Kas,

Thank you for useful "Joystick BT Commander" application.
But is it possible to ask you to add option to switch from joystick to simple keys (left, right, forward, backward and stop)?

It could be like:

If "left" key is pressed - send x=-100,y=0
If "right" key is pressed - send x=100,y=0
If "forward" key is pressed - send x=0,y=100
If "backward" key is pressed - send x=0,y=-100
If "stop" key is pressed - send x=0,y=0


Picture is attached :).



In another words, keys will be duplicate leftmost, rightmost, topmost and bottommost joystick's positions.

kas

#499
May 05, 2015, 07:24 pm Last Edit: May 23, 2015, 04:04 pm by kas
Hi vlad-sh, welcome to the Forum

This is an analog joystick emulator App
I want to keep this 90KB App as compact and efficient as possible  ;)


A possible workaround is to modify AndroTest V2.0

Code: [Select]
// within getJoystickState:                                  ** not tested **

  if      ((joyY>50)  && (abs(joyX)<25))       {joyX=0; joyY=100;}
  else if ((joyY<-50) && (abs(joyX)<25))       {joyX=0; joyY=-100;}
  else if ((joyX>50)  && (abs(joyY)<25))       {joyX=100; joyY=0;}
  else if ((joyX<-50) && (abs(joyY)<25))       {joyX=-100; joyY=0;}
  else if ((abs(joyX)<25) && (abs(joyY)<25))   {joyX=0; joyY=0;}
  else                                         {joyX=JoyX_ant; joyY=JoyY_ant;}
  JoyX_ant = JoyX;
  JoyY_ant = JoyY;

Also uncheck Options / Joystick properties / Auto return to center

Let me know if it helps


kas

As of today, this thread has been viewed 100 000 times, with 500 responses
Joystick BT Commander has been downloaded 8100 times on Google Play

Thanks for your ongoing interest  8)  8)  8)

As a celebration, I will give away 10 copies of Total BT Commander
Just contact me by email or PM

Finally, please post a photo/video showing your favorite Android controlled project




Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy