UPS PIco HV3.0A Firmware Code 040 Print Date 18.08.2017
Designed and Manufactured by PiModules and ModMyPi
www.pimodules.com www.modmypi.com
BS Example 2
nd
-
Simple Raspberry Pi® ON/OFF executed
100 times for 1 minutes (ON/OFF
every minute)
We need to start up - set ON - the Raspber
ry Pi®, keep it running for 1 minutes, shutdown it,
and after 1-minute start it again. This will be repeated 100 times.
Time_Scheduler_Selector
= 0x00;
Select the Basic Scheduler
BS_duration_time
= 0x01;
Sets duration time to 1 minute (Raspberry Pi® wil
l run
for 1 minute and then shutdown)
BS_repetition_time
=0x02;
Sets repetition time to 2 minutes (Raspberry Pi® will
started again after 1 minute when shutdown)
BS_multipier
= 0x64 (100);
This will be repeated 100 times
BS_ RUN
=0x01;
When user decide, just activate the Basic Scheduler
The data entering should looks like below (it important to follow the below order to avoid
any mistake in programming):
1.
Make sure to select the
BS
as a current scheduler
sudo i2cset -y 1 0x6b 0x19 0x00
for making BS as selected scheduler
2.
Enter
BS Duration Time
, on our case it is 1 minute
sudo i2cset -y 1 0x6b 0x1A 0x01
for duration time 1 minute
3.
Enter
BS Repetition Time
, on our case it is 2 minutes
sudo i2cset -y 1 0x6b 0x1B 0x02
for repetition time 2 minutes
4.
Enter
BS Multiplier
, on our case it is infinitive
sudo i2cset -y 1 0x6b 0x1C 0x64
for 100 times running
5.
Check if programmed values are OK, by running the below python script
sudo python status_bs.py
If everything is as expected, run the Basic Scheduler
sudo i2cset -y 1 0x6b 0x1D 0x01