Sound Movement icon Sound Movement Stereo mic sound localization triggers left/right scripts to control robot movement, enabling directional responses (turn/move) to audio. Try it →
Asked — Edited

Script Question

Please have a look at this script. Will it run all the way through or will the Halt() command in the first "if" statement cause it to stop before it gets to the "Elseif" section? Thanks for looking.


if ($ADC_Lft_Elbow => 160 )#160-350 is in Centered position
  $Lft_Arm_Centered = 0 #Reset varable 1=not cnetered, 0=centered
  Halt()
ELSEif ($ADC_Lft_Elbow < 160 #Below 160 is not centered
  uartWrite(2, 0, "2,p2480", 0x0d) #Move Lft Elbow Motor down a little
  $Lft_Arm_Centered = 0 #Reset varable 1=not centered, 0=centered
endif

ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

#9  

@DJ Hey no fair, no hangin' out peoples dirty laundry man:P Oops I guess I'm next:)

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#10  

Hey - that's helpful information for David. Far from dirty laundry. At least i suspect he'd see it as helpful:D

#11  

Yes , I do see this as helpful. Looking at the dates listed these were back in december when I was having "qiote" issues because I was having trouble with understanding Bianery among other things. You made some changes in ARC and I made some adjustments and that issue was solved.

I don't mind my "dirty laundry" hanging out for all to see. Hopefull others can learn from my mistakes. I know I try to. LOL. I don't fear failure at all. However, it does get flustrating sometimes. ;)

I went through all my scripts again last night and was able to get them all to eun error free. No Debug popup bugging me. I'm sure I'll make more as I move along. It seems like I cant write a script without an error popping up after the first draft. I'll be sure to use the debug wondow from now one. Thanks again. :)

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#12  

That's excellent to hear! Happy robot:)