My reply was late. I'm sorry.
As soon as I woke up today, I conducted a test.
First of all, I uploaded the code you taught me and checked the serial monitor continuously, but there was no change in the value of the monitor, whether it was turned off or off. Even though I tried to operate the controller, the value continued to point to zero.
You can find the results of this experiment in the Code Test - 1 video attached at the bottom.
However, I think you taught me the above code to check the difference between the pulse delivered by Transmitter and the pulse emitted by Arduino itself, or if there is a significant difference when the signal is sent from Transmitter.
We've checked the pulse with the actual circuit running by inserting the code right above into the existing drive code.
You can check the results of the experiment in the Test-2 video below.
As shown in the video, there was no difference in the actual pulse value whether the controller was turned on or off (AUX was not used during the experiment).)
However, turning the steering knob on the controller strongly showed a drop in pulse value or a very large jump. How's it going in Arduino?
Perhaps if we create a condition with one 'inverse value', we can signal that it is an urgent situation and switch from Auto mode to Manual mode.
Additionally, I did one more test. It was difficult to check the value with a serial monitor, so it was to use a serial plotter to check the pattern of pulse changes due to the presence or absence of a signal.
The results were pretty positive.
As you can see in the following Test - 3 images, without the controller turned on, the pulse's maximum point was specified (no matter how the car was operating.
There was a pulse maximum point that was still visible with the controller turned on, but this clearly showed a different value than when it was not turned on.
If I code it so that it can be used as a trigger, I think I can expect something good.
Anyway, thank you so much for helping us reach so many developments.
If you think of a good algorithm as a trigger to enter manual and automatic mode with the experimental results above, please leave a comment at all times.
Thank you always from the bottom of my heart, and I wish you all the luck and happiness today.
-Doyoon-
Test1
Test2
Test3