Android Bluetooth joystick

That fixed it however there is a 2 second delay from last known position till the motors quit

Want a fast Dead Man ??

replace
long deadManInterval = 1100; // interval between Dead Man checks (milliseconds)
by
long deadManInterval = 550; // interval between Dead Man checks (milliseconds)

Want it faster ?? just let me know :wink:

I am really happy how this is progressing . I can't wait till my telemetry parts come in

Let me know the actual resistors values as soon as you receive them
You can get them right away at your local RadioShack

My local radio shack only had 4.7k 1/2 watt resistors so I will be using 3 of those .

Would it be better to use a zener diode since my voltage may change ? (Not now but may in future)

Résistors are OK

Let me know if 1 second signal drop is OK for Dead Man safety, and please let me have a copy of the modified code

The deadman works perfect, thanks :slight_smile:

Code is attached.

AndroTest_Servo_fullspool_V1.2.ino (7.74 KB)

Here is a new video .

The deadman works perfect, thanks :slight_smile:

finally :wink:

Battery monitoring

Please make sure you understand what you are doing, both on the hard and software sides
You may google for "voltage divider" "arduino"

solder the three 4.7K resistors in series
connect both ends to battery <+> and <->
connect analog input A0 as per drawing

4.7K 4.7K 4.7K
<+> ----///---///-|-///---- <->
|
A0

Before actually connecting to Arduino board, check voltage with a DVM
should read 4 to 4.5 Volts (not 8 to 9V :astonished: )
I don't know your setup, if you have more than one power supply, make sure that grounds are connected

Upload and run AndroTest_Servo_fullspool V1.3
Battery level should be displayed with two decimal digits in DataField #1
Let me have a video including phone screen

AndroTest_Servo_fullspool_V1.3.ino (8.22 KB)

hi... i am new .... i have 1 arduino uno ent 1 motor shield adafruit motor / stepper /servo shield... ent 1 adafruit servo shield...
how to conect the shield adafruit whith rover 5 robot platform? sory for the bad english i am greek ent i don know veri good english... pliz foto how conect the shield whith rover ent how conect the ultra sonic sensor whith arduino?

imail:
pantelis4ever1@hotmail.com

Sorry odin25, I have no experience with those shields.
May be somebody will jump in for additional information
I suggest to raise the question on the Adafruit website

kas:
finally :wink:

Battery monitoring

Please make sure you understand what you are doing, both on the hard and software sides
You may google for "voltage divider" "arduino"

solder the three 4.7K resistors in series
connect both ends to battery <+> and <->
connect analog input A0 as per drawing

4.7K 4.7K 4.7K
<+> ----///---///-|-///---- <->
|
A0

Before actually connecting to Arduino board, check voltage with a DVM
should read 4 to 4.5 Volts (not 8 to 9V :astonished: )
I don't know your setup, if you have more than one power supply, make sure that grounds are connected

Upload and run AndroTest_Servo_fullspool V1.3
Battery level should be displayed with two decimal digits in DataField #1
Let me have a video including phone screen

Thank you for the suggestions, I understand the hardware side no problem it's the software side that confuses me. :slight_smile:

I built the circuit and at 11.7 Vin I get 3.8Vout , on full charge lipo I get 12.3 Vin and 4.1 Vout so we are with in range for a 3S Lipo battery. I will load the sketch and make a video tomorrow but in the mean time can you explain to me how it's working in the program? I don't understand the formula.

but in the mean time can you explain to me how it's working in the program? I don't understand the formula.

for 0 Volt, analogRead(Vpin) value is 0
for 5 Volts, analogRead(Vpin) value is 1024
If you measure a 0 to 5V voltage (no Voltage divider)

voltage = 5 * analogRead(Vpin)/1024

for 12V, Voltage divider divides value by 3 (4.7/9.4+4.7)
so we need to adjust back the value (multiply by 3) to obtain real voltage

voltage = analogRead(Vpin) * (5.0/1024) *3 = analogRead(Vpin) * 0.0146484375

Google will explain it in better English than I can do :wink:

Thank you I will continue my research . :slight_smile:

On a side note , I made a new video showing the real time voltage display. I will do further testing tonight and tomorrow but everything looks good so far .

Excuse the wiring mess .

https://youtu.be/F8BKWDSwAM4

Looks prefect :slight_smile:

Don't forget you can customize buttons and datafields captions in the option menu
You can also hide unsused buttons for a cleaner screen

What about using button #2 for

  • Normal: half speed
  • Turbo: full speed

Let me know when you receive the current sensor

That sounds like an excellent idea for button #2 ! I will adjust the app to remove buttons soon, Im spending more time reading then seeing what the app is capable of :slight_smile:

Is the app open source ? I didnt see an apk posted anywhere. It would cool if we could adjust background graphics and move the data fields around.

Thank you for helping me kas, I am very grateful and have learned so much.

This is very crude but something like this . I can make a better one in photoshop if needed . :slight_smile:

That sounds like an excellent idea for button #2 !

// V1.4 added Turbo function (Button #2)

fullspool, I sent you a PM

AndroTest_Servo_fullspool_V1.4.ino (8.38 KB)

Is the app open source ?

Joystick BT Commander (free App) is the base of Total RC Commander (paid App)
The App is not open source for the moment

kas:
Joystick BT Commander (free App) is the base of Total RC Commander (paid App)
The App is not open source for the moment

Please let me know when you make it open source as I'd love to learn from it .

I noticed when I power up the ardiuno board the AUX servo twitches 1 time . Do you know what causes this ?

I noticed when I power up the arduino board the AUX servo twitches 1 time . Do you know what causes this ?

Most hobby servo's have this problem
Have a look here

Well it's not because of anything your are doing or not doing. Here is the problem, typical hobby servos are designed such that anytime they are powered up they need to be receiving a continuous and valid position control pulse. A servo that has DC power on but no position control pulse being received, is in a undefined state and no assumptions can or should be made as to what behavior the servo should exhibit while you either hold down reset switch. Once you send a valid servo.write command to the servo, the servo library code automatically keeps sending that same position output command at a standard servo update rate, around every 20ms ...
If it important to try and eliminate this behavior then you need to think about about possible solutions. One possible method might be to have the power wired to your servo be controlled on and off by your sketch via an output pin controlling a relay which would then route power on or off to the servo. That way your servo can be set-up in software first and then turn on the digital output to switch power to the servo.

In setup, try moving myservoA.write(90); just below myservoA.attach(pinServo_A);
You may also drop myservoA.write(90);, but it may not be safe

kas:
Most hobby servo's have this problem
Have a look here
In setup, try moving myservoA.write(90); just below myservoA.attach(pinServo_A);
You may also drop myservoA.write(90);, but it may not be safe

I tried moving the coding around and also deleting myservoA.write(90) , none of the options worked . :frowning:
I also tried the turbo button but when I hit button 2 the rover just takes off by its self with no stick movement. Is this how you design the program? or should I be expecting something different? I am learning more and more everyday. I am glad there are people like you to help out us dreamers. :slight_smile:

Thank you for the suggestions.

I tried moving the coding around and also deleting myservoA.write(90) , none of the options worked

no surprise, please remove modifications

I also tried the turbo button but when I hit button 2 the rover just takes off by its self with no stick movement. Is this how you design the program? or should I be expecting something different?

:o :o :o (surprised)
No, rover shouldn't move when stick is 0.0
I double checked code, everything seems OK

Please check again on your side
also confirm that datafield #3 does display "Turbo " when pressing button #2
EDIT: also check ESC calibration (zero fine tuning)

I am glad there are people like you to help out us dreamers. :slight_smile:

Thanks 8)