Since I knew this would take a lot of work, first I built a hardware in the loop simulator.
I used Proto Shield for the leds, pots resistors etc.
Add all the Analog Inputs necessary
Speed control
Tortoise/Rabbit control- moderates speed control for indoor vs outdoor use.
Use LED’s for information
Power +
Power –
Loop timing
This allowed me to get all of the code working without blowing anything up.
I also took the time to setup configuration control.
I used TortoiseSVN & ssh & existing Ubuntu server. Took a bit to setup, but works.
Allows use of throw-away code. I Checked in each working change, then I try new ideas and throw it away if it doesn't work.
However, it turns out its easier to check into Google code than you own Ubuntu server!
Right away I ran into problems with the Display Shield. It was meant for pretty graphics, not useful work. I had to write my own 7 segment display.
I also found out that the driver code for the display locks out interrupts way to long. It was bad enough, it affected the HIL simulator. It also affected the A/D converter. I tweaked the driver code to minimize the lock-out time. I tried various other tricks (like nested interrupts) but the Arduino did not support them.
No comments:
Post a Comment