Let's put this file right in your home directory for simplicity. The wget command makes things easy as this can be run from an internet connected Raspberry Pi.
$ wget https://raw.githubusercontent.com/adafruit/Adafruit_Learning_System_Guides/master/Raspberry_Pi_Power_Control/Raspberry_Pi_Power_Control.py
Confirm that the Pi connected to the Cobbler (or Cobbler Plus) and run the script.
To start with, cover the PIR sensor with something, so that it is not activated until you are ready.
The following command will start the program:
$ sudo python3 ./Raspberry_Pi_Stepper_Motors.py
Uncover the PIR sensor and you should see a message saying 'POWER ON' and the little LED on the Powerswitch Tail should light, then turn itself off after 20 seconds.
Now this is all working, you can try attaching a lamp or some electrical appliance to the Powerswitch Tail.
Page last edited March 08, 2024
Text editor powered by tinymce.