Electron - How to tell if a battery is connected

This is actually difficult to detect. The code sample in the last comment to this post works, however.

2 Likes