|
Vex Programming
well, I got my programming kit and i had a little fun turning on leds. i've been working on controlling them with a joystick on the remote using the hardware pwm available on the first four motor connectors. and i've just ordered a couple of sharp gp2d12 ir distance sensors so maybe i can get it to stop before it runs into the cat.
i was wondering if anyone else has been doing any coding for the vex. anyone have any observations, questions, secrets to share?
the sample code at vexlabs seems to be pretty clear. i've managed to dope out where most everything connects from the header files and have made a little table which can be seen at theEntropyWorks.com. motors 1-4 as i mentioned are connected to 4 of the 5 hardware pwm modules on the 18f8520 in case anyone wants to try to control a real dc motor through an h-bridge.
the vex motors run at a very low frequency with a period of 18ms and a duty cycle of 1-2ms, like hobby servos. this is too slow for the hardware pwm.
better hit send, here, before my session times out and i have to type everything over, again.
|