Skip to content

Commit fb0c4c6

Browse files
author
Melissa LeBlanc-Williams
committed
Fixed some example code blocks
1 parent 681ae91 commit fb0c4c6

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

adafruit_featherwing/alphanum_featherwing.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ def print(self, value):
4848
"""
4949
Print a number or text to the display
5050
51-
:param value: The text to display
52-
:type value: str, int or float
51+
:param value: The text or number to display
52+
:type value: str or int or float
5353
5454
.. code-block:: python
55+
5556
from adafruit_featherwing import alphanum_featherwing
5657
5758
display = alphanum_featherwing.AlphaNumFeatherWing()
5859
display.print(1234)
60+
5961
"""
6062
self._seg14x4.print(value)
6163
self._seg14x4.show()
@@ -75,6 +77,7 @@ def marquee(self, text, delay=0.25, loop=True):
7577
7678
display = alphanum_featherwing.AlphaNumFeatherWing()
7779
display.marquee('This is some really long text ')
80+
7881
"""
7982
if isinstance(text, str):
8083
self.fill(False)
@@ -93,16 +96,17 @@ def _scroll_marquee(self, text, delay):
9396

9497
@property
9598
def blink_rate(self):
96-
"""Blink Rate returns the current rate that the text blinks.
99+
"""
100+
Blink Rate returns the current rate that the text blinks.
97101
0 = Off
98102
1-3 = Successively slower blink rates
99103
100104
This example changes the blink rate and prints out the current setting
101105
102106
.. code-block:: python
103107
104-
from adafruit_featherwing import alphanum_featherwing
105108
from time import sleep
109+
from adafruit_featherwing import alphanum_featherwing
106110
107111
display = alphanum_featherwing.AlphaNumFeatherWing()
108112
display.print('Text')
@@ -111,6 +115,7 @@ def blink_rate(self):
111115
display.blink_rate = blink_rate
112116
print("Current Blink Rate is {}".format(display.blink_rate))
113117
sleep(4)
118+
114119
"""
115120
return self._seg14x4.blink_rate
116121

@@ -120,15 +125,16 @@ def blink_rate(self, rate):
120125

121126
@property
122127
def brightness(self):
123-
"""Brightness returns the current display brightness.
128+
"""
129+
Brightness returns the current display brightness.
124130
0-15 = Dimmest to Brightest Setting
125131
126132
This example changes the brightness and prints out the current setting
127133
128134
.. code-block:: python
129135
130-
from adafruit_featherwing import alphanum_featherwing
131136
from time import sleep
137+
from adafruit_featherwing import alphanum_featherwing
132138
133139
display = alphanum_featherwing.AlphaNumFeatherWing()
134140
display.print('Text')
@@ -137,6 +143,7 @@ def brightness(self):
137143
display.brightness = brightness
138144
print("Current Brightness is {}".format(display.brightness))
139145
sleep(0.2)
146+
140147
"""
141148
return self._seg14x4.brightness
142149

@@ -152,8 +159,8 @@ def fill(self, fill):
152159
153160
.. code-block:: python
154161
155-
from adafruit_featherwing import alphanum_featherwing
156162
from time import sleep
163+
from adafruit_featherwing import alphanum_featherwing
157164
158165
display = alphanum_featherwing.AlphaNumFeatherWing()
159166
@@ -162,6 +169,7 @@ def fill(self, fill):
162169
sleep(0.5)
163170
display.fill(False)
164171
sleep(0.5)
172+
165173
"""
166174
if isinstance(fill, bool):
167175
self._seg14x4.fill(1 if fill else 0)

0 commit comments

Comments
 (0)