A C++ program that handles the Pi Supply switch