I want to be able to use the remainder of a math operation in a program.
I want an LED output to flash on-off based on object distance, and I want it to change with 20 cm of movement change in the object, so that I get a “strobe effect” when I move my hand back and forth in front on a distance sensor.
What is a command for recording the remainder of a number? For example, I will divide the sonic sensor reading by a value corresponding to 20 cm, and will be looking at the size of the remainder to determine if the LED is set to on or off.
If anyone has a cheat sheet for other math operators, like absolute values, this would help too.
Thanks - Marc Wheeler