Skip to content

Commit

Permalink
Tutorial corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
corranwebster committed Sep 17, 2024
1 parent be2a91c commit 9b179ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/source/user_guide/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ example::
async yield i

However Micropython doesn't support asynchronous generators as of this writing.
This lack is a primary motivation for a Ultimo as a library.
This lack is a primary motivation for Ultimo as a library.

Hardware and Asyncio
--------------------
Expand Down Expand Up @@ -456,19 +456,19 @@ brightness of an LED::
volume_bar = volume | text_bar() | text_device.display_text(0, 0)
...

It's also common for a :py:class:`~ultimo.values.Value` to be set at the end
It's also common for a :py:class:`~ultimo.value.Value` to be set at the end
of a pipeline, and for this the value provides a dedicated
:py:attr:`~ultimo.values.Value.sink`, but also can be used at the end of a
pipeline. For example, to control the volume with a potentiometer, you could
have code which looks like::
:py:meth:`~ultimo.value.Value.sink` method, but also can be used at the end of
a pipeline using the pipe syntax. For example, to control the volume with a
potentiometer, you could have code which looks like::

async def main():
# volume is an unsigned 16-bit int
volume = Value(0)
set_volume = ADCPoll(ADC_PIN, 0.1) | volume
led_brightness = volume | PWMSink(ONBOARD_LED_PIN, 1000)

In addition to the simple :py:class:`~ultimo.values.Value` class, there are
In addition to the simple :py:class:`~ultimo.value.Value` class, there are
additional value subclasses which smooth value changes using easing functions
and another which holds a value for a set period of time before resetting to
a default.
Expand Down

0 comments on commit 9b179ce

Please sign in to comment.