Hello
I asked my son to make a program displaying a color based on the distance measured by the ultrasonic sensor.
He realized a program, imperfect, and I can not explain the behavior:
he placed a “forever” instruction inside a touch detection test on the A key on the remote control.
so, normally, after pressing the A key its program falls into an infinite loop, and the led should react as requested green / red …
but in reality, he does not have enough time to press his button, so the led should be blue. (# 00ffbf)
But after downloading and starting the mbot, without pressing the remote control, the LEDs turn green or red depending on the distance ??
(which is normally expected after pressing the key)
So I looked at the code C, that I do not control very well, and in line 20 corresponding to the press on the key A, there is no instruction?
Can you help me understand?
thank you in advance