the gyro works great,only jd does the motion twice?
Community Robot Questions Gyro,motion Runs Twice PRO Nomad 6R Belgium Asked Jul 2015 — Edited Jul 2015 Resolved by CochranRobotics! Gyro,Motion Runs Twice Skip to comments Jump to end the gyro works great,only jd does the motion twice? Upgrade to ARC Pro Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine. Compare Pro Features View Subscription Plans Nomad 6R PRO Belgium #17 Jul 2015 ControlCommand("MPU9150", Init) sleep(100) :loop #Added these because $AccelX and $AccelY were not recognized print("Start of loop") $XAccel = $AccelX $YAccel = $AccelY if ($AutoPositionStatus = true) print("AutoPositioner already running...") sleep(2000) goto(loop) endif ControlCommand("MPU9150", RunOnce) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) if ($YAccel > 8000) print("Getting up from front") ControlCommand("Auto Position", AutoPositionAction, "Getup") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) ELSEif ($YAccel < -8000) print("Getting up from rear") ControlCommand("Auto Position", AutoPositionAction, "stand from sit") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) endif sleep(500) $XAccel = $AccelX $YAccel = $AccelY print("End of loop...Restarting") goto(loop) thank you d.cohran Nomad 6R PRO Belgium #18 Jul 2015 forgot to check solved Steve G United Kingdom #19 Jul 2015 Great solve David, and I'm pleased you got everything sorted now nomad. Nomad 6R PRO Belgium #20 Jul 2015 steve g thats two jd's getting up now.d.cohran is good programmer. «« « 1 2 3 Login to post a comment
PRO Nomad 6R Belgium Asked Jul 2015 — Edited Jul 2015 Resolved by CochranRobotics! Gyro,Motion Runs Twice Skip to comments Jump to end the gyro works great,only jd does the motion twice?
Nomad 6R PRO Belgium #17 Jul 2015 ControlCommand("MPU9150", Init) sleep(100) :loop #Added these because $AccelX and $AccelY were not recognized print("Start of loop") $XAccel = $AccelX $YAccel = $AccelY if ($AutoPositionStatus = true) print("AutoPositioner already running...") sleep(2000) goto(loop) endif ControlCommand("MPU9150", RunOnce) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) if ($YAccel > 8000) print("Getting up from front") ControlCommand("Auto Position", AutoPositionAction, "Getup") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) ELSEif ($YAccel < -8000) print("Getting up from rear") ControlCommand("Auto Position", AutoPositionAction, "stand from sit") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) endif sleep(500) $XAccel = $AccelX $YAccel = $AccelY print("End of loop...Restarting") goto(loop) thank you d.cohran
ControlCommand("MPU9150", Init) sleep(100) :loop #Added these because $AccelX and $AccelY were not recognized print("Start of loop") $XAccel = $AccelX $YAccel = $AccelY if ($AutoPositionStatus = true) print("AutoPositioner already running...") sleep(2000) goto(loop) endif ControlCommand("MPU9150", RunOnce) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) if ($YAccel > 8000) print("Getting up from front") ControlCommand("Auto Position", AutoPositionAction, "Getup") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) ELSEif ($YAccel < -8000) print("Getting up from rear") ControlCommand("Auto Position", AutoPositionAction, "stand from sit") waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel) endif sleep(500) $XAccel = $AccelX $YAccel = $AccelY print("End of loop...Restarting") goto(loop) thank you d.cohran
Steve G United Kingdom #19 Jul 2015 Great solve David, and I'm pleased you got everything sorted now nomad.
ControlCommand("MPU9150", Init)
sleep(100)
:loop #Added these because $AccelX and $AccelY were not recognized print("Start of loop") $XAccel = $AccelX $YAccel = $AccelY
if ($AutoPositionStatus = true)
print("AutoPositioner already running...")
sleep(2000)
goto(loop)
endif
ControlCommand("MPU9150", RunOnce) $XAccel = $AccelX $YAccel = $AccelY print ("x: " + $XAccel) print ("y: " + $YAccel)
if ($YAccel > 8000)
print("Getting up from front")
ControlCommand("Auto Position", AutoPositionAction, "Getup")
waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY
print ("x: " + $XAccel) print ("y: " + $YAccel)
ELSEif ($YAccel < -8000)
print("Getting up from rear")
ControlCommand("Auto Position", AutoPositionAction, "stand from sit")
waitfor($AutoPositionStatus = false) $XAccel = $AccelX $YAccel = $AccelY
print ("x: " + $XAccel) print ("y: " + $YAccel)
endif
sleep(500) $XAccel = $AccelX $YAccel = $AccelY
print("End of loop...Restarting") goto(loop)
thank you d.cohran
forgot to check solved
Great solve David, and I'm pleased you got everything sorted now nomad.
steve g
thats two jd's getting up now.d.cohran is good programmer.