So, I'm losing weight on a rowing machine (dropped almost 30kg so far) and I've thought of a project that will essentially force me to row at, or above a certain pace, unless a switch is flipped.
So the rowing machine I counts the amount of strokes I do using an onboard module, I figure running fires in parallel from from the beeper that beeps every time you do a stroke will be easier than removing the and coding in a counter based off however the machine gets it's stroke data.
Project works like this in theory:
Arduino counts DC pulses and gets an average of strokes per minute (SPM) , if I am doing over, say 26 SPM the ardiunio sets a pin high to light a green LED. If I drop under 26 SPM the ardiunio switches off the green LED and lights a yellow one which will give me about 15 seconds to get back up to speed. If the requisite SPM fails to increase back into the green by this time a red LED lights and a relay is switched on for about 30 milliseconds repeating every 5 seconds until you get back to the target SPM.
Said relay connects to a circuit containing a 9v battery powering a boost converter that produces voltages in around the 10-20kv range, eBay claims they do 500kv however I find this inaccurate as they can only arc over about 3cm. The high voltage leads will go to a pair of flexible electrodes attached to each ankle via a velcro strap.
In short, if you fall behind, you get one hell of a zap. I call it the motivator. It's somewhat inspired by Electroboom's motion detecting run or be zapped device, but is a little more complex.
The question is, as I am fairly new to ardiunio and coding, can an ardiunio do the calculations for an average like that or is it outside the scope of the device?
