mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	Add a pwm option to the RGBLED and Motor constructors
				
					
				
			...along with the other necessary changes required, to allow them to optionally be used with non-PWM-capable pins
This commit is contained in:
		| @@ -28,7 +28,7 @@ PWMLED | ||||
| RGBLED | ||||
| ====== | ||||
|  | ||||
| .. autoclass:: RGBLED(red, green, blue, active_high=True, initial_value=(0, 0, 0)) | ||||
| .. autoclass:: RGBLED(red, green, blue, active_high=True, initial_value=(0, 0, 0), pwm=True) | ||||
|     :members: on, off, toggle, blink, pulse, red, green, blue, is_lit, color | ||||
|  | ||||
| Buzzer | ||||
| @@ -40,7 +40,7 @@ Buzzer | ||||
| Motor | ||||
| ===== | ||||
|  | ||||
| .. autoclass:: Motor(forward, backward) | ||||
| .. autoclass:: Motor(forward, backward, pwm=True) | ||||
|     :members: forward, backward, stop | ||||
|  | ||||
| Base Classes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user