loading

Magnetic switch to USB?

Hi, 1st post hope you can help! I'm trying to find a way of getting analog data (from an exercise bike) and store it onto a computer in a text file so I can manipulate it and work out averages etc. I thought of having a magnetic switch on the pedal so that everytime the pedal rotates I can store the time thus giving me the speed. Does anyone know if such a cable already exists or if not how to go about creating one? Also if anyone has a better way of getting the data I'd love to hear from you. Many thanks Adam

sort by: active | newest | oldest
guyfrom7up8 years ago
oooooooo!!! I know! Take a keyboard I don't know if you can do this in a batch file, but I know you can do it in C. Make a simple counter so everytime a button is pressed the counter goes up one. Then manually save that number in a txt file or somehow export it
Yeah I'd do that as well. I'd do it in something like flash though, because the actionscript would be easy and it could have a nice GUI =]
didn't even think of flash maybe cause I only vaguely know how to code with batch and C
Padlock8 years ago
Try Google-ing "parallel port input". I don't know much about it, but you maybe could use some vbs to create program that would count the rotations, times it by the circumference of the wheel (If it has a wheel) and divide it by 5280. As for the hardware, just a magnet and a coil of wire, or a reed switch. If you get a reed switch, make sure its rated for high speed switching, too.
adamt_069 (author)  Padlock8 years ago
excellent and thanks for the quick reply. I'll give it a try and will let you know once I've played with it a while. Thanks again Adam