Skip to content

Commit e8baea2

Browse files
author
Martin O'Hanlon
authored
Merge pull request #74 from RaspberryPiFoundation/dev
0.3.0
2 parents e9decca + 5f2d5be commit e8baea2

6 files changed

Lines changed: 29 additions & 22 deletions

File tree

README.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ A beginner-friendly library for using common electronics components with the Ras
1212
led = LED(1)
1313
button = Button(2)
1414
15-
while True:
16-
if button.is_pressed:
17-
led.on()
18-
else:
19-
led.off()
15+
button.when_pressed = led.on
16+
button.when_released = led.off
2017
2118
Status
2219
------

docs/changelog.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ Change log
33

44
.. currentmodule:: picozero
55

6+
0.3.0 - 2022-08-12
7+
~~~~~~~~~~~~~~~~~~
8+
9+
+ Introduced ``Motor``, ``Robot`` and ``DistanceSensor`` classes.
10+
+ Renamed ``LED`` factory ``use_pwm`` parameter to ``pwm`` to match other classes. Note - this is an API breaking change.
11+
+ Resolved issue with ``RGBLED`` when not using ``pwm``.
12+
+ Resolved issue where ``blink`` / ``pulse`` rates of ``0`` raised a traceback error.
13+
+ Other minor bug fixes
14+
+ Documentation updates
15+
616
0.2.0 - 2022-06-29
717
~~~~~~~~~~~~~~~~~~
818

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __getattr__(cls, name):
4747
author = 'Raspberry Pi Foundation'
4848

4949
# The full version, including alpha/beta/rc tags
50-
release = '0.2.0'
50+
release = '0.3.0'
5151

5252

5353
# -- General configuration ---------------------------------------------------

docs/recipes.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,20 @@ Control a passive buzzer or speaker that can play different tones or frequencies
168168

169169
.. literalinclude:: examples/speaker.py
170170

171+
Play a tune
172+
~~~~~~~~~~~
173+
174+
Play a tune of note names and durations in beats:
175+
176+
.. literalinclude:: examples/speaker_tune.py
177+
178+
Play individual notes
179+
~~~~~~~~~~~~~~~~~~~~~
180+
181+
Play individual notes and control the timing or perform another action:
182+
183+
.. literalinclude:: examples/speaker_notes.py
184+
171185
Motor
172186
-----
173187

@@ -191,20 +205,6 @@ Move the rover *roughly* in a square:
191205

192206
.. literalinclude:: examples/robot_rover_square.py
193207

194-
Play a tune
195-
~~~~~~~~~~~
196-
197-
Play a tune of note names and durations in beats:
198-
199-
.. literalinclude:: examples/speaker_tune.py
200-
201-
Play individual notes
202-
~~~~~~~~~~~~~~~~~~~~~
203-
204-
Play individual notes and control the timing or perform another action:
205-
206-
.. literalinclude:: examples/speaker_notes.py
207-
208208
Internal Temperature Sensor
209209
---------------------------
210210

picozero/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__name__ = "picozero"
22
__package__ = "picozero"
3-
__version__ = '0.2.0'
3+
__version__ = '0.3.0'
44
__author__ = "Raspberry Pi Foundation"
55

66
from .picozero import (

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__project__ = 'picozero'
44
__packages__ = ['picozero']
55
__desc__ = 'A beginner-friendly library for using common electronics components with the Raspberry Pi Pico. '
6-
__version__ = '0.2.0'
6+
__version__ = '0.3.0'
77
__author__ = "Raspberry Pi Foundation"
88
__author_email__ = 'learning@raspberrypi.org'
99
__license__ = 'MIT'

0 commit comments

Comments
 (0)