Fixes LEDBarGraph (broken by snowpi updates) and adds PWM support and
relevant recipes
This commit is contained in:
Dave Jones
2016-04-01 19:05:18 +01:00
parent d1669b80d9
commit 8fc4b58ec2
7 changed files with 2424 additions and 2176 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 108 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 348 KiB

View File

@@ -638,6 +638,17 @@ connected to a :class:`MCP3008` analog to digital converter::
with MCP3008(channel=0) as pot:
print(pot.value)
Present the value of a potentiometer on an LED bar graph using PWM to represent
states that won't "fill" an LED::
from gpiozero import LEDBarGraph, MCP3008
from signal import pause
graph = LEDBarGraph(5, 6, 13, 19, 26, pwm=True)
pot = MCP3008(channel=0)
graph.source = pot.values
pause()
Measure temperature with an ADC
===============================