Skip to content

Commit

Permalink
Merge pull request #63 from RaspberryPiFoundation/dev
Browse files Browse the repository at this point in the history
v0.2.0
  • Loading branch information
Martin O'Hanlon authored Jun 29, 2022
2 parents 723772d + 9f028ee commit b29a880
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Change log

.. currentmodule:: picozero

0.2.0 - 2022-06-29
~~~~~~~~~~~~~~~~~~

+ Compatibility fix LED

0.1.1 - 2022-06-08
~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getattr__(cls, name):
author = 'Raspberry Pi Foundation'

# The full version, including alpha/beta/rc tags
release = '0.1.1'
release = '0.2.0'


# -- General configuration ---------------------------------------------------
Expand Down
9 changes: 8 additions & 1 deletion docs/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ Development

Instructions on how build and deploy picozero.

Pre-requisites
--------------

To build and deploy picozero, you need to install the dependencies ::

pip3 install twine sphinx

Build
-----

1. Update version numbers in the ``setup.py``, ``picozero/__init__.py``and ``docs/conf.py`` files.
1. Update version numbers in the ``setup.py``, ``picozero/__init__.py`` and ``docs/conf.py`` files.

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

Expand Down
2 changes: 1 addition & 1 deletion picozero/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__name__ = "picozero"
__package__ = "picozero"
__version__ = '0.1.1'
__version__ = '0.2.0'
__author__ = "Raspberry Pi Foundation"

from .picozero import (
Expand Down
7 changes: 6 additions & 1 deletion picozero/picozero.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def pins(self):
"""
Returns a tuple of pins used by the device
"""
self._pin_nums

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

pico_led = LED(25)
try:
pico_led = LED("LED", use_pwm=False)
except TypeError:
# older version of micropython before "LED" was supported
pico_led = LED(25, use_pwm=False)

class PWMBuzzer(PWMOutputDevice):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__project__ = 'picozero'
__packages__ = ['picozero']
__desc__ = 'A beginner-friendly library for using common electronics components with the Raspberry Pi Pico. '
__version__ = '0.1.1'
__version__ = '0.2.0'
__author__ = "Raspberry Pi Foundation"
__author_email__ = 'learning@raspberrypi.org'
__license__ = 'MIT'
Expand Down

0 comments on commit b29a880

Please sign in to comment.