The easiest way to control the treadmill is to simulate button presses, the original MCU will take care of changing the speed and stopping/starting the treadmill.
So the Arduino code should look like this :
Loop
{
check serial port for commands
if we receive a valid command, then simulate a key press
}
There is only 3 switches on the control panel :
- slower
- start/stop
- faster
The plan is to connect some Arduino pins to those switches, but first we need to check if the switches are connected to the ground or to VCC: They are connected to the ground, so it in the code we must set the pins to HIGH on init and set them to low when we want to simulate a key press.
So we just solder 4 jumper cables on the panel board, 3 for the switches and one for the ground and we will connect them to the Arduino.
So far it is working!
I tried to set pin connected to 'faster' to LOW for 500ms and it simulated 2 key presses. I lowered the timing to 250 ms and now it is reliable!
I will quickly upload the code here.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.