Show Posts
Pages: 1 [2] 3 4 ... 27
16  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: August 02, 2014, 04:48:59 am
My suggestion:  Keep . It . Simple   smiley-wink

Start with a program that parses data received from Android and just does that
It's final mission is to display (X,Y) joystick position and report button pushes
For data feedback to Android, just aknowledge button status on datafields phone screen.
You will find it much more confortable not to care about robot, motors and sensors at this development stage

Your PC screen should look pretty much like that:

In a second step, you may add debug facilities to your program
You will then chase communication errors and possibly adjust timing and code to reduce them
 - Joystick errors
 - Buttons errors
 - data frame errors
 - total data frames received

One Joystick (trapped) error out of 17530 received frames, not bad with Bluetooth

This is my Print debug function that reports possible errors:
void printDebug(int nByte)  {
static int buttonErr=0, joyErr=0, frameErr=0;
static long frames=0;

  if(nByte==2)     {                                                                // button data   < STX X ETX >
    if(cmd[1]>64 && cmd[1]<77 && cmd[2]==ETX)  {
      Serial.print("buttonStatus: "); Serial.print(buttonStatus);
      Serial.print("  bin: ");        Serial.println(getButtonStatusString());    
      Serial.print("Button: ");
    }  else { buttonErr++;   Serial.print("** Button error **: "); }

  else if(nByte==7)  {                                                             // Joystick data   < STX  XXX YYY ETX >
    boolean dataOK = cmd[1]>48 && cmd[1]<52 && cmd[2]>47 && cmd[2]<58 && cmd[3]>47 && cmd[3]<58
                  && cmd[4]>48 && cmd[4]<52 && cmd[5]>47 && cmd[5]<58 && cmd[6]>47 && cmd[6]<58
                  && cmd[7]==ETX;
    if(dataOK)           Serial.print("Joystick: ");                              // digits within range
    else                { joyErr++;   Serial.print("** Joystick error **: ");  }

  else         { frameErr++; Serial.print("** data frame error **: "); }          // wrong Byte number
  Serial.print("< ");                                                             // print incoming Bytes
  for(int j =0; j<nByte+1; j++)   { Serial.print(cmd[j]); Serial.print(" "); }
  Serial.print(">  ");  

  Serial.print(buttonErr); Serial.print("-");                                     // print errors status
  Serial.print(joyErr);    Serial.print("-");  
  Serial.print(frameErr);  Serial.print("-");

Finally, adapt a copy of your program to drive the ActivityBot

Two questions --
1. Does the data sent have to include values for all data fields?  Or can some be left out?
No, just send the delimiters:
 - Standard frame:
< STX   Buttons state   0X01   DataField#1   0x04   DataField#2   0x05   DataField#3   ETX >
 - DataField#2 and #3 omited:
< STX   Buttons state   0X01  DataField#1  0x04   0x05  ETX >

2.  When the button status is sent to the android device, is it echoed back to the bot?
It was the case in V4, now fixed in V5
MCU feedback did generate a "onCheckedChanged" Android event that trigged a new button data frame to MCU
In some situation, data could flow back and forth and gererate buttons flickering
Now button info sent from Android to MCU is echoed back (Buttons state) by MCU to Android, that's it

Good luck   smiley-wink

17  Topics / Robotics / ** Joystick BT Commander V5.2 ** on: August 01, 2014, 12:05:17 pm
     Joystick BT Commander V5.2   now available

More info here
18  International / Réalisations et Projets Finis / Re: Robot d'inspection piloté par Androïd on: August 01, 2014, 11:56:34 am
un truc que je trouverais sympa ce serait que tu deporte l'option joystick auto-return sur l'ecran principal
ou que tu propose sur l'ecran principal en cas d'option auto-return = off , un petit bouton (à proximité du joystick) forçant le centrage

implémenté dans la Version 5.2
Merci de tester et de me faire un feedback  smiley-wink
19  Using Arduino / Networking, Protocols, and Devices / ** Joystick Bluetooth Commander V5.2 ** on: August 01, 2014, 10:44:12 am
Joystick Bluetooth Commander Version 5.2  has just been published on Google Play

Change log
new features:
 - Manual return to center Button is displayed when "Auto return to center" is unchecked (thanks Artouste)
 - "automatically flip if device turned upside down" is now an option, to maintain compatibility with
     early Android versions  (thanks joepro)
 - Additional on screen Option button for new devices w/o dedicated Menu button (thanks twm47099)

 - Fixed possible racing conditions at App start up (flickering buttons)
 - Various minor improvements

  Demo sketch:   AndroTest V2.0   (communication protocol unchanged)    see reply #256

  Total RC Commander (with live video display) is also available.    Demo

Please contact me via PM

Enjoy  smiley-wink

20  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: July 29, 2014, 01:10:29 am
I'm using a Propeller MCU.  I have C and Forth programs I wrote (using yours as a basis) for the previous protocol.  I've got to make a few changes for the new protocol. 


I started learning MCU's using Basic Stamps, I would really appreciate to have AndroTest V2.0 demo sketch
ported to the Propeller environment and offered to the Parallax Community.

Keep us aware of your progress, be sure you will get full support for this task   smiley smiley smiley

21  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: July 28, 2014, 01:08:23 am
Thanks that worked
Glad to help

Where did you find that?
I used a new service called "Search Engine"   smiley-wink  smiley-wink  smiley-wink
Try it:

Can you connect now to your Arduino ??

22  Using Arduino / Networking, Protocols, and Devices / Samsung Galaxy Tab 4 ** Menu button ** on: July 27, 2014, 11:59:36 am
Samsung has finally killed the dedicated menu button, replacing it with a task-switching key  smiley-eek-blue

Try pressing and holding this left button for a few seconds
Should bring the Option menu

Let me know if it works  smiley-wink
23  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: July 27, 2014, 12:05:28 am
Hi Tom

I have BT turned on, but I have not yet paired it to a device. 
Does that make a difference?
No, you should access option screens w/o pairing

I've downloaded version 5 to my Samsung tablet 4. 
I cannot find a way to get to a settings screen.
Are you talking about this one ??

Let me know
24  Topics / Robotics / Re: Bluetooth robotic dancer on: July 09, 2014, 08:58:59 am
if i add ur software to my robot it will be nice

Hi caymanguy,
Nice bot ,  thanks for sharing  smiley

I also use this App for controlling my own balancing robot, (now with MPU-6050 gyro/acc combo)

You may see the Bluetooth card, vertically plugged on the breadboard

25  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: July 08, 2014, 03:05:40 am
I can't really get onto google play and download the app from China
can anybody send me the app to my email (
or send me another link to download
thank you very much!

Hi magicjackho, welcome to the Forum
Check your mail smiley-wink

I sent you V5.2 to be published on Google Play within a few weeks
Should you need support, this is the place

Let me have a screenshot of the Application

@All     ** I NEED screenshots **
this my only way to optimize display layout for your specific device  smiley

Personal advice:
To avoid spamming, I suggest you edit your message and remove your email info   smiley-evil

26  Using Arduino / LEDs and Multiplexing / Re: LED control via Android smartphone on: July 08, 2014, 12:46:03 am
Joystick Bluetooth Commander is now Version 5.1

Code should be updated with new communication protocol
More info here and here

27  Topics / Robotics / Re: Bluetooth robotic dancer on: July 08, 2014, 12:29:12 am
Code has been updated to be compatible with Joystick BT Commander V5.x

More info here and here

28  International / Réalisations et Projets Finis / Joystick bluetooth Commander V 5.02 on: July 06, 2014, 05:31:30 am


SCREEN_ORIENTATION_SENSOR_LANDSCAPE  permet le retournement de l'affichage si on retourne l'appareil
Cette option est disponible uniquement à partir de Gingerbread (V2.3   API 9)

Dans le but d'unifier mon code, en évitant les "forks",
Je t'envoie, par mail,  Joystick bluetooth Commander V 5.02

- Vérifie que l'appli s'affiche correctement au lancement (LANDSCAPE par défaut)
- Va sur Options/advanced users/orientation et vérifie que SENSOR_LANDSCAPE ne plante pas l'appli

Tu pourras ainsi obtenir les MAJ suivantes, normalement, sur Google Play

29  Topics / Device Hacking / Re: Upgrage Parrallel CNC machine to Arduino on: July 03, 2014, 11:59:09 pm
i have an  CNC machine from china a year ago and i didnt use it because the motor not moving smooth,
Had the same problem  smiley-roll-blue
Replaced the driver card with this one (microsteps = 800 steps/mm)

and went to USB control

Works pretty well now  smiley-cool
Have a look here
30  International / Réalisations et Projets Finis / Re: Robot d'inspection piloté par Androïd on: June 27, 2014, 12:07:56 pm
Avance sur ton projet, on verra comment modifier l'App
Une possibilité sera d'utiliser l'un des boutons disponibles, pour cette tâche
Pages: 1 [2] 3 4 ... 27