Sayzer: Today I had time to put your words into code, I tought that I understood it, but now I see I dont

Here is what I uderstood from you schematic idea:



Did I getit wrong?

I dont have a clue (again) on how to detect on software that the battery went off.

Any help would be greatly appreciated. Thanks!!!