|
Re: Teaching "C" to 2006 students??
Hi,
We have a couple of interesting programs (some complete and some in progress). Here is a brief description and the source code in VB6. Please use as you please.
1) We connect our PC to the dashboard connection on the OI panel. We drive the robot for 15 seconds on a test field/floor and operate arms. Motions are slow and deliberate. Using pwm01 - pwm04, these four values are captured each second. The program automatically generated C code. This has worked with some success. This is our teach mode. (See CCodeGen.zip)
2) We have another program in two parts. We must finishing gluing them together. :-) One part consists of four timing diagrams showing 15 seconds on the X axis and 0 to 255 on the Y axis. A mechanic (Non-programmer) selects appropriate pwms... and clicks on the graph to build a timing diagram. For example, pwm01 and pwm02 are left/right motors. Make them run for 3 seconds at a value of 200. Then return to 127. (See auto_gen_...zip)
Now, click one button (a single button only)...and wham! The timing diagram data is converted to C code, incorporated into a C file, the code and all the C modules are compiled, linked and loaded. Voila! The mechanic can now program autonomous modes more easily.
This project has the graphs complete and the one button thing complete...need to work on the C conversion and incorporation.
3) Our C translator program --> Virtual Code to control a Virtual Robot for 15 seconds. Can parse most C code now...must figure in arrays, structures and next if..else if loops. Virtual robot turns. Working on movement now. (See Translator_C...zip)
This is what we have been working on. Our team will be meeting two Saturdays each month during the remainder of the year. We hope to polish these programs into something really useful and friendly by kickoff 2006. (With lots of testing using this year's robot).
Regards,
Chuck B.
__________________
Team 342 Programming & Control Systems
Good luck and have fun!
|