Skip to content

Commit 926bd1f

Browse files
committed
libs/cap: Add Cap LoRa868 support.
Signed-off-by: lbuque <[email protected]>
1 parent f8753dc commit 926bd1f

18 files changed

+1638
-0
lines changed

docs/en/cap/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Cap
2+
===
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
lora868.rst

docs/en/cap/lora868.rst

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
LoRa868 Cap
2+
===========
3+
4+
.. sku: U201
5+
6+
.. include:: ../refs/cap.lora868.ref
7+
8+
Cap LoRa868 is a high-performance LoRa communication and GNSS global navigation expansion module designed for the Cardputer-Adv.
9+
10+
Support the following products:
11+
12+
|LoRa868Cap|
13+
14+
UiFlow2 Example
15+
---------------
16+
17+
Sender
18+
^^^^^^
19+
20+
Open the |cardputer_adv_lora868_cap_sender_example.m5f2| project in UiFlow2.
21+
22+
Use the keyboard to enter the text you want to send and press ENTER to send it.
23+
24+
UiFlow2 Code Block:
25+
26+
|cardputer_adv_lora868_cap_sender_example.png|
27+
28+
Example output:
29+
30+
None
31+
32+
Receiver
33+
^^^^^^^^
34+
35+
Open the |cardputer_adv_lora868_cap_receiver_example.m5f2| project in UiFlow2.
36+
37+
This example receives and displays data.
38+
39+
UiFlow2 Code Block:
40+
41+
|cardputer_adv_lora868_cap_receiver_example.png|
42+
43+
Example output:
44+
45+
None
46+
47+
GPS Usage
48+
^^^^^^^^^
49+
50+
Open the |cardputer_adv_lora868_cap_gps_example.m5f2| project in UiFlow2.
51+
52+
This example demonstrates how to use the GPS functionality of the LoRa868 Cap.
53+
54+
UiFlow2 Code Block:
55+
56+
|cardputer_adv_lora868_cap_gps_example.png|
57+
58+
Example output:
59+
60+
None
61+
62+
63+
MicroPython Example
64+
-------------------
65+
66+
Sender
67+
^^^^^^
68+
69+
Use the keyboard to enter the text you want to send and press ENTER to send it.
70+
71+
MicroPython Code Block:
72+
73+
.. literalinclude:: ../../../examples/cap/lora868/cardputer_adv_lora868_cap_sender_example.py
74+
:language: python
75+
:linenos:
76+
77+
Example output:
78+
79+
None
80+
81+
Receiver
82+
^^^^^^^^
83+
84+
This example receives and displays data.
85+
86+
MicroPython Code Block:
87+
88+
.. literalinclude:: ../../../examples/cap/lora868/cardputer_adv_lora868_cap_receiver_example.py
89+
:language: python
90+
:linenos:
91+
92+
Example output:
93+
94+
None
95+
96+
GPS Usage
97+
^^^^^^^^^
98+
99+
This example demonstrates how to use the GPS functionality of the LoRa868 Cap.
100+
101+
MicroPython Code Block:
102+
103+
.. literalinclude:: ../../../examples/cap/lora868/cardputer_adv_lora868_cap_gps_example.py
104+
:language: python
105+
:linenos:
106+
107+
Example output:
108+
109+
None
110+
111+
**API**
112+
-------
113+
114+
class LoRa868Cap
115+
^^^^^^^^^^^^^^^^
116+
117+
.. autoclass:: cap.lora868.LoRa868Cap
118+
:members:
119+
:member-order: bysource
120+
121+
class GPSCap
122+
^^^^^^^^^^^^
123+
124+
.. autoclass:: cap.lora868.GPSCap
125+
:members:
126+
:member-order: bysource

docs/en/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"m5audio2",
6262
"lvgl",
6363
"_espnow",
64+
"lora"
6465
]
6566

6667
autodoc_default_options = {

docs/en/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ UiFlow2 documentation and references
1616
units/index.rst
1717
hats/index.rst
1818
base/index.rst
19+
cap/index.rst
1920
iot-devices/index.rst
2021
advanced/index.rst
2122
quick-reference/index.rst

docs/en/refs/cap.lora868.ref

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.. |LoRa868Cap| image:: https://m5stack-doc.oss-cn-shenzhen.aliyuncs.com/1177/Cap_LoRa868_01.webp
2+
:target: https://docs.m5stack.com/en/cap/Cap_LoRa868
3+
:height: 200px
4+
:width: 200px
5+
6+
.. |cardputer_adv_lora868_cap_gps_example.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/cardputer_adv_lora868_cap_gps_example.png
7+
.. |cardputer_adv_lora868_cap_receiver_example.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/cardputer_adv_lora868_cap_receiver_example.png
8+
.. |cardputer_adv_lora868_cap_sender_example.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/cardputer_adv_lora868_cap_sender_example.png
9+
10+
.. |deinit.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/deinit.png
11+
.. |get_altitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_altitude.png
12+
.. |get_corse_over_ground.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_corse_over_ground.png
13+
.. |get_gps_date.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_gps_date.png
14+
.. |get_gps_date_time.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_gps_date_time.png
15+
.. |get_gps_time.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_gps_time.png
16+
.. |get_latitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_latitude.png
17+
.. |get_longitude.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_longitude.png
18+
.. |get_pos_quality.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_pos_quality.png
19+
.. |get_satellite_num.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_satellite_num.png
20+
.. |get_speed_over_ground.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_speed_over_ground.png
21+
.. |get_time_zone.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_time_zone.png
22+
.. |get_timestamp.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_timestamp.png
23+
.. |get_work_mode.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/get_work_mode.png
24+
.. |gps_init.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/gps_init.png
25+
.. |irq_triggered.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/irq_triggered.png
26+
.. |lora_init.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/lora_init.png
27+
.. |recv.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/recv.png
28+
.. |recv_data_param.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/recv_data_param.png
29+
.. |send.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/send.png
30+
.. |send_return.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/send_return.png
31+
.. |send_time.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/send_time.png
32+
.. |set_bw.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_bw.png
33+
.. |set_coding_rate.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_coding_rate.png
34+
.. |set_freq.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_freq.png
35+
.. |set_irq_callback.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_irq_callback.png
36+
.. |set_output_power.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_output_power.png
37+
.. |set_preamble_len.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_preamble_len.png
38+
.. |set_sf.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_sf.png
39+
.. |set_syncword.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_syncword.png
40+
.. |set_time_zone.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_time_zone.png
41+
.. |set_work_mode.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/set_work_mode.png
42+
.. |sleep.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/sleep.png
43+
.. |standby.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/standby.png
44+
.. |start_recv.png| image:: https://static-cdn.m5stack.com/mpy_docs/cap/lora868/start_recv.png
45+
46+
.. |cardputer_adv_lora868_cap_gps_example.m5f2| raw:: html
47+
48+
<a
49+
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/cap/lora868/cardputer_adv_lora868_cap_gps_example.m5f2"
50+
target="_blank"
51+
>
52+
cardputer_adv_lora868_cap_gps_example.m5f2
53+
</a>
54+
55+
.. |cardputer_adv_lora868_cap_receiver_example.m5f2| raw:: html
56+
57+
<a
58+
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/cap/lora868/cardputer_adv_lora868_cap_receiver_example.m5f2"
59+
target="_blank"
60+
>
61+
cardputer_adv_lora868_cap_receiver_example.m5f2
62+
</a>
63+
64+
.. |cardputer_adv_lora868_cap_sender_example.m5f2| raw:: html
65+
66+
<a
67+
href="https://uiflow2.m5stack.com/?example=https://raw.githubusercontent.com/m5stack/uiflow-micropython/develop/examples/cap/lora868/cardputer_adv_lora868_cap_sender_example.m5f2"
68+
target="_blank"
69+
>
70+
cardputer_adv_lora868_cap_sender_example.m5f2
71+
</a>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2016 - 2025 M5Stack Technology Co., Ltd
3+
# This file is distributed under the same license as the UIFlow2 Programming
4+
# Guide package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: UIFlow2 Programming Guide \n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2025-09-17 09:37+0800\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language: zh_CN\n"
16+
"Language-Team: zh_CN <[email protected]>\n"
17+
"Plural-Forms: nplurals=1; plural=0;\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=utf-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Generated-By: Babel 2.17.0\n"
22+
23+
#: ../../en/cap/index.rst:2 9c11984cc8a34dfdaf5ca25bde76d827
24+
msgid "Cap"
25+
msgstr ""
26+

0 commit comments

Comments
 (0)