Show Posts
Pages: [1] 2 3 ... 20
1  Using Arduino / Networking, Protocols, and Devices / ** Total RC Commander V1.1A ** on: April 03, 2014, 11:22:23 am
Quote
@tolisn63

Quote
1. Is it possible to change the orientation of the settings screen so it is the same as the main control screen ?
2.Also it would be nice if the data receiving fields could also accept incoming text.
Will look into that matter  smiley-wink

You got it smiley-wink smiley-wink smiley-wink
check your mail

Total RC Commander V1.1A
 - Data fields now accept integers, floats and text messages
 - Improved video management
 - adjustable Option screen orientation

 

Important:
To allow text messages, Arduino to Android communication protocol has been modified
Please use and adapt "AndroTest_PlusV12_string.ino" demo sketch

Let me have your feedback and a screenshot for your specific Android device

@all
Joystick BT Plus (6 buttons, 3 datafields)
and
Total RC Commander (video from IP camera)
will be available on Google Play within a month for a symbolic fee

In the meantime, please contact me via PM

Next version: remote control using built-in accelerometers (see reply #165)  smiley-razz

Enjoy
2  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 31, 2014, 12:47:15 am
@tolisn63
Quote
I just tried out the new sketch. It is working great. All button now work as well as the data fields.
Also the camera has very little lag (<0.5sec) after  I switched it to a lower res. (320x240) which is absolutely usable.
Thanks for the good new  smiley-cool smiley-cool smiley-cool

Quote
1. Is it possible to change the orientation of the settings screen so it is the same as the main control screen ?
2.Also it would be nice if the data receiving fields could also accept incoming text.
Will look into that matter  smiley-wink

Quote
one question, when the buttons are pressed and the color becomes green, does the tablet do that or is it feedback from the arduino ?
This is the real button position
 - button first becomes green "locally" as an Android feature
 - position is then sent to Arduino
 - Arduino sends back the actual button position
See replies #36 and #73

A good example is toggle (momentary) buttons
Button is set green by Android and reset white by Arduino  after 250 milliseconds, to create a visual effect.

Quote
thanks for all your hard work.
Looking forward to trying your newest version.
smiley
3  Topics / Robotics / Re: R/C Rover 5 platform on: March 25, 2014, 02:21:06 am
I use an Android smartphone to control my Rover 5



Have a look here

4  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 23, 2014, 03:25:38 am
juycce,

There are other glitches in your code

Code:
joyX = map(joyX, -180, 180, 180, 0); 
 joyY = map(joyY,  -100, +100, -255, 255);

Second and third parameters should match App Option > Adv properties > Data Range
and should be identical for both joyX and joyY

Did you test the code example at reply #146 ?

For additional help, the Motors Mechanics and Power section seems adequate

Keep us informed  smiley
5  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 22, 2014, 01:40:20 am
Yes,  using servo library with DC Motor makes no sense smiley-roll

Standby is enabled and never driven high again
Code:
  } else if(joyY = 0)  {
      digitalWrite(STBY, LOW); //enable standby

Classical error  smiley-wink
Code:
} else if(joyY = 0)  {        // assignment operator, always TRUE !! 
should really be
Code:
} else if(joyY == 0)  {         // comparison operator, the way to go

Sample code for DC motors here
Take the easy way, build separate codes for DC motor and servo, make sure they both work, and finally combine them

@nemesis159
How is the new layout I sent you for Joystick BT Plus ?
Please post a screen shot
6  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 21, 2014, 01:19:41 am
Quote
I'm trying to use this sketch to send rpm data from arduino to this application, but do not understand how data is sent    smiley-roll-blue smiley-roll-blue

Data has to be sent as a positive Byte (0 to 127)
You need to scale RPM value in order to stay within this interval
If your RPM range is 0 to 12000:
Code:
byte GetdataByte()  {
  double data = rpm / 100;
  data = constain(data, 0, 127);            
  return byte(data);
}

To overcome this 127 steps limited resolution, I will switch from byte to integer in next Joystick BT Plus version
7  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 20, 2014, 02:06:47 am
Quote
I'm trying to use this sketch to send rpm data from arduino to this application, but do not understand how data is sent   smiley-roll-blue smiley-roll-blue

Will you use Joystick bluetooth Commander/4 button version, or Joystick BT Plus/6 button version ??
(different communication protocols)

How do you obtain RPM data ??  via encoder(s) ??
Did you allready build the code for RPM data aquisition ??

How is the new layout I sent you for Joystick BT Plus ?
Please post a screen shot
8  Using Arduino / Networking, Protocols, and Devices / ** Joystick BT Plus V1.0 ** on: March 17, 2014, 01:38:14 am
Quote
hi kas, you could upload the apk with 6 buttons and 4 data   smiley-lol smiley-lol smiley-lol smiley-lol

Sorry nemesis159, I missed your recent PM  smiley-red

The 6 buttons, 4 data bytes App is now released as Joystick BT Plus
The actual number of buttons and data fields is adjustable within the Option menu
Fields and buttons labels are fully customizable



Road map:
Next revision will include an option to perform control using the android device built-in accelerometers
Control will be performed by tilting the smartphone/tablet  smiley-cool
Within this option, joystick will be "read only", reflecting the device inclination.

Please send me your email via PM


9  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 14, 2014, 04:15:42 am
@juycce
Quote
Great job KAS , i test again and you was right,your app works great with Android 2.3.5,and the HC-06 also compatible (bad thing is i don't receive any data,i can only send) smiley-grin:D    so...
You mean data from Arduino to Smartphone ??
Provided the connection is established, it should work  smiley-roll
You may have to drop SoftSerial communication if you still use it
Please post your current Arduino sketch

Quote
Based on your replay at post #146 i am trying to modify the arduino code with your permision, so that on vertical move a DC Motor, and the orizontal a Servo (for steering)...
 the joyY control Vertical joystick movement, and "joyX" the horizontal right ?
Right


@wildatheart
Quote
Along with all others, again.. GREAT APP!  Nice layout.  Easy to use.  And all functions work as designed.  Can even send data now.
Glad it works, thanks for the comments  smiley

Quote
it has happened that the yellow stick will lock itself in a position other than "center",  usually about the 10 o'clock or the 5 o'clock location.  It seems to lock position at about 1/3 the distance from center to the outer ring.  I've seen it happen 3 or 4 times in testing.
I tried and couldn't reproduce this "feature"
What is your App version ?? (Option > About...)
When the freezing occurs,
 - is the BT connection established
 - what is the displayed joystick position

Quote
It would be nice if your APP could receive and display a text message.  ie "X axis is clear", "Pump 3 flow rate set to  40%", "Press B1 to launch"  etc.
I will think about it  smiley-wink

Quote
I am experimenting with a continuous rotation servo.  I may be able to correct this in my own software but as it is - when the stick is released 3 or 4 readings are sent before the stick settles into the center position.  The affect of this is the lack of ability to stop the servo rotation at a precise point.
I understand the point
I may be wrong, but a joystick is not supposed to work that way
For my pan/tilt servo device, I just uncheck Auto return to center (Option > Joystick behavior)
I get a precise positioning, no need to return to center
Am I missing something ??

Quote
Joystick  is a GREAT educational opportunity to learn about Bluetooth control and most will find a way to incorporate it in their projects as is.  Thanks for sharing your work
Thanks, comments appreciated  smiley


Still working on my new toy (see reply #152)
For the moment, I am busy tuning my PID motors (more info), while monitoring battery level (8.2V)
I just toggle buttons Up or Down; the actual values are displayed in the data fields.
10  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 13, 2014, 06:27:08 am
Quote
If I could submit a longer text string to the App in the "data" area the current location of the stick would be okay
The data field can display a positive signed Byte (0 to 127), not a text string

Quote
I guessing the problem is because the Quickstart seems only accept correct data with rx set at  9600, so I can only tx at 9600 too.  Any chance the baud rate can be selectable or otherwise changed in the App?
There isn't any Baud rate value within Joystick BT Commander code
The Baud rate setting is only for communication between BT card and microcontroller, _NOT_ between Android device and BT card
Try sending   2  4  14  3
the Data field should display 14-4=10, while keeping all buttons to the OFF position

Quote
I intend to submit your App (with due credit) along with my work to the forums in the near future.
What is your current project ??
Please give my regards to my friends from the Alternate Univers (Parallax)  smiley-wink
and post a link here when done
11  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 10, 2014, 05:14:27 am
Quote
Joystick BT Commander is working perfectly with the LG G2 phone, the Adafruit  EZ-link 315a bluetooth, and the Parallax Quickstart demo board.
Nice to hear, I started learning microcontrollers with Basic Stamps  smiley
http://forums.parallax.com/showthread.php/103850-Yet-another-balancing-robot?daysprune=-1

Quote
Not sure what "Data XXX" is used for.  Is there any chance the MCU can send and display a serial message in your APP?
YES !!!      see reply #74
Joystick BT Commander listens to the MCU and expect a 4 Byte data frame
            <STX    button status Byte    data Byte (your choice)    ETX>

This is the relevant code snippet in the Arduino demo sketch (V10.3):
Code:
 mySerial.write(STX); mySerial.write((button<<2)+4); mySerial.write(data+4); mySerial.write(ETX); // +4: avoid 0x2 & 0x3

There is another version with 4 data bytes and 6 buttons

For those interested, contact me via PM


Quote
The joystick image is displayed a little above center but that's okay
I need that type of feedback, please let me have a screen shot of the App on your LG G2 phone


12  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 07, 2014, 06:35:06 am
@wildatheart
also for billcat and others  smiley-wink
Quote
Hello Kas.

Thank you for sharing your joystick app.  I am reading 6 bytes (decimal)  2, 1, 72, 1, 72, 3.  I understand the 2 & 3 are framing bytes.  And I also understand that 1 is the MSB and 72 is the LSB, and I believe you subtract 200 (decimal) to eliminate negative values.  But I do not understand the relationship between 173 and 0 being at the center.  Would you please tell me how these values relate to 0,0 with stick in center position.

Thank you

Joystick data is transmitted as an integer = 2 Bytes (Most Significant Byte + Less Significant Byte)
according to this data frame:
         <STX  MSB-X  LSB-X  MSB-Y  LSB-Y  ETX>


This is the relevant Android (Java) code snippet from Joystick Bluetooth Commander:
Code:
    final int XvalB = Xval + 200;
     final int YvalB = Yval + 200;
     if((((Xant!=Xval) || (Yant!=Yval)) || (mTimeoutCounter>=mMaxTimeoutCount && mMaxTimeoutCount>-1)))   // joystick position changed, or timeout occurred
     sendMessage( new String(new byte[] {STX, (byte) (XvalB / 128), (byte)(XvalB % 128), (byte)(YvalB / 128), (byte)(YvalB % 128), ETX } ));

So, for Xval=0 Yval=0:
  XvalB = YvalB = 200
  XvalB / 128 = YvalB / 128 = 1
  XvalB % 128 = XvalB % 128 = 72
Data frame:   <2  1  72  1  72  3>

for Xval=100 Yval=100:
  XvalB = YvalB = 300
  XvalB / 128 = YvalB / 128 = 2
  XvalB % 128 = XvalB % 128 = 44
Data frame:   <2  2  44  2  44  3>

The data frame is send via BlueTooth to the arduino board and decoded.
This is the Arduino code snippet from Joystick Bluetooth Commander:
Code:
 int joyX = (data[1]<<7) + data[2];
  int joyY = (data[3]<<7) + data[4];
  joyX = joyX - 200;               // Offset to avoid
  joyY = joyY - 200;               // transmitting negative numbers

VoilĂ     smiley
Should you have additional questions, let me know

EDIT:
The 6 button, 4 data field App and the video App both have a slightly different protocol
(STX & ETX values are different)
13  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: March 02, 2014, 09:55:50 am
Quote
It may be off/topic but I hope you don't mind if I put a link to my robot here: https://www.youtube.com/watch?v=E7C9-4SR41o&feature=youtube_gdata_player
You are very welcome  smiley

This his my own work in progress:


The bot is based on a Rover 5 frame
PID motor control yet to be finalised
14  Using Arduino / Networking, Protocols, and Devices / Re: Android Bluetooth joystick on: February 27, 2014, 04:08:54 pm
@Bill
thanks for the feedback

Quote
I think the joystick may still be moved slightly more to the right yet.
The version I sent you yesterday should take care of that

Quote
I also think there may be a slight problem when choosing to view the data  as bytes sent....see screenshot.  Seems to be missing the closing ")"  and possibly some data
Can see that, to be fixed in next revision

Quote
Perhaps I am mistaken, I still remain very unclear on how 1's and 0's are sent and received!
Welcome is the communication protocols Univers  smiley-twist smiley-twist smiley-twist

Quote
I cannot seem to get anything out of the haptic feedback options,
This option brings a vibrating feedback when moving the joystick
It is device dependant (works on my Motorola G, doesn't work on my Galaxy Tab3)
This feature is useless, to be removed in next build

Quote
Also, I do have some interest regarding the Beta testing for video.  I do not own an IP camera, but that is a simple fix  smiley-money
Let me know when you are ready


@powermik
Quote
Just (re-)discovered your software and this thread. Is there a possibility for a second joystick?
Sorry no plan for a second joystick
As most of us, my limiting factor is time  smiley-neutral
I am currently building a R/C tank with built in IP camera; my focus is embeding the video stream in the App
15  Using Arduino / Networking, Protocols, and Devices / Call for beta tester(s) on: February 25, 2014, 01:33:16 am
I am finalising the video embeded application



and need another beta tester with a different IP camera brand (Foscam or others), not Wanscam
Please contact me via PM
Pages: [1] 2 3 ... 20