MPLAB is
Free!
However... I don't believe this version will work with version 2.40 of the C18 compiler (a compiler is what takes the code you write, and converts it to code the robot understands) The C18 compiler is not free, but you should have received it in the kit.
As for the default code, you have 3 choices
- IFI's Default Code
- Kevin Watson's Code
- Make Your Own (very bad decision for 3 days left)
I've used IFI's code in the past, and it works perfectly...
I've also used Kevin's Code, and it works perfectly...
I haven't tried to make my own code from scratch, nor do I even want to imagine it...
I would start with IFI's code as it already has code to make the robot move, and a lot more sample code. Basically, a PWM output will range from 0 to 255 A spike has 2 inputs relayX_fwd and relayX_rev. To make it go forward, fwd must equal 1, and rev must equal 0, and vice versa. If both equal 1 or 0, then the spike will turn off.
Remember semicolons after almost everything;
In a condition statement, remember to use double equal signs == and when setting something, use only one equal sign = [ if (xvariable == 0) reset = 1;]
With Kevin's code, the MPLAB shown above will work. I'm not sure where to quote where it says that you must use MPLAB version 7.4 or below with IFI's code, but I'm pretty sure it says that somewhere (it's not a rule, but the code won't compile with a version 7.4 with IFI's code).
My best advice would be to to go the school and work on an old robot. Put the robot on blocks so it doesn't run off on its own with a computer dragging behind it.
Hopefully this isn't too messy and will aid you in your hard time.