You have an old-fashioned exercise bike that can’t show up any data when you’re peddling and exercise with it? You wish to make a little modification on it with a multi-meter connected to cables out of the exercise bike?
Oh well, it’s time to have some fun with your exercise bike now…
First thing first, find one cable from the front “wheel”, where it’s a cable that going up to the “computer”. Differential the handlebar sensors and the pulse meter, which the pulse meter works with reading the change in resistance of your skin.
Then, you’re hooking the multi-meter to the cable from the wheel. You can set your connection to beep, when there was a connection detected by the multi-meter. You must make sure that both of them are beep, either you’re moving the pedals or the wheel is moving.
After that, you cut the wire in two and hook those up to the Arduino. Remember to solder the largest resistor, which you can find in the electronic scrap box on one of the cables.
Below here is the code for the Arduino part:
int ledPin = 13; // LED
int inputPin = 2; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
int lastval =0; //statemachine variable
long counter =0; //dont want to owerflow if we’d like to use this for something later
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input
val = digitalRead(inputPin); // read input value
if (val == HIGH )
digitalWrite(ledPin, LOW); // turn LED OFF
digitalWrite(ledPin, HIGH); // turn LED ON
//print the value of the counter, not really used by the processing sketch anyways
counter++; //increase counter
Have a nice day with your e-bike and remember to sweat yourself with it!