Step 44Motor testing sketch
Again sketch attached as a text file, copy and paste it into a new arduino sketch window.
NOTE:
Updated February 25th 2012
It works with Arduino V22. They have now released a newer version (V1.0) with a new softserial library with slightly different softserial commands so it might not work with very latest version of Arduino.
The deadman switch on pin 9 has to be working for this to work. The IMU can be connected or not connected up yet, it does not matter.
When deadman button pressed, the motors will turn the same way (anti-clockwise) and increase in speed in 10% increments until at 50% of maximum power, then decrese in 10% increments and finally come to a stop.
If they turn clockwise, then reverse polarity of each pair of motor wires where they connect to Sabertooth until they both turn anti-clockwise when this test routine is carried out.
Video of this test being done can be seen here:
http://www.youtube.com/watch?v=cyVWiURRCgg
| « Previous Step | Download PDFView All Steps | Next Step » |



























































































without pressing deadmanswitch motors turns byself..
it logs level 10 without turning motors.
and when pressing button then motors wont even turn.
I did add 12k pulldown resistor also
ou are NOT Pressing Dead Man Button so all power has been cut
level 0.00
You are NOT Pressing Dead Man Button so all power has been cut
level 10.00
You are NOT Pressing Dead Man Button so all power has been cut
level 20.00
level 30.00
You are NOT Pressing Dead Man Button so all power has been cut
level 40.00
You are NOT Pressing Dead Man Button so all power has been cut
level 50.00
level 40.00
You are NOT Pressing Dead Man Button so all power has been cut
level 30.00
You are NOT Pressing Dead Man Button so all power has been cut
level 20.00
You are NOT Pressing Dead Man Button so all power has been cut
level 10.00
You are NOT Pressing Dead Man Button so all power has been cut
level 0.00
You are NOT Pressing Dead Man Button so all power has been cut
level 10.00
You are NOT Pressing Dead Man Button so all power has been cut
I did change for your connection deadman switch to pin 9 and thru 1,8kohm resistor to +5V now it works, kindof..
it spins motors by own and stops after all levels but if I push button down it runs thru all levels once from 0...50...0
not sure should it be like this, but I think it works :)
Make sure wheels are going in same direction, if not one of your motor wires are back to front.
John
John
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at processing.app.Sketch.setCurrentCode(Sketch.java:1106)
at processing.app.Sketch.load(Sketch.java:218)
at processing.app.Sketch.(Sketch.java:140)...
Any Advice? Thanks