OK this program is fairly simple to learn for what I want. I have made a gui that sends commands to my SSC-32. I do want to make momentary push buttons though and cant figure that out. I want my continuous rotation servos(#16 + #17) to be momentarily on. I want to eliminate the STOP buttons and make the move buttons so that when I push down on it the move command is sent and then when I let go it sends the stop automatically.
Hopefully you can see how I am approaching this and advise me on a path to follow.
Here is my code:
[code]open “com1:115200,n,8,1,ds0,cs0,rs” for random as #comm
nomainwin
WindowWidth = 600
WindowHeight = 400
menu #main, "Tasks", "Nuetral Position", [NP]
button #main.button1, "CCW", [button1Click], UL, 235, 150, 40, 25
button #main.button2, "CW", [button2Click], UL, 325, 150, 40, 25
button #main.button3, "Center", [button3Click], UL, 275, 150, 50, 25
button #main.button4, "Stop", [button4Click], UL, 280, 175, 40, 25
button #main.button5, "CCW", [button5Click], UL, 235, 200, 40, 25
button #main.button6, "CW", [button6Click], UL, 325, 200, 40, 25
button #main.button7, "STOP", [button7Click], UL, 275, 200, 50, 25
button #main.button8, "CCWF", [button8Click], UL, 185, 200, 50, 25
button #main.button9, "CWF", [button9Click], UL, 365, 200, 50, 25
button #main.button10, "CCW", [button10Click], UL, 235, 225, 40, 25
button #main.button11, "CW", [button11Click], UL, 325, 225, 40, 25
button #main.button12, "STOP", [button12Click], UL, 275, 225, 50, 25
button #main.button13, "CCWF", [button13Click], UL, 185, 225, 50, 25
button #main.button14, "CWF", [button14Click], UL, 365, 225, 50, 25
open "Test" for window as #main
print #main, "font ms_sans_serif 0 16"
print #main, "trapclose [quit]"
[main.inputLoop] 'wait here for input event
wait
[button1Click]
print #comm, “#0p2250s300”
wait
[button2Click]
print #comm, “#0p750s300”
wait
[button3Click]
print #comm, “#0p1500s300”
wait
[button4Click]
print #comm, “stop 0”
wait
[button5Click]
print #comm, “#16p1480”
wait
[button6Click]
print #comm, “#16p1560”
wait
[button7Click]
print #comm, “#16p1520”
wait
[button8Click]
print #comm, “#16p1440”
wait
[button9Click]
print #comm, “#16p1600”
wait
[button10Click]
print #comm, “#17p1480”
wait
[button11Click]
print #comm, “#17p1560”
wait
[button12Click]
print #comm, “#17p1520”
wait
[button13Click]
print #comm, “#17p1440”
wait
[button14Click]
print #comm, “#17p1600”
wait
[NP]
print #comm, “#0p1500 #1p1500 #2p1500 #3p1500 #16p1520 #17p1520”
wait
[quit]
confirm “Do you want to quit Test?”; quit$
if quit$ = "no" then wait
close #main
close #comm
End[/code]