'Demonstrates a Dios connected to a SN754410 'Set pin to port connections in the init function func main() print "reset" initMC() again: MC_m1fwd() MC_m2rev() pause 3000 MC_m1rev() MC_m2fwd() pause 3000 goto again endfunc 'You must call this function before calling ' The others. You can also change the pinout. func initMC() 'Set up some contstants gconst Enable1 13 gconst Enable2 4 gconst M1InputA 0 gconst M1InputB 1 gconst M2InputA 2 gconst M2InputB 3 'Set port direction output Enable1,M1InputA,M1InputB output Enable2,M2InputA,M2InputB endfunc 'Motor1 forward func MC_m1fwd() high M1InputA low M1InputB high Enable1 endfunc 'Motor1 Reverse func MC_m1rev() low M1InputA high M1InputB high Enable1 endfunc 'Motor2 forward func MC_m2fwd() high M2InputA low M2InputB high Enable2 endfunc 'Motor2 Reverse func MC_m2rev() low M2InputA high M2InputB high Enable2 endfunc 'Motor2 stop func MC_m1stop() low Enable1 endfunc 'Motor2 Stop func MC_m2stop() low Enable2 endfunc