[tst1.py] Added functions to set period and duty