mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	Add print temperature to CPUTemperature example and add temperature property to docs
This commit is contained in:
		| @@ -87,10 +87,12 @@ class CPUTemperature(InternalDevice): | ||||
|  | ||||
|         # Use minimums and maximums that are closer to "normal" usage so the | ||||
|         # bar graph is a bit more "lively" | ||||
|         temp = CPUTemperature(min_temp=50, max_temp=90) | ||||
|         cpu = CPUTemperature(min_temp=50, max_temp=90) | ||||
|  | ||||
|         print('Initial temperature: {}C'.format(cpu.temperature)) | ||||
|  | ||||
|         graph = LEDBarGraph(5, 6, 13, 19, 25, pwm=True) | ||||
|         graph.source = temp.values | ||||
|         graph.source = cpu.values | ||||
|  | ||||
|         pause() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user