Calculus and STAMPS
I want to use a STAMP and accelerometer to calculate speed. I need to integrate the g-force to go from meters/second squared to meters per second. Has anyone done integration with a STAMP and if so I would appreciate some input.
Thanks
Toby
Thanks
Toby
Comments
The BS has always been an 8 bit machine and it really prefers math that is close to the machine level, mostly integer counting.
The Propeller has 8 parallel processors and can run much faster than the BS. It also is cheaper at $25 for the 40PIN dip version.
SPIN is an easy language.
IMHO, I don't think you could do much better with· competators' products. The AVRs and such are 32bit with a 8bit I/O, slower clocking, and no parallel processing. Plus the language and their architecture is more complex.
I am begining to wonder why anyone would want to buy a BasicStamp if they understand the choices and the greater value. About the only reason for staying with the BS is that the Propeller is a 3.3volt device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
"Pure" integration assumes that the 'slices' you take in your function are infinitely small. In reality, your Delta-T for a BS2 is going to be some small fixed number -- like 100 mSec. So instead of adding up a bunch of dv/dt, you'll be adding delta-V / 100 mSec.
Now, this also assumes you have "accurate" time -- which the BS2 doesn't really give you. So your answer is going to have some 'slop', unless you add a co-processor to give you true 50 mSec (or 100 mSec) 'ticks' to go by.
Post Edited (TG) : 8/7/2006 11:59:53 PM GMT
Once problem IS understanding the choices... I chose the BS2 because I wanted to get my feet wet in micro-controllers and one frequently mentioned product is the BASIC Stamp. An initial visit to the Parallax site gave me a confusing array of choices: BS1, BS2 along with its e, sx, p40, pe, px, p24, and JS1 variants. Then there were a bunch of robots and some sort of Propeller thing.
I gave up trying to decide until I spotted the "What's a Microcontroller?" book and parts kit at Radio Shack. It looked like everything I needed to get started, so I bought it and had an LED blinking within 30 minutes of opening the package. I must be on the right track, my wife said, "$80 to make that light blink?!"