
Control a Cybot from your PalmOS based device and SmallBASIC.
If you have comments or questions about my hardware pages, try this forum.
Warning ! Using any non free programming language could be fatal for your Cybot (lockups, viruses, transistors blowing ...). For cool open source on PalmOS visit www.palmopensource.com ;-)
Below, you can take a look at a SmallBasic program which shows you the basics to move your Cybot with the Palm.
'0Px xx' commands are described in the servo controller's documentation. As the AVR controller is able to generate PWM signals, you can control the motors speed with a 8 bits precision.
In my setup, outputs 0 to 3 of the AVR based controller are wired to pins 0 to 3 of motor board. So with a:
Warning !!! As always do not turn on forward AND backward pins (i.e. '0P0 xx' and '0P1 xx' with xx>=01), or you will burn the motor controller board !
' pwm.bas ' open the serial port at 9600 bauds OPEN "COM1:9600" AS #1 ' reset all outputs print #1, "0P0 00\n" print #1, "0P1 00\n" print #1, "0P2 00\n" print #1, "0P3 00\n" delay 3000 10 print #1, "0P0 00\n" print #1, "0P1 00\n" print #1, "0P2 00\n" print #1, "0P3 00\n" ' move forward slowly during 1 sec print #1, "0P0 30\n" print #1, "0P2 30\n" delay 1000 ' move forward at full speed during 2 sec print #1, "0P0 ff\n" print #1, "0P2 ff\n" delay 2000 ' move forward slowly during 1 sec print #1, "0P0 30\n" print #1, "0P2 30\n" delay 1000 ' make a U Turn print #1, "0P0 47\n" print #1, "0P2 00\n" print #1, "0P3 47\n" delay 400 goto 10 close #1
Of course, you can use the 5 General Purpose Inputs/Outputs of the AVR controller to implement object avoidance, and so on ...
You can also post your questions on this forum: Atmel AVR projects on SF.net