Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 30, 2023
1 parent 6111f94 commit fd74f30
Show file tree
Hide file tree
Showing 172 changed files with 3,370 additions and 2,006 deletions.
Binary file added docs/_images/pinout-openmv-cam-rt1062-ov5640.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/_sources/genrst/builtin_types.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Builtin types
=============
Generated Thu 19 Oct 2023 00:13:39 UTC
Generated Thu 30 Nov 2023 01:59:33 UTC

Exception
---------
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/genrst/core_language.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Core language
=============
Generated Thu 19 Oct 2023 00:13:39 UTC
Generated Thu 30 Nov 2023 01:59:33 UTC

.. _cpydiff_core_fstring_concat:

Expand Down
18 changes: 9 additions & 9 deletions docs/_sources/genrst/modules.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Modules
=======
Generated Thu 19 Oct 2023 00:13:39 UTC
Generated Thu 30 Nov 2023 01:59:33 UTC

array
-----
Expand Down Expand Up @@ -276,13 +276,13 @@ Sample code::
x = random.getrandbits(64)
print("{}".format(x))

+--------------------------+---------------------------------------------------------------------+
| CPy output: | uPy output: |
+--------------------------+---------------------------------------------------------------------+
| :: | :: |
| | |
| 10266816044259219985 | /bin/sh: 1: ../ports/unix/build-standard/micropython: not found |
+--------------------------+---------------------------------------------------------------------+
+-------------------------+---------------------------------------------------------------------+
| CPy output: | uPy output: |
+-------------------------+---------------------------------------------------------------------+
| :: | :: |
| | |
| 6007428860012078105 | /bin/sh: 1: ../ports/unix/build-standard/micropython: not found |
+-------------------------+---------------------------------------------------------------------+

.. _cpydiff_modules_random_randint:

Expand All @@ -307,7 +307,7 @@ Sample code::
+-----------------------------------------------+---------------------------------------------------------------------+
| :: | :: |
| | |
| x=340282366920938463463374607431768211456 | /bin/sh: 1: ../ports/unix/build-standard/micropython: not found |
| x=340282366920938463463374607431768211455 | /bin/sh: 1: ../ports/unix/build-standard/micropython: not found |
+-----------------------------------------------+---------------------------------------------------------------------+

struct
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/genrst/syntax.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Syntax
======
Generated Thu 19 Oct 2023 00:13:39 UTC
Generated Thu 30 Nov 2023 01:59:33 UTC

.. _cpydiff_syntax_arg_unpacking:

Expand Down
31 changes: 20 additions & 11 deletions docs/_sources/library/network.WINC.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ Constructors
argument is passed. Otherwise, query current state if no argument is
provided. Most other methods require active interface.

.. method:: connect(ssid, [key=None, [security=WPA_PSK]])
.. method:: connect(ssid, [key=None, [security=WPA_PSK, [channel=1]]])

Connect to a wifi network with ssid ``ssid`` using key ``key`` with
security ``security``.
security ``security`` and channel ``channel``.

After connecting to the network use the :mod:`usocket` module to open TCP/UDP
ports to send and receive data.
Expand Down Expand Up @@ -141,11 +141,12 @@ Constructors

Returns a list containing:

* [0]: Channel Number (int)
* [1]: RSSI - received signal strength indicator (int)
* [2]: Authorization Type (see constants)
* [3]: MAC Address String (XX:XX:XX:XX:XX:XX) (BSSID)
* [4]: Set Service Identifier String (SSID)
* [0]: Set Service Identifier String (SSID)
* [1]: MAC Address String (XX:XX:XX:XX:XX:XX) (BSSID)
* [2]: Channel Number (int)
* [3]: RSSI - received signal strength indicator (int)
* [4]: Authorization Type (see constants)
* [5]: 1 (int)

You don't need to be connected to call this.

Expand Down Expand Up @@ -183,14 +184,14 @@ Constructors

For connecting to an open wifi network.

.. data:: WEP

For connecting to a WEP based password protected network.

.. data:: WPA_PSK

For connecting to a WPA/PSK based password protected network.

.. data:: 802_1X

Network is secured with WPA/WPA2 Enterprise.

.. data:: MODE_STA

Start in station mode (i.e. connect to a network).
Expand All @@ -199,6 +200,14 @@ Constructors

Start in access point mode (i.e. become the network).

.. data:: MODE_P2P

Start in wifi-direct mode.

.. data:: MODE_BSP

Init BSP.

.. data:: MODE_FIRMWARE

Setup in firmware update mode.
33 changes: 33 additions & 0 deletions docs/_sources/library/omv.display.DACBacklight.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. currentmodule:: display
.. _display.DACBacklight:

class DACBacklight -- DAC Backlight
===================================

The `DACBacklight` class is used to control a screen backlight.

Constructors
------------

.. class:: display.DACBacklight(channel, [bits=8])

Creates a backlight object to initialize the display backlight. This class should be passed as
the ``backlight`` argument to any display object constructor which can use a backlight controller.

``channel`` specifies the DAC channel to use. This can be the GPIO pin also. For STM32 based
OpenMV Cams this is ``P5``.

``bits`` specifies the resolution of the DAC. The default value of 8-bits should be good enough.

Methods
-------

.. method:: DACBacklight.deinit()

Deinitializes the backlight controller.

.. method:: DACBacklight.backlight([value])

Sets the backlight strength from 0-100. Note that a linear voltage on the backlight output
will not necessary result in a linear brightness change on the screen. Typically there's
a small region where the screen brightness will change drastically.
36 changes: 36 additions & 0 deletions docs/_sources/library/omv.display.PWMBacklight.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.. currentmodule:: display
.. _display.PWMBacklight:

class PWMBacklight -- PWM Backlight
===================================

The `PWMBacklight` class is used to control a screen backlight.

Constructors
------------

.. class:: display.PWMBacklight(pin, [timer=3, [channel=3, [frequency=200]]])

Creates a backlight object to initialize the display backlight. This class should be passed as
the ``backlight`` argument to any display object constructor which can use a backlight controller.

``pin`` specifies the Pin to use.

``timer`` specifies the Timer number to use.

``channel`` specifies the Timer channel to use.

``frequency`` specifies the PWM frequency.

Methods
-------

.. method:: PWMBacklight.deinit()

Deinitializes the backlight controller.

.. method:: PWMBacklight.backlight([value])

Sets the backlight strength from 0-100. Note that a linear pwm duty cycle on the backlight output
will not necessary result in a linear brightness change on the screen. Typically there's
a small region where the screen brightness will change drastically.
47 changes: 27 additions & 20 deletions docs/_sources/library/omv.display.dsidisplay.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example usage for driving the 800x480 MIPI LCD::
Constructors
------------

.. class:: display.DSIDisplay([framesize=display.FWVGA, [refresh=60, [portrait=False, [channel=0, [controller]]]]])
.. class:: display.DSIDisplay([framesize=display.FWVGA, [refresh=60, [portrait=False, [channel=0, [controller, [backlight]]]]]])

``framesize`` One of the standard supported resolutions.

Expand All @@ -37,6 +37,9 @@ Constructors
``controller`` Pass the controller chip class here to initialize it along with the display. E.g.
`display.ST7701()` which is a standard display controller for MIPI DSI displays.

``backlight`` specify a backlight controller module to use. By default the backlight will be
controlled via a GPIO pin.

Methods
-------

Expand All @@ -56,16 +59,20 @@ Methods

Returns the refresh rate.

.. method:: DSIDisplay.write(image, [x=0, [y=0, [x_scale=1.0, [y_scale=1.0, [roi=None, [rgb_channel=-1, [alpha=256, [color_palette=None, [alpha_palette=None, [hint=0, [x_size=None, [y_size=None]]]]]]]]]]]])
.. method:: DSIDisplay.write(image, [x=0, [y=0, [x_scale=1.0, [y_scale=1.0, [roi=None, [rgb_channel=-1, [alpha=256, [color_palette=None, [alpha_palette=None]]]]]]]]]])

Displays an ``image`` whose top-left corner starts at location x, y.

Displays an ``image`` whose top-left corner starts at location x, y. You may either pass x, y
separately, as a tuple (x, y), or neither.
You may also pass a path instead of an image object for this method to automatically load the image
from disk and draw it in one step. E.g. ``write("test.jpg")``.

``x_scale`` controls how much the displayed image is scaled by in the x direction (float). If this
value is negative the image will be flipped horizontally.
value is negative the image will be flipped horizontally. Note that if ``y_scale`` is not specified
then it will match ``x_scale`` to maintain the aspect ratio.

``y_scale`` controls how much the displayed image is scaled by in the y direction (float). If this
value is negative the image will be flipped vertically.
value is negative the image will be flipped vertically. Note that if ``x_scale`` is not specified
then it will match ``x_scale`` to maintain the aspect ratio.

``roi`` is the region-of-interest rectangle tuple (x, y, w, h) of the image to display. This
allows you to extract just the pixels in the ROI to scale.
Expand All @@ -77,7 +84,7 @@ Methods
``alpha`` controls how opaque the image is. A value of 256 displays an opaque image while a
value lower than 256 produces a black transparent image. 0 results in a perfectly black image.

``color_palette`` if not ``-1`` can be `sensor.PALETTE_RAINBOW`, `sensor.PALETTE_IRONBOW`, or
``color_palette`` if not ``-1`` can be `image.PALETTE_RAINBOW`, `image.PALETTE_IRONBOW`, or
a 256 pixel in total RGB565 image to use as a color lookup table on the grayscale value of
whatever the input image is. This is applied after ``rgb_channel`` extraction if used.

Expand All @@ -92,19 +99,18 @@ Methods
* `image.AREA`: Use area scaling when downscaling versus the default of nearest neighbor.
* `image.BILINEAR`: Use bilinear scaling versus the default of nearest neighbor scaling.
* `image.BICUBIC`: Use bicubic scaling versus the default of nearest neighbor scaling.
* `image.CENTER`: Center the image image being displayed on (x, y).
* `image.CENTER`: Center the image being drawn on the display. This is applied after scaling.
* `image.HMIRROR`: Horizontally mirror the image.
* `image.VFLIP`: Vertically flip the image.
* `image.TRANSPOSE`: Transpose the image (swap x/y).
* `image.EXTRACT_RGB_CHANNEL_FIRST`: Do rgb_channel extraction before scaling.
* `image.APPLY_COLOR_PALETTE_FIRST`: Apply color palette before scaling.

``x_size`` may be passed if ``x_scale`` is not passed to specify the size of the image to display
and ``x_scale`` will automatically be determined passed on the input image size. If neither
``y_scale`` or ``y_size`` are specified then ``y_scale`` internally will be set to be equal to
``x_size`` to maintain the aspect-ratio.

``y_size`` may be passed if ``y_scale`` is not passed to specify the size of the image to display
and ``y_scale`` will automatically be determined passed on the input image size. If neither
``x_scale`` or ``x_size`` are specified then ``x_scale`` internally will be set to be equal to
``y_size`` to maintain the aspect-ratio.
* `image.SCALE_ASPECT_KEEP`: Scale the image being drawn to fit inside the display.
* `image.SCALE_ASPECT_EXPAND`: Scale the image being drawn to fill the display (results in cropping)
* `image.SCALE_ASPECT_IGNORE`: Scale the image being drawn to fill the display (results in stretching).
* `image.ROTATE_90`: Rotate the image by 90 degrees (this is just VFLIP | TRANSPOSE).
* `image.ROTATE_180`: Rotate the image by 180 degrees (this is just HMIRROR | VFLIP).
* `image.ROTATE_270`: Rotate the image by 270 degrees (this is just HMIRROR | TRANSPOSE).

.. method:: DSIDisplay.clear([display_off=False])

Expand All @@ -116,9 +122,10 @@ Methods

.. method:: DSIDisplay.backlight([value])

Sets the lcd backlight dimming value. 0 (off) to 255 (on).
Sets the lcd backlight dimming value. 0 (off) to 100 (on).

This controls a PWM signal to a standard backlight dimming circuit.
Note that unless you pass `DACBacklight` or `PWMBacklight` the backlight will be controlled
as a GPIO pin and will only go from 0 (off) to !0 (on).

Pass no arguments to get the state of the backlight value.

Expand Down
47 changes: 27 additions & 20 deletions docs/_sources/library/omv.display.rgbdisplay.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example usage for driving the 800x480 24-bit Parallel LCD::
Constructors
------------

.. class:: display.RGBDisplay([framesize=display.FWVGA, [refresh=60, [display_on=True, [portrait=False, [controller]]]]])
.. class:: display.RGBDisplay([framesize=display.FWVGA, [refresh=60, [display_on=True, [portrait=False, [controller, [backlight]]]]]])

``framesize`` One of the standard supported resolutions.

Expand All @@ -38,6 +38,9 @@ Constructors

``controller`` Pass the controller chip class here to initialize it along with the display.

``backlight`` specify a backlight controller module to use. By default the backlight will be
controlled via a GPIO pin.

Methods
-------

Expand All @@ -57,16 +60,20 @@ Methods

Returns the refresh rate.

.. method:: RGBDisplay.write(image, [x=0, [y=0, [x_scale=1.0, [y_scale=1.0, [roi=None, [rgb_channel=-1, [alpha=256, [color_palette=None, [alpha_palette=None, [hint=0, [x_size=None, [y_size=None]]]]]]]]]]]])
.. method:: RGBDisplay.write(image, [x=0, [y=0, [x_scale=1.0, [y_scale=1.0, [roi=None, [rgb_channel=-1, [alpha=256, [color_palette=None, [alpha_palette=None, [hint=0]]]]]]]]]])

Displays an ``image`` whose top-left corner starts at location x, y.

Displays an ``image`` whose top-left corner starts at location x, y. You may either pass x, y
separately, as a tuple (x, y), or neither.
You may also pass a path instead of an image object for this method to automatically load the image
from disk and draw it in one step. E.g. ``write("test.jpg")``.

``x_scale`` controls how much the displayed image is scaled by in the x direction (float). If this
value is negative the image will be flipped horizontally.
value is negative the image will be flipped horizontally. Note that if ``y_scale`` is not specified
then it will match ``x_scale`` to maintain the aspect ratio.

``y_scale`` controls how much the displayed image is scaled by in the y direction (float). If this
value is negative the image will be flipped vertically.
value is negative the image will be flipped vertically. Note that if ``x_scale`` is not specified
then it will match ``x_scale`` to maintain the aspect ratio.

``roi`` is the region-of-interest rectangle tuple (x, y, w, h) of the image to display. This
allows you to extract just the pixels in the ROI to scale.
Expand All @@ -78,7 +85,7 @@ Methods
``alpha`` controls how opaque the image is. A value of 256 displays an opaque image while a
value lower than 256 produces a black transparent image. 0 results in a perfectly black image.

``color_palette`` if not ``-1`` can be `sensor.PALETTE_RAINBOW`, `sensor.PALETTE_IRONBOW`, or
``color_palette`` if not ``-1`` can be `image.PALETTE_RAINBOW`, `image.PALETTE_IRONBOW`, or
a 256 pixel in total RGB565 image to use as a color lookup table on the grayscale value of
whatever the input image is. This is applied after ``rgb_channel`` extraction if used.

Expand All @@ -93,19 +100,18 @@ Methods
* `image.AREA`: Use area scaling when downscaling versus the default of nearest neighbor.
* `image.BILINEAR`: Use bilinear scaling versus the default of nearest neighbor scaling.
* `image.BICUBIC`: Use bicubic scaling versus the default of nearest neighbor scaling.
* `image.CENTER`: Center the image image being displayed on (x, y).
* `image.CENTER`: Center the image being drawn on the display. This is applied after scaling.
* `image.HMIRROR`: Horizontally mirror the image.
* `image.VFLIP`: Vertically flip the image.
* `image.TRANSPOSE`: Transpose the image (swap x/y).
* `image.EXTRACT_RGB_CHANNEL_FIRST`: Do rgb_channel extraction before scaling.
* `image.APPLY_COLOR_PALETTE_FIRST`: Apply color palette before scaling.

``x_size`` may be passed if ``x_scale`` is not passed to specify the size of the image to display
and ``x_scale`` will automatically be determined passed on the input image size. If neither
``y_scale`` or ``y_size`` are specified then ``y_scale`` internally will be set to be equal to
``x_size`` to maintain the aspect-ratio.

``y_size`` may be passed if ``y_scale`` is not passed to specify the size of the image to display
and ``y_scale`` will automatically be determined passed on the input image size. If neither
``x_scale`` or ``x_size`` are specified then ``x_scale`` internally will be set to be equal to
``y_size`` to maintain the aspect-ratio.
* `image.SCALE_ASPECT_KEEP`: Scale the image being drawn to fit inside the display.
* `image.SCALE_ASPECT_EXPAND`: Scale the image being drawn to fill the display (results in cropping)
* `image.SCALE_ASPECT_IGNORE`: Scale the image being drawn to fill the display (results in stretching).
* `image.ROTATE_90`: Rotate the image by 90 degrees (this is just VFLIP | TRANSPOSE).
* `image.ROTATE_180`: Rotate the image by 180 degrees (this is just HMIRROR | VFLIP).
* `image.ROTATE_270`: Rotate the image by 270 degrees (this is just HMIRROR | TRANSPOSE).

.. method:: RGBDisplay.clear([display_off=False])

Expand All @@ -117,8 +123,9 @@ Methods

.. method:: RGBDisplay.backlight([value])

Sets the lcd backlight dimming value. 0 (off) to 255 (on).
Sets the lcd backlight dimming value. 0 (off) to 100 (on).

This controls a PWM signal to a standard backlight dimming circuit.
Note that unless you pass `DACBacklight` or `PWMBacklight` the backlight will be controlled
as a GPIO pin and will only go from 0 (off) to !0 (on).

Pass no arguments to get the state of the backlight value.
Loading

0 comments on commit fd74f30

Please sign in to comment.