Skip to content

Commit

Permalink
docs: Supplemental Unit Documentation and Examples.
Browse files Browse the repository at this point in the history
Signed-off-by: Tinyu-Zhao <[email protected]>
  • Loading branch information
Tinyu-Zhao authored and lbuque committed Dec 20, 2024
1 parent b7cd90b commit f9941e2
Show file tree
Hide file tree
Showing 76 changed files with 3,107 additions and 120 deletions.
2 changes: 1 addition & 1 deletion docs/en/base/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Base

.. toctree::
:maxdepth: 1

atom_can.rst
atom_socket.rst
motion.rst
4 changes: 2 additions & 2 deletions docs/en/base/motion.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Motion
======
Motion Base
===========

.. include:: ../refs/base.motion.ref

Expand Down
2 changes: 1 addition & 1 deletion docs/en/hats/heart.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

HeartHat
Heart Hat
=========

.. include:: ../refs/hat.heart.ref
Expand Down
2 changes: 1 addition & 1 deletion docs/en/hats/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ HAT
dlight.rst
env.rst
finger.rst
heart.rst
joyc.rst
joystick.rst
mini_encoder.rst
Expand All @@ -23,4 +24,3 @@ HAT
thermal.rst
tof.rst
vibrator.rst
heart.rst
2 changes: 1 addition & 1 deletion docs/en/hats/neoflash.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NeoFlash Hat
===========
=============

.. include:: ../refs/hat.neoflash.ref

Expand Down
2 changes: 1 addition & 1 deletion docs/en/hats/servo.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Servo Hat
========
==========

.. include:: ../refs/hat.servo.ref

Expand Down
4 changes: 2 additions & 2 deletions docs/en/module/dmx.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DMX512 Module
===========
=============

.. include:: ../refs/module.dmx.ref

Expand Down Expand Up @@ -40,7 +40,7 @@ UIFLOW2 Slave Example:


class DMX512Module
----------------
------------------

Constructors
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/en/module/gps.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

GPS Module
=========
===========

.. include:: ../refs/module.gps.ref

Expand Down
2 changes: 1 addition & 1 deletion docs/en/module/odrive.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ODrive Module
============
===============

.. include:: ../refs/module.odrive.ref

Expand Down
2 changes: 1 addition & 1 deletion docs/en/module/pm25.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

PM2.5 Module
===========
==============

.. include:: ../refs/module.pm25.ref

Expand Down
27 changes: 27 additions & 0 deletions docs/en/refs/unit.angle8.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

.. |Angle8Unit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/8Angle/img-b698604d-29dd-4506-b662-4752e1f03a28.webp
:target: https://docs.m5stack.com/en/unit/8Angle
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/init.png
.. |get_adc12_raw.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/get_adc12_raw.png
.. |get_adc8_raw.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/get_adc8_raw.png
.. |get_switch_status.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/get_switch_status.png
.. |set_led_rgb.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/set_led_rgb.png
.. |set_led_rgb_from.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/set_led_rgb_from.png
.. |set_angle_sync_bright.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/set_angle_sync_bright.png
.. |get_device_spec.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/get_device_spec.png
.. |set_i2c_address.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/set_i2c_address.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/8angle/example.png

.. |angle8unit_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/angle8unit/angle8unit_cores3_example.m5f2"
target="_blank"
>
angle8unit_cores3_example.m5f2
</a>

37 changes: 37 additions & 0 deletions docs/en/refs/unit.co2.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

.. |CO2Unit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/co2/co2_01.webp
:target: https://docs.m5stack.com/en/unit/co2
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/init.png
.. |set_start_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_start_periodic_measurement.png
.. |set_stop_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_stop_periodic_measurement.png
.. |is_data_ready.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/is_data_ready.png
.. |get_temperature_offset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/get_temperature_offset.png
.. |set_temperature_offset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_temperature_offset.png
.. |get_sensor_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/get_sensor_altitude.png
.. |set_sensor_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_sensor_altitude.png
.. |set_ambient_pressure.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_ambient_pressure.png
.. |set_force_calibration.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_force_calibration.png
.. |get_calibration_enabled.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/get_calibration_enabled.png
.. |set_calibration_enabled.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_calibration_enabled.png
.. |set_start_low_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_start_low_periodic_measurement.png
.. |save_to_eeprom.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/save_to_eeprom.png
.. |get_serial_number.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/get_serial_number.png
.. |set_self_test.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_self_test.png
.. |set_factory_reset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/set_factory_reset.png
.. |reinit.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/reinit.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2/example.png



.. |co2_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/co2l/co2_cores3_example.m5f2"
target="_blank"
>
co2_cores3_example.m5f2
</a>
36 changes: 36 additions & 0 deletions docs/en/refs/unit.co2l.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

.. |CO2LUnit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/CO2L/img-9d1ab7e5-8692-4652-8714-9300367c0d37.webp
:target: https://docs.m5stack.com/en/unit/co2l
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/init.png
.. |set_start_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_start_periodic_measurement.png
.. |set_stop_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_stop_periodic_measurement.png
.. |is_data_ready.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/is_data_ready.png
.. |get_temperature_offset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/get_temperature_offset.png
.. |set_temperature_offset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_temperature_offset.png
.. |get_sensor_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/get_sensor_altitude.png
.. |set_sensor_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_sensor_altitude.png
.. |set_ambient_pressure.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_ambient_pressure.png
.. |set_force_calibration.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_force_calibration.png
.. |get_calibration_enabled.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/get_calibration_enabled.png
.. |set_calibration_enabled.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_calibration_enabled.png
.. |set_start_low_periodic_measurement.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_start_low_periodic_measurement.png
.. |save_to_eeprom.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/save_to_eeprom.png
.. |get_serial_number.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/get_serial_number.png
.. |set_self_test.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_self_test.png
.. |set_factory_reset.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/set_factory_reset.png
.. |reinit.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/reinit.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/co2l/example.png


.. |co2l_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/co2l/co2l_cores3_example.m5f2"
target="_blank"
>
co2l_cores3_example.m5f2
</a>
28 changes: 28 additions & 0 deletions docs/en/refs/unit.envpro.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

.. |ENVPROUnit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/ENV%20Pro%20Unit/img-2ba12134-9756-471a-b1a5-ba803a875e8f.webp
:target: https://docs.m5stack.com/en/unit/ENV%20Pro%20Unit
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/init.png
.. |get_over_sampling_rate.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_over_sampling_rate.png
.. |set_over_sampling_rate.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/set_over_sampling_rate.png
.. |get_iir_filter_coefficient.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_iir_filter_coefficient.png
.. |set_iir_filter_coefficient.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/set_iir_filter_coefficient.png
.. |get_temperature.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_temperature.png
.. |get_humidity.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_humidity.png
.. |get_pressure.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_pressure.png
.. |get_gas_resistance.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_gas_resistance.png
.. |get_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/get_altitude.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/env_pro/example.png

.. |envpro_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/envpro/envpro_cores3_example.m5f2"
target="_blank"
>
envpro_cores3_example.m5f2
</a>

24 changes: 24 additions & 0 deletions docs/en/refs/unit.rfid.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

.. |RFIDUnit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/rfid/rfid_01.webp
:target: https://docs.m5stack.com/en/unit/rfid
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/init.png
.. |is_new_card_present.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/is_new_card_present.png
.. |read_card_uid.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/read_card_uid.png
.. |read.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/read.png
.. |write.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/write.png
.. |close.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/close.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/rfid/example.png

.. |rfid_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/rfid/rfid_cores3_example.m5f2"
target="_blank"
>
rfid_cores3_example.m5f2
</a>

27 changes: 27 additions & 0 deletions docs/en/refs/unit.tvoc.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

.. |TVOCUnit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/tvoc/tvoc_01.webp
:target: https://docs.m5stack.com/en/unit/tvoc
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/init.png
.. |set_baseline_co2_tvoc.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/set_baseline_co2_tvoc.png
.. |set_relative_humidity.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/set_relative_humidity.png
.. |co2eq.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/co2eq.png
.. |baseline_co2eq.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/baseline_co2eq.png
.. |tvoc.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/tvoc.png
.. |baseline_tvoc.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/baseline_tvoc.png
.. |raw_h2.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/raw_h2.png
.. |raw_ethanol.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/raw_ethanol.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/tvoc/example.png

.. |tvoc_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/tvoc/tvoc_cores3_example.m5f2"
target="_blank"
>
tvoc_cores3_example.m5f2
</a>

25 changes: 25 additions & 0 deletions docs/en/refs/unit.weight.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

.. |WEIGHTUnit| image:: https://static-cdn.m5stack.com/resource/docs/products/unit/WEIGHT/img-a0113c8c-ed62-43b9-ad38-5cb934811d9e.webp
:target: https://docs.m5stack.com/en/unit/WEIGHT
:height: 200px
:width: 200px

.. |init.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/init.png
.. |get_raw_weight.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/get_raw_weight.png
.. |get_scale_weight.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/get_scale_weight.png
.. |set_tare.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/set_tare.png
.. |set_calibrate_scale.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/set_calibrate_scale.png
.. |is_ready_wait.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/is_ready_wait.png
.. |set_channel.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/set_channel.png

.. |example.png| image:: https://static-cdn.m5stack.com/mpy_docs/unit/weight/example.png

.. |weight_cores3_example.m5f2| raw:: html

<a
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/unit/weight/weight_cores3_example.m5f2"
target="_blank"
>
weight_cores3_example.m5f2
</a>

4 changes: 2 additions & 2 deletions docs/en/software/dl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ The HumanFaceRecognizer object is returned by `dl.HumanFaceRecognizer()`.
|enrolled_id_num.png|

class DetectionResult -- DetectionResult object
------------------------------
-----------------------------------------------

The line object is returned by `ObjectDetector.infer()`.

Expand Down Expand Up @@ -234,7 +234,7 @@ The line object is returned by `ObjectDetector.infer()`.
|get_keypoint.png|

class RecognitionResult -- RecognitionResult object
------------------------------
---------------------------------------------------

The ``RecognitionResult`` is returned by `HumanFaceRecognizer.recognize(img, keypoint)`.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/units/adc_v11.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ADCV11 Unit
==========
ADC V1.1 Unit
=============
.. sku:U013-V11
.. include:: ../refs/unit.adc_v11.ref

Expand Down
2 changes: 1 addition & 1 deletion docs/en/units/ain4.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

AIN4_20mA Unit
AIN4-20mA Unit
==============

.. include:: ../refs/unit.ain4.ref
Expand Down
Loading

0 comments on commit f9941e2

Please sign in to comment.