431Views5Replies

Author Options:

Magnetic switch to USB? Answered

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

Discussions

The forums are retiring in 2021 and are now closed for new topics and comments.
0
guyfrom7up
guyfrom7up

12 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

0
whatsisface
whatsisface

Reply 12 years ago

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 =]

0
guyfrom7up
guyfrom7up

Reply 12 years ago

didn't even think of flash maybe cause I only vaguely know how to code with batch and C

0
Padlock
Padlock

12 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.

0
adamt_069
adamt_069

Reply 12 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