Thank you for your thriller with happy end!I built it ... and tested it ... and it DID NOT WORK...
And then I found an error in my code ... so I corrected it, and tested it again ... and it STILL DID NOT WORK! ...
And then I changed R2 to 330k (because I don't have 300k resistors with me) ... and sure enough, this time IT WORKED!!!!
Thank you oh so very much, my friend. Thanks to you, and every one else who's helped me in this little project, I'm well on my way to a finished prototype.
BTW, you can patent this circuit (it is not joke), I am too lazy to do it.





