Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Change the frequency
frequency - frequency in Hz (freq > 0.0)

src/a/d/Adafruit_BBIO-0.0.19/test/test_pwm_setup.py   Adafruit_BBIO(Download)
    def test_pwm_frequency_invalid_value_negative(self):
        PWM.start("P9_14", 0)
        with pytest.raises(ValueError):
            PWM.set_frequency("P9_14", -1)
            PWM.cleanup()            
 
    def test_pwm_frequency_invalid_value_string(self):
        PWM.start("P9_14", 0)
        with pytest.raises(TypeError):
            PWM.set_frequency("P9_14", "11")
    def test_pwm_freq_non_setup_key(self):
        with pytest.raises(RuntimeError):
            PWM.set_frequency("P9_14", 100)
            PWM.cleanup()       
 
    def test_pwm_freq_non_setup_key(self):
        with pytest.raises(ValueError):
            PWM.set_frequency("P9_15", 100)