
/Note you may want to set the Run controls to run on power up
/This is done in the Setup and Tools menu then Board parameters
/With the board connected to your computer
/Follow the instructions on that screen 


/Flash the On board LED
ledflash		/Start up line label
output 15 on		/turn off the led
wait 5			/Delay
output 15 off		/Turn on the LEd
wait 5			/Delay
output 15 on		/turn off the led
wait 5			/Delay
output 15 off		/Turn on the LEd
wait 5			/Delay

dsr1=50			/Set the speed

move 10,000		/Move the servos to the home position
/address 10,000 has the base positions for the servos
/When the program is started this is the first movement 

/Next is a wait loop this loop will wait until input 1 is make high
/Once the output is made high, the program will continue on
/When your code finishes, you can send the program back to home
/You may want to send it back to ledflast

home				/Just a label
if input 1=0 goto home		/the ifinput instruction for input 1


output 15 on			/Just a fast led flash
wait 2
output 15 off
/You may want to remove the above lines
/You can also rem them out like this this line is ignored
/output 15 on


move 10,001	/First Position setup 
/Mouth closed head stright forward no tilt and eyes wide open
/when the move is complete the controller will go on to the next line
move 10,002	/First Position setup 
/Mouth open head left no tilt and eyes wide open
move 10,003
/Mouth center head right no tilt and eyes wide open

/You can repeat the moves using the loop command
do 3
move 10,001
move 10,002
move 10,003
loop

/Now make rwo fast moves
dsr1=200		/Change the speed

do 3
move 10,002
move 10,001
loop

dsr1=50			/Change the speed back
goto home


end




/Note S1 mouth s2 neck rotate s3 neck tilt s4 eyes
Address 10,000		/Set the servo positions for four servos
Position s1=12,500 s2=15,000 s3=15,000 s4,17,500
/Mouth closed head stright forward no tilt and eyes wide open
/Next position will be 10001 etc.

Position s1=17,500 s2=12,500 s3=15,000 s4,17,500
/Mouth open head left no tilt and eyes wide open

Position s1=15,000 s2=17,500 s3=15,000 s4,17,500
/Mouth center head right no tilt and eyes wide open

Position s1=12,500 s2=17,500 s3=15,000 s4,17,500
/Mouth closed head right no tilt and eyes wide open

