Soundboard V2 (PC) icon Soundboard V2 (PC) — Play MP3/WAV via PC sound output with timeline scripts to trigger movements, auto-position actions, and optional looping for synced routines Try it →
Canada
YouTube
Asked — Edited
Resolved Resolved by CochranRobotics!

Set(Digital Port,On/Off) Questions

I'm having a problem getting the Set(digital port,on/off) to work. If I run this code, it works....once.


Set(1.D22,on)
Sleep(300)
servo(1.D22,90)
sleep(5000)
servo(1.D22,40)
sleep(5000)
servo(1.D22,90)
sleep(5000)
servo(1.D22,130)
sleep(5000)
servo(1.D22,90)
sleep(2500)

Set(1.D22,off)

When I run it again, the servo does not move. The code runs without any errors. The only way I can get it to work again is by shutting down the program and the EZB's and restarting. I must not be doing something right, the port is turned off by the command (i can hear that in the servo) but the Set On command doesn't turn it back on.


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

#9  

I clearly did not understand the Set On and Off command. Thanks Dave and Alan for explaining it and you were right, the Release command was what I needed.