This should be the simplest calculation ever but its driving me crazy !
I have a counter (CANBusSearchAddress) which increments from 0 to 3000 whilst searching for a device on my canbus. The counter is definitely incrementing and in fact the routine does find the device. All I want to do now is send the search progress percentage to my LCD screen, but its always zero.
Next time you sit in front of a coding-problem.
Start adding serial printing which prints each and every step of a calculation step by step
another ten minutes and you will have found the bug.
The secret is to STOPall assumings
and print really every single step
print CANBusSearchAddress
print CANBusSearchAddress / 3000
print (CANBusSearchAddress / 3000) * 100
@angelina_robert_421
Please do not post the robot's answers to the forum, write your own suggestions.
The forum does not welcome copy-paste from chatgpt.