View Single Post
Old 05-10-2009, 07:03 PM   #1182 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
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.
__________________
kits and boards
  Reply With Quote