I thought I should start this thread again as the last was getting confusing (for me)
My submarine sketch is complete, other than for a failsafe routine. The attached sketch is the full routine with lines added at 8, and 184 – 197, based on some code I was provided here. I have a 36 MHZ Tx, and when it is turned off the input, normally between 1100 and 1900, fluctuates wildly, so it should be perfect for failsafe pick up.
The lines I have added are working on 4 seconds. When I load the sketch everything operates perfectly until 4 seconds. Then failsafe is activated without the Tx being turned off. I clearly need to add something to these lines about the Rx input fluctuations, but where do these go? I want everything to work normally until the Tx is turned off, then after 4 seconds failsafe is activated. It is a sub so a lag is fine.
Cheers John.. this thing is nearly done!
subsketchlatest15failsafe.ino (19.7 KB)