Android Bluetooth joystick

Hi kas, I tested the new version of Joystick Commander. The servo movements definitely are much smoother now, especially for very slow changes of the joystick position. Looks good. I also looked at the wording on all the menus like you suggested, and they all look good too, I think.

Considering BT works on the 2.4Ghz band, I'm also surprised that the servo response latency is so quick, as where I live there are about 30 routers that I can pick up. See attached. I might have expected some interference, and slower responsiveness.

The only thing left that I might comment on is that you cannot tell from the Android screen what is the state of the Led on the Arduino, in the sense that you don't know what was the last keypress made - on or off. I guess there is no option for feedback from the Arduino board back to the Android device, but it might help to put some marker on the Android screen to indicate the last key pressed. Like a little marker that comes on, separate from the on,off keys.

...you cannot tell from the Android screen what is the state of the Led on the Arduino, in the sense that you don't know what was the last keypress made - on or off. I guess there is no option for feedback from the Arduino board back to the Android device, but it might help to put some marker on the Android screen to indicate the last key pressed. Like a little marker that comes on, separate from the on,off keys.

I will have a look at it when back from holydays
My background is Process Control, in term of strategy, I agree, a feedback from the Arduino is much better
This should be feasible :roll_eyes:

Holydays? Where the heck does one go on a holiday when he lives in a resort town like you do? LOL. Maybe the beach. Bon chance.

FYI, there appears to be a bunch of BTBees around,
http://www.google.com/search?hl=en&site=imghp&tbm=isch&source=hp&biw=1025&bih=870&q=bluetooth+bee

I happen to have this one on hand, so I plugged it into my Arduino1284 board [which just happens to have a convenient XBee socket], and the JoystickCommander worked right off without any muckaround, so it looks like the "default" mode of the BTBee is the same as for the other small BT modules cited earlier. Again, 2 wire control - Rx, Tx, 9600bps, code=1234 - and go. So, versatility increases.
http://www.robotshop.com/dfrobot-bluetooth-bee-2.html

Holydays? Where the heck does one go on a holiday when he lives in a resort town like you do? LOL. Maybe the beach. Bon chance.

I wont tell it over the Web (your Big Brother is watching us) :wink:

I happen to have this one on hand, so I plugged it into my Arduino1284 board [which just happens to have a convenient XBee socket], and the JoystickCommander worked right off without any muckaround, so it looks like the "default" mode of the BTBee is the same as for the other small BT modules cited earlier. Again, 2 wire control - Rx, Tx, 9600bps, code=1234 - and go. So, versatility increases.

Good to know, thank for the information

You'll notice that most of the BTBees in those pictures use the same same BT module as the little boards we've been using, and the Bee is just a carrier board to plug into an XBee socket. And never tell anyone in public what your specific plans are, just general stuff like "Well, maybe we'll head south, or maybe east, have to see how it goes", LOL. Talk about intrusiveness, this article may be of interest! Do a google search on
"WSJ How Kid Apps Are Data Magnets". I find the direct link gets highjacked. "Big Data" knows more about you than your own govt. C'est la vie. Neuromancer in action.

And never tell anyone in public what your specific plans are, just general stuff like "Well, maybe we'll head south, or maybe east, have to see how it goes", LOL. Talk about intrusiveness, this article may be of interest! Do a google search on
"WSJ How Kid Apps Are Data Magnets". I find the direct link gets highjacked. "Big Data" knows more about you than your own govt. C'est la vie. Neuromancer in action.

I suggest to go back to the original subject of this thread
Words Google, FaceBook, NSA have nothing to do with Bluetooth control, even if European and Gaia citizens have hard feelings about that :0 :0 :0

Hoops... I heard a strange click on my phone line :disappointed_relieved:

Best not to kick the tiger in the a**, when he's sleeping. But that's old news. The WSJ article is about ggle, yah, fceb**k, amzn, and eby, the new 4-letter word agencies that know 100X more about you than the gvt will ever know. LL.

On other matters, I've started reading a book on Android development. Install about 700-800 MB of dev tools (java sdk, eclipse, eclipse android plugin, android sdk, maybe some others), and learn how they work, and maybe 3 months later you'll have a nice 47KB .apk app. More L*L.

I've started reading a book on Android development. Install about 700-800 MB of dev tools (java sdk, eclipse, eclipse android plugin, android sdk, maybe some others), and learn how they work, and maybe 3 months later you'll have a nice 47KB .apk app

You choosed the hard way :fearful: :fearful:
Bonne chance :wink:

I'll look up your links too, but see you also mentioned Eclipse + Android SDK, which is where the book starts from too.

I posted a BlinkM (RGB LED) project based on Joystick Bluetooth Commander, in the LEDs and Multiplexing Section

Comment from Google Play:

Muy buena aplicacion Aplicacion sencilla y de fácil uso, el código facilitado para arduino es muy útil.
Espero más versiones con más botones para seguir trabajando con ello.

Thanks for the nice comments

Regarding additional buttons, I have mixed feelings as my Xperia mini screen is allready cluttered
On the other hand, a screen tablet is another story, with a lot of space (see reply #28)
May be an option to place additional buttons according to the available real estate

Road map for the next versions:

  • remove Data range -10 to +10 (useless)
  • add Data range -100 to +100 for increased resolution
  • add Calibration screen for "Zero" position offset

My Google Play downloads are in the 100 - 500 category
Please let me have additional feedback

  • Android device
  • Android version
  • suggested new features

TIA

I guess I've already mentioned it, but to me, having a couple more on/off buttons would really be nice. You'll notice a guy on another thread here wanting an Android app to "control relays".

One way to implement this with little additional screen real estate is fork the current on/off buttons into 2 separate on/off functions, and simply change the button color/etc to indicate last msg state. Actually, on your screen in post #0, I'd think you'd have room for at least 4-6 buttons without too much interference. Just a thought.

[I'm still looking at Android dev, but currently off trying to get my ethernet shield to do tweets and talk to xively, :-)].

OK, OK...

What's about this layout

Four toggle buttons with visual feedback
Relays 2 and 3 are supposed to be energized

Hi! I have liked your application because I allow me to control motors through bluetooth. I use various dispositives to use program: mobile and tablet. The mobiles that we uses are Samsung Galaxy S2 (Ice Cream Sandwich) and S3 (Jelly Bean), and the tablets are Samsung Galaxy Note 10.1 (Jelly Bean) and Nexus 7 (Jelly Bean).

I like the idea of you to increase the range of -100 to +100 to allow better control. And it's okay to add more buttons to take further action with the robot.

If I have any ideas for your design and can be useful to me I write it on the forum.

A greeting! and sorry for my English is not very good =(

That's great, kas, exactly what I was thinking about, :-).

You might make it so, in the options menu, you can select momentary activation or toggle on the switches [ha - it never ends, people always want more, each solution breeds a new idea, LOL].

Hi Rafolas, welcome to the forum :slight_smile:

Thanks for taking the time to register and to send your very first post in this thread
Your feedback is (and will be) appreciated

@oric_dan

You might make it so, in the options menu, you can select momentary activation or toggle on the switches
[ha - it never ends, people always want more, each solution breeds a new idea

:wink: :wink: :wink:
In Android, Buttons and ToggleButtons are different beast... :roll_eyes:
For the moment, I am creating the option menu for displaying zero, two or four buttons on the screen

I will post Joystick Bluetooth Commander V2.4 on Google play later today

Change log:

  • Display up to four toggle buttons with visual feedback
  • Button visibility option setting (0 - 2 - 4)
  • added Timeout count "every 1000 intervals" to support new low refresh intervals
  • default refresh interval set to 50ms
  • removed buttons data option setting (not relevant anymore)

New buttons protocol:
Button1_ON < STX '1' ETX >
Button1_OFF < STX '2' ETX >
Button2_ON < STX '3' ETX >
.....
Button8_OFF < STX '8' ETX >

The original Arduino setLED() function should be modified:

void setLED(int LEDstatus)  {
  switch (LEDstatus) {
    case '1':
      Serial.println("Button_1: ON");
      // your code...      
      break;
    case '2':
      Serial.println("Button_1: OFF");
      // your code...      
      break;
    case '3':
      Serial.println("Button_2: ON");
      // your code...      
      break;
    case '4':
      Serial.println("Button_2: OFF");
      // your code...      
      break;
    case '5':
      Serial.println("Button_3: ON");
      // your code...      
      break;
    case '6':
      Serial.println("Button_3: OFF");
      // your code...      
      break;
    case '7':
      Serial.println("Button_4: ON");
      // your code...      
      break;
    case '8':
      Serial.println("Button_4: OFF");
      // your code...      
      break;
  }
}

Disclaimer:
See reply #36

@ oric_dan
Please let me have a tablet screenshot similar to reply #28

Enjoy

EDIT: Done!

Looks great! Will the source code of the joysticker commander be open at some point for use to learn from?

Looks great! Will the source code of the joysticker commander be open at some point for use to learn from?

I will definitely make the source code available
Need some time to polish it a bit

Inspiration rarely comes from the Vacuum :wink:
Please refer to the "About" section of the Application menu

The code uses a mobile-anarchy widget combined with the classical BluetoothChat Android SDK example

Awesome. I have several times attempted to program in android system but the barrier is too high for me. I almost never program any GUI on any OS except for occasional Java popup and dialog type of simple GUIs. If at some point in the future I get your code, I can learn from it. Thanks for deciding to share the code.