“If else” will be the downfall of humanity… May 4, 2006
Posted by Matthew Rosenbrock in Strokes of Genius, Testing, Uncategorized.add a comment
Set the scene: Late Wednesday evening. The entire project must be functional by the following afternoon. But the velocity calculations continue to be erratic. WHY?
Enter Matt.
Matt: Hey, should this "if else" statement just be an "if"?
Jon: Uh…yeah.
Matt: That would be dumb if that solved the whole problem.
Jon: Yeah. Let's try running it.
Running code.
Jon: It seems fine now.
Matt: Son of a B!t&#!
And so ended the war between code and coder.
Sensor Tests March 10, 2006
Posted by hackinjat in Testing.add a comment
So today we were able to get the bicycle sensor working, and have a pretty good idea of what to program to measure velocity. Basically the sensor works like a transducer using the hall effect: the output voltage varies as the magnetic field density changes.After attaching wires to the leads on the cycle computer mount on the handlebars, the sensor gives out a square wave signal when the magnet mounted on the spokes passes by.
Measuring the wheel speed from this should be pretty simple. The DSP recognizes a pulse whenever the voltage output goes from low to high (we might want to amplify this). Obviously, we could use the time between pulses and the wheel circumference (to the magent) to calculate the average velocity.
The question is, do we want to mount more than one magnet on the wheel?