Skip to content

Commit b29a880

Browse files
author
Martin O'Hanlon
authored
Merge pull request #63 from RaspberryPiFoundation/dev
v0.2.0
2 parents 723772d + 9f028ee commit b29a880

File tree

6 files changed

+22
-5
lines changed

6 files changed

+22
-5
lines changed

docs/changelog.rst

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

44
.. currentmodule:: picozero
55

6+
0.2.0 - 2022-06-29
7+
~~~~~~~~~~~~~~~~~~
8+
9+
+ Compatibility fix LED
10+
611
0.1.1 - 2022-06-08
712
~~~~~~~~~~~~~~~~~~
813

docs/conf.py

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

4848
# The full version, including alpha/beta/rc tags
49-
release = '0.1.1'
49+
release = '0.2.0'
5050

5151

5252
# -- General configuration ---------------------------------------------------

docs/developing.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ Development
33

44
Instructions on how build and deploy picozero.
55

6+
Pre-requisites
7+
--------------
8+
9+
To build and deploy picozero, you need to install the dependencies ::
10+
11+
pip3 install twine sphinx
12+
613
Build
714
-----
815

9-
1. Update version numbers in the ``setup.py``, ``picozero/__init__.py``and ``docs/conf.py`` files.
16+
1. Update version numbers in the ``setup.py``, ``picozero/__init__.py`` and ``docs/conf.py`` files.
1017

1118
2. Add release to ``docs/changelog.rst``
1219

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.1.1'
3+
__version__ = '0.2.0'
44
__author__ = "Raspberry Pi Foundation"
55

66
from .picozero import (

picozero/picozero.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def pins(self):
4141
"""
4242
Returns a tuple of pins used by the device
4343
"""
44+
self._pin_nums
4445

4546
def __str__(self):
4647
return "{} (pins - {})".format(self.__class__.__name__, self._pin_nums)
@@ -570,7 +571,11 @@ def LED(pin, use_pwm=True, active_high=True, initial_value=False):
570571
active_high=active_high,
571572
initial_value=initial_value)
572573

573-
pico_led = LED(25)
574+
try:
575+
pico_led = LED("LED", use_pwm=False)
576+
except TypeError:
577+
# older version of micropython before "LED" was supported
578+
pico_led = LED(25, use_pwm=False)
574579

575580
class PWMBuzzer(PWMOutputDevice):
576581
"""

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.1.1'
6+
__version__ = '0.2.0'
77
__author__ = "Raspberry Pi Foundation"
88
__author_email__ = '[email protected]'
99
__license__ = 'MIT'

0 commit comments

Comments
 (0)