Pages: 1 ... 17 18 [19] 20 21 22   Go Down
Author Topic: Android Bluetooth joystick  (Read 53921 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
God Member
*****
Karma: 12
Posts: 912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Kas,

I made a first test with a turet of servos. I have a problem and servos are "ticking" even if there is no command.
The problem is more visible when I am in "FAST" mode (compare to the "SLOW" mode)

Because my english is very poor I made a video:


Do you understand the problem? How can I do to solve it?

Thanks!

Par ailleurs tu m'avais demandé un imprim écran de l'appli, la voici en PJ.



* Screenshot_2014-06-22-13-20-01.png (106.73 KB, 1920x1080 - viewed 11 times.)
« Last Edit: June 22, 2014, 08:32:39 am by john_lenfr » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hi All,
Ive been using this app (v5) for my remote controlled filling cabinet project. https://vimeo.com/98759560
Kas has been helping intensively both with customizing the app and the Arduino code.
Attached is the final code I used, incl distance sensor feedback & Battery level and lots more.

Hardware: Arduino mega, DC Motor Driver 2x 15A - Lite,  BT2S Bluetooth to Serial Slave, HC-SR04 Distance Sensors, Pride electric wheel chair, blood sweat and tears. You can find more making of videos on: https://vimeo.com/jaapdemaat/videos.


For info
Jaap is a senior graphic designer, based in Rotterdam and London
The Cabinet ("I Know What You Did Last Summer") is currently exhibited at the Royal College of Art, in London, up to June 27th


@Jaap,
Thanks again for your hospitality in London, I really enjoyed entering your universe for a while


« Last Edit: June 29, 2014, 10:03:34 am by kas » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Je n'ai pas encore testé en détail (j'ai remarqué qu'il y a pleins d'options)mais je voulais te féliciter pour ton travail qui a l'air énorme!

Les seuls points négatifs que j'aurais à redire sont sur la communication de ton programme, mais je te rassure ce sont des points de détails comparé au reste de ton travail:
- Tu devrais éditer ton premier post pour mettre ton versionning en sens inverse: le plus récent en haut de la liste (on a plus l'habitude que ce soit dans ce sens et ça perturbe pour trouver la bonne info)
- Pour les renvois vers les posts des version etc fais juste un lien hypertext sur le post en question par exemple si tu parles de la réponse #256 tu la transforme en #256 c'est de suite plus pratique.
- Pour le coté GooglePlay met un lien direct vers le programme exemple (fichier .ino) car sinon il faut venir sur ce post, chercher la dernière version, et ensuiite se rendre à la réponse #256 pour enfin faire un copier/coller du code: le nombre de manip est rebuttant et cela peut causer problème pour une personne qui s'y connait pas trop mais qui voudrait utiliser ton appli.
Thanks  john_lenfr for the comments, feedback is always welcome
I will definitely add more links to reply #1  smiley-wink


Quote
I have a problem and servos are "ticking" even if there is no command.
not normal behavior  smiley-roll-blue smiley-roll-blue
Possibly electric noise or MCU internal timers interaction
please post your full code, I will try it on my side

What happens if you comment
Code:
 sendBlueToothData();

Let me know

EDIT: which Arduino model are you using ??
« Last Edit: June 24, 2014, 11:34:35 am by kas » Logged

Offline Offline
God Member
*****
Karma: 12
Posts: 912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

not normal behavior  smiley-roll-blue smiley-roll-blue
Possibly electric noise or MCU internal timers interaction
please post your full code, I will try it on my side
You wrote here that Softserial doen'nt work with servo lib. It is always true?


Quote
What happens if you comment
Code:
 sendBlueToothData();
The problem is less visible but ticking  is always here smiley-sad (and data 3 is not updated on Android screen of course)
Quote
Let me know
Here is my starting skech I use attached.

* JBC1.ino (9.63 KB - downloaded 4 times.)
Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You wrote here that Softserial doen'nt work with servo lib. It is always true?
Try
https://www.google.com/search?hl=en&as_q=%22SoftwareSerial%22+%22servo%22+%22library%22+arduino&as_epq=&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=&as_occt=any&safe=images&tbs=&as_filetype=&as_rights=&gws_rd=ssl
 and see for yourself  smiley-wink

I tried your sketch, removing Wire and snootor references; serial monitor readings are 100% stable
Please upload Pan & Tilt demo sketch at reply #242

//  Arduino pin #0 to TX BlueTooth module
// BT TX to be disconnected from D0 during sketch upload
// pinServo_X=9        pinServo_Y=10

Do not use SoftwareSerial for the moment, let me know how it works
Which Arduino board are you using ??

Logged

Offline Offline
God Member
*****
Karma: 12
Posts: 912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is the lib that I have to choose because the link is your google search?

Quote
I tried your sketch, removing Wire and snootor references; serial monitor readings are 100% stable
Please upload Pan & Tilt demo sketch at reply #242
Yes, I saw that values are OK and 100% stable.

Quote
//  Arduino pin #0 to TX BlueTooth module
// BT TX to be disconnected from D0 during sketch upload
// pinServo_X=9        pinServo_Y=10
Do not use SoftwareSerial for the moment, let me know how it works
Which Arduino board are you using ??
Tested your Pan&Tilt V3.6 there is no ticking, but when I test it servos are not staying in position (but I think it is because of the code):


So, what is the last Softserial I have to choose to do the last test?

My board is an Uno, you can't see it on vids?  smiley-mr-green
Logged

Offline Offline
God Member
*****
Karma: 12
Posts: 912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So now I will test the first program, but with 0 and 1 serial

EDIT: Ok I tested with Demo code AndroTest V2.0 and no ticking but same problem as the video on post above
« Last Edit: June 22, 2014, 02:44:00 pm by john_lenfr » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For the servo's test, please go to "settings/joystick properties" and uncheck "Auto return to center"

So, the servo's are jerking, but the values are stable in the serial monitor ??
Are the servo's jerking only near joystick limit positions (-100 or +100) ??

I remember having problems with digital servo's, some years ago  smiley-roll
some wouldn't accept the total 0 to 180° rotation range

Just to make sure, please modify code to limit range to 45 to 135°
Code:
 joyX = map(joyX, -100, 100, 135, 45);
  joyY = map(joyY, -100, 100, 45, 135);  


if it works, you may try
Code:
 joyX = map(joyX, -100, 100, 170, 10);  
  joyY = map(joyY, -100, 100, 10, 170);

« Last Edit: June 23, 2014, 02:21:02 am by kas » Logged

Offline Offline
God Member
*****
Karma: 12
Posts: 912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok I will test it soon as possible.

Many thanks for quick replies smiley-wink
Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just tried running two servo's using SoftwareSerial on pins #2 & #3, and also got the "Tick-Tick syndrom"
SoftwareSerial disables interrupts while sending a byte.
This interferes with the Servo library, which relies on timer interrupts

The hardware Serial port should always be used, if possible, before considering SoftwareSerial.
Additional readings

Possible options
- drop SoftwareSerial and use pins #0 and #1 (disconnect pins before uploading sketch)
- try using ServoTimer2 or AltSoftSerial libraries that use a different timer (not tested)
- get an Arduino Mega which has additional hardware serial ports


« Last Edit: July 08, 2014, 12:02:01 am by kas » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Jaap, this is FilingCab V1.6
PWM frequency was boosted from 490Hz to 20KHz to get rid of hissing noise at low speed
Also the infamous SoftwareSerial library was dropped  smiley-evil

Serial:
- move pin #11  to  RX1 (pin #19)
- move pin #12  to  TX1 (pin #18)

PWM:
- move pin #5   to  pin #11
- move pin #6   to  pin #12

Smoother and quieter control

Happy driving, mind the stair  smiley-wink



* FilingCabV16.ino (14.01 KB - downloaded 13 times.)
« Last Edit: June 23, 2014, 03:15:13 pm by kas » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@tolisn63
Quote
Quote
Any idea when Total RC commander will be available with the new protocol and a test sketch ?
Will wait for Joystick BT commander V5.0 feedback
Would say two or three weeks

The video App is now ready for test
Same demo sketch as Joystick BT commander V5.0

Check your mail and let me have your feedback  smiley-wink
Logged

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

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
thankyou very much!
« Last Edit: July 16, 2014, 05:56:36 am by magicjackho » Logged

0
Offline Offline
Sr. Member
****
Karma: 17
Posts: 395
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can't really get onto google play and download the app from China
can anybody send me the app to my email (xxx-xxx@qq.com)
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

« Last Edit: July 30, 2014, 09:59:12 am by kas » Logged

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

I've downloaded version 5 to my Samsung tablet 4.  I cannot find a way to get to a settings screen.  I have BT turned on, but I have not yet paired it to a device.  Does that make a difference?  How do I find a settings screen.

Thanks
Tom
Logged

Pages: 1 ... 17 18 [19] 20 21 22   Go Up
Jump to: