Pages: 1 2 3 [4] 5 6 ... 24   Go Down
Author Topic: Android Bluetooth joystick  (Read 60638 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Comment from Google Play:
Quote
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
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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, :-)].
Logged

0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, OK...

What's about this layout


Four toggle buttons with visual feedback
Relays 2 and 3 are supposed to be energized
« Last Edit: July 20, 2013, 07:27:39 am by kas » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cry

Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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].
« Last Edit: July 20, 2013, 01:45:05 pm by oric_dan » Logged

0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Rafolas, welcome to the forum  smiley

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
Quote
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
smiley-wink smiley-wink smiley-wink
In Android, Buttons and ToggleButtons are different beast... smiley-roll-blue
For the moment, I am creating the option menu for displaying zero, two or four buttons on the screen
« Last Edit: July 20, 2013, 02:31:47 pm by kas » Logged

0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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!
« Last Edit: July 30, 2013, 11:05:18 am by kas » Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7260
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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  smiley-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
« Last Edit: July 22, 2013, 01:54:11 am by kas » Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7260
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You guys are funny. 2 little blue men, ;-).
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7260
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are more of us. Have you looked into the mirror today? smiley-wink
Logged


0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Liudr

Quote
If at some point in the future I get your code, I can learn from it.
A Bluetooth project is probably not the coolest way to start learning Android smiley-roll-blue
There is a lot of video tutorials on Youtube starting from "Hello Word" type
applications and then, gradually, following the (rather steep) learning curve
You will quickly find that Android and Arduino live well together

Please see reply #31
Eclipse IDE is definitly the best tool for serious development

By the way... nice blog http://liudr.wordpress.com/

Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7260
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks kas! I have a stack of books on unix. It's never easy to learn to program on a new operating system but if I can hack your program to do a few things (or maybe just use your program), I think I will motivate myself to get a few books on android. At the moment raspberry pi is pulling me in so I may have to wait to learn the android.
Logged


0
Offline Offline
Sr. Member
****
Karma: 18
Posts: 401
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
...but if I can hack your program to do a few things (or maybe just use your program), I think I will motivate myself to get a few books on android
If you really can't wait, send me a PM with your email address  smiley-wink
« Last Edit: July 25, 2013, 02:01:58 pm by kas » Logged

Pages: 1 2 3 [4] 5 6 ... 24   Go Up
Jump to: