Skip to content

Commit d911d6f

Browse files
authored
Merge branch 'm5stack:develop' into develop
2 parents 67c851b + e4f48d1 commit d911d6f

File tree

291 files changed

+15534
-2478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+15534
-2478
lines changed

.github/workflows/build-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
./m5stack/build-M5STACK_Atom_Matrix/uiflow-*-*.bin
3232
./m5stack/build-M5STACK_AtomS3/uiflow-*-*.bin
3333
./m5stack/build-M5STACK_AtomS3_Lite/uiflow-*-*.bin
34+
./m5stack/build-M5STACK_AtomS3R/uiflow-*-*.bin
3435
./m5stack/build-M5STACK_AtomS3U/uiflow-*-*.bin
3536
./m5stack/build-M5STACK_AtomU/uiflow-*-*.bin
3637
./m5stack/build-M5STACK_Basic/uiflow-*-*.bin

.github/workflows/nightly-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
with:
4848
name: M5STACK_AtomS3-Lite_firmware
4949
path: ./m5stack/build-M5STACK_AtomS3_Lite/uiflow-*-*.bin
50+
- name: Deliver AtomS3R firmware
51+
uses: actions/upload-artifact@v3
52+
with:
53+
name: M5STACK_AtomS3R_firmware
54+
path: ./m5stack/build-M5STACK_AtomS3R/uiflow-*-*.bin
5055
- name: Deliver AtomS3U firmware
5156
uses: actions/upload-artifact@v3
5257
with:

docs/en/hardware/adc.rst

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
ADC (analog to digital conversion)
2+
====================================
3+
4+
.. include:: ../refs/system.ref
5+
.. include:: ../refs/hardware.adc.ref
6+
7+
On the ESP32 chip, ADC functionality is available on pins 32-39 (ADC channel 1) and
8+
pins 0, 2, 4, 12-15 and 25-27 (ADC channel 2).
9+
10+
On the ESP32S3 chip, ADC functionality is available on pins 1-10 (ADC channel 1) and
11+
pins 11-14 and 17-20 (ADC block 2).
12+
13+
ADC channel 2 is also used by WiFi and so attempting to read analog values from
14+
channel 2 pins when WiFi is active will raise an exception.
15+
16+
17+
Micropython Example:
18+
19+
.. literalinclude:: ../../../examples/hardware/adc/adc_cores3_example.py
20+
:language: python
21+
:linenos:
22+
23+
UIFLOW2 Example:
24+
25+
|example.png|
26+
27+
.. only:: builder_html
28+
29+
|adc_cores3_example.m5f2|
30+
31+
32+
class ADC
33+
---------
34+
35+
.. class:: ADC(pin, *, atten)
36+
37+
Return the ADC object for the specified pin. ESP32 does not support
38+
different timings for ADC sampling and so the ``sample_ns`` keyword argument
39+
is not supported.
40+
41+
To read voltages above the reference voltage, apply input attenuation with
42+
the ``atten`` keyword argument. Valid values (and approximate linear
43+
measurement ranges) are:
44+
45+
- ``ADC.ATTN_0DB``: No attenuation (100mV - 950mV)
46+
- ``ADC.ATTN_2_5DB``: 2.5dB attenuation (100mV - 1250mV)
47+
- ``ADC.ATTN_6DB``: 6dB attenuation (150mV - 1750mV)
48+
- ``ADC.ATTN_11DB``: 11dB attenuation (150mV - 2450mV)
49+
50+
UIFLOW2:
51+
52+
|init.png|
53+
54+
.. Warning::
55+
Note that the absolute maximum voltage rating for input pins is 3.6V. Going
56+
near to this boundary risks damage to the IC!
57+
58+
Methods
59+
-------
60+
.. method:: ADC.read()
61+
62+
This method returns the raw ADC value ranged according to the resolution of
63+
the block, e.g., 0-4095 for 12-bit resolution.
64+
65+
UIFLOW2:
66+
67+
|read.png|
68+
69+
.. method:: ADC.read_u16()
70+
71+
Take an analog reading and return an integer in the range 0-65535.
72+
The return value represents the raw reading taken by the ADC, scaled
73+
such that the minimum value is 0 and the maximum value is 65535.
74+
75+
UIFLOW2:
76+
77+
|read_u16.png|
78+
79+
.. method:: ADC.read_uv()
80+
81+
This method uses the known characteristics of the ADC and per-package eFuse
82+
values - set during manufacture - to return a calibrated input voltage
83+
(before attenuation) in microvolts. The returned value has only millivolt
84+
resolution (i.e., will always be a multiple of 1000 microvolts).
85+
86+
The calibration is only valid across the linear range of the ADC. In
87+
particular, an input tied to ground will read as a value above 0 microvolts.
88+
Within the linear range, however, more accurate and consistent results will
89+
be obtained than using `read_u16()` and scaling the result with a constant.
90+
91+
UIFLOW2:
92+
93+
|read_uv.png|
94+
95+
.. method:: ADC.atten(atten)
96+
97+
Equivalent to ``ADC.init(atten=atten)``.
98+
99+
UIFLOW2:
100+
101+
|atten.png|
102+
103+
.. method:: ADC.width(bits)
104+
105+
Equivalent to ``ADC.block().init(bits=bits)``.
106+
107+
For compatibility, the ``ADC`` object also provides constants matching the
108+
supported ADC resolutions:
109+
110+
- ``ADC.WIDTH_9BIT`` = 9
111+
- ``ADC.WIDTH_10BIT`` = 10
112+
- ``ADC.WIDTH_11BIT`` = 11
113+
- ``ADC.WIDTH_12BIT`` = 12
114+
115+
UIFLOW2:
116+
117+
|width.png|

docs/en/hardware/als.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
ALS
2+
===
3+
4+
.. include:: ../refs/system.ref
5+
.. include:: ../refs/hardware.als.ref
6+
7+
ALS is used to read the built-in ambient light sensor inside the host device.
8+
9+
The following are the details of the host's support for ALS:
10+
11+
.. table::
12+
:widths: auto
13+
:align: center
14+
15+
+-----------------+---------+
16+
| | ALS |
17+
+=================+=========+
18+
| CoreS3 | |S| |
19+
+-----------------+---------+
20+
| CoreS3 SE | |
21+
+-----------------+---------+
22+
23+
24+
.. |S| unicode:: U+2714
25+
26+
27+
Micropython Example:
28+
29+
.. literalinclude:: ../../../examples/hardware/als/als_cores3_example.py
30+
:language: python
31+
:linenos:
32+
33+
UIFLOW2 Example:
34+
35+
|example.png|
36+
37+
.. only:: builder_html
38+
39+
|als_cores3_example.m5f2|
40+
41+
42+
class ALS
43+
---------
44+
45+
.. important::
46+
47+
Methods of the ALS Class heavily rely on ``M5.begin()`` |M5.begin.svg| and ``M5.update()`` |M5.update.svg|.
48+
49+
All calls to methods of ALS objects should be placed after ``M5.begin()`` |M5.begin.svg|, and ``M5.update()`` |M5.update.svg| should be called in the main loop.
50+
51+
52+
Methods
53+
-------
54+
55+
.. method:: ALS.getLightSensorData() -> int
56+
57+
Read the ambient light sensor value built into the host device.
58+
59+
UIFLOW2:
60+
61+
|getLightSensorData.png|

docs/en/hardware/imu.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ Methods
7070

7171
UIFLOW2:
7272

73-
|getAccel.svg|
73+
|getAccel.png|
74+
75+
|getAccel2.png|
76+
77+
|getAccel3.png|
78+
7479

7580

7681
.. method:: IMU.getGyro() -> tuple[float, float, float]
@@ -79,25 +84,23 @@ Methods
7984

8085
UIFLOW2:
8186

82-
|getGyro.svg|
83-
87+
|getGyro.png|
8488

85-
.. method:: IMU.isEnabled() -> bool
89+
|getGyro2.png|
8690

87-
Get whether the IMU object is enabled.
91+
|getGyro3.png|
8892

89-
UIFLOW2:
90-
91-
None
93+
.. method:: IMU.getMag() -> tuple[float, float, float]
9294

95+
Get the tuple of x, y, and z values of the magnetometer.
9396

94-
.. method:: IMU.getType() -> int
97+
UIFLOW2:
9598

96-
Get the chip model of the IMU.
99+
|getMag.png|
97100

98-
UIFLOW2:
101+
|getMag2.png|
99102

100-
None
103+
|getMag3.png|
101104

102105

103106
class IMU_TYPE

docs/en/hardware/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Hardware
44
.. toctree::
55
:maxdepth: 1
66

7+
adc.rst
8+
als.rst
79
button.rst
810
can.rst
911
imu.rst
@@ -12,3 +14,4 @@ Hardware
1214
pin.rst
1315
rotary.rst
1416
speaker.rst
17+
wdt.rst

0 commit comments

Comments
 (0)