From 5f336ad2b290b2b63227149424145c63b9f6b421 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Tue, 19 Apr 2016 22:16:42 +0100 Subject: [PATCH] Make Potentiometer Recipe more efficient --- docs/recipes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/recipes.rst b/docs/recipes.rst index ed02720..7b26bc2 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -676,8 +676,8 @@ connected to a :class:`MCP3008` analog to digital converter:: from gpiozero import MCP3008 - while True: - with MCP3008(channel=0) as pot: + with MCP3008(channel=0) as pot: + while True: print(pot.value) Present the value of a potentiometer on an LED bar graph using PWM to represent