mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	Add PWMLED, close #58
This commit is contained in:
		@@ -18,6 +18,7 @@ from .input_devices import (
 | 
			
		||||
from .output_devices import (
 | 
			
		||||
    OutputDevice,
 | 
			
		||||
    PWMOutputDevice,
 | 
			
		||||
    PWMLED,
 | 
			
		||||
    LED,
 | 
			
		||||
    Buzzer,
 | 
			
		||||
    Motor,
 | 
			
		||||
 
 | 
			
		||||
@@ -256,6 +256,10 @@ class PWMOutputDevice(DigitalOutputDevice):
 | 
			
		||||
        self._frequency = value
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class PWMLED(PWMOutputDevice):
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _led_property(index, doc=None):
 | 
			
		||||
    return property(
 | 
			
		||||
        lambda self: getattr(self._leds[index], 'value'),
 | 
			
		||||
@@ -263,6 +267,7 @@ def _led_property(index, doc=None):
 | 
			
		||||
        doc
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class RGBLED(object):
 | 
			
		||||
    """
 | 
			
		||||
    Single LED with individually controllable red, green and blue components.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user