def on_btn50_pressed(self, pin, data = None): os.system("halcmd setp hm2_5i20.pwmgen.pwm_frequency %f" % freq)