Trying to create a little program to monitor a few things on a treadmill and having a problem. Here is the code I have come up with:
My code should be attached if I did that much correctly. Least I forget this is for an Arduino Uno.
The multiMsp relates to a PWM percentage in. The PWM to the motor relates to the MPH (Miles Per Hour) of the belt and as can be seen it is a non linear function. I want a Serial.print at the bottom to read out my MPH and for the love of me can't get it. Everything else reads out fine. I am aware many of the math functions could have been shortened but left it as is so the person who uses this may better understand all the steps. Eventually the data will be displayed on a 4 X 20 LCD but for now I just am happy with the serial monitor.
I am not a programmer type, I am a 70 year old retired EE who years ago, at best, wrote a few small software routines for data acquisition using VB 6.0. Playing around with micro-controllers keeps me busy in old age, not that 70 is old.
So if any of you kind people could tell me how to get that last step I would most appreciate it.
One more question. I attached my .ino file using attach. Can code tags be used as
Thank You
Ron
Freq_Count4.ino (1.52 KB)