You got that right, Charlie! I tried 128 samples, 64, 32, (I like powers of 2. hehe) 16, 8, 4, 2, and 1. 16 was the best. If the stupid LEM current sensor wasn't so dang noisy, I probably could do only 8 or 4, but 16 feels really nice, so who cares. I'll email you the zipped up version of the code.
It's really a work in progress, so it's not presentable at all at this point. Lots of global variables, everything happening inside the interrupt, so occasionally it will take so long that the next interrupt doesn't happen, but that doesn't affect at all how the car feels. could you PM me your email address? The zipped up file I think is too big for being on here. I'll try though.
Uh oh, My attachment limit has been exceeded. I guess the "PM me your email" approach is best.
|