diff --git a/docs/assets/img/faq/factorytest_01.png b/docs/assets/img/faq/factorytest_01.png new file mode 100644 index 00000000..287881f1 Binary files /dev/null and b/docs/assets/img/faq/factorytest_01.png differ diff --git a/docs/assets/img/faq/faq_com_port_01.png b/docs/assets/img/faq/faq_com_port_01.png new file mode 100644 index 00000000..77069e83 Binary files /dev/null and b/docs/assets/img/faq/faq_com_port_01.png differ diff --git a/docs/assets/img/faq/faq_com_port_02.png b/docs/assets/img/faq/faq_com_port_02.png new file mode 100644 index 00000000..859e8e5d Binary files /dev/null and b/docs/assets/img/faq/faq_com_port_02.png differ diff --git a/docs/assets/img/faq/white_screen.jpg b/docs/assets/img/faq/white_screen.jpg new file mode 100644 index 00000000..20273f22 Binary files /dev/null and b/docs/assets/img/faq/white_screen.jpg differ diff --git a/docs/assets/img/product_pics/module/module_example/LORA/example_module_lora_01.png b/docs/assets/img/product_pics/module/module_example/LORA/example_module_lora_01.png index 7354a8fa..96561a5e 100644 Binary files a/docs/assets/img/product_pics/module/module_example/LORA/example_module_lora_01.png and b/docs/assets/img/product_pics/module/module_example/LORA/example_module_lora_01.png differ diff --git a/docs/en/module/lora.md b/docs/en/module/lora.md index 7d077ad0..4546bfe3 100644 --- a/docs/en/module/lora.md +++ b/docs/en/module/lora.md @@ -43,14 +43,68 @@ account the distance, anti-interference and power consumption - **[LoRa Info](http://wiki.ai-thinker.com/lora) (LoRa)** -?> **Note** If your board LCD can't display or has some other problem, we suggest -you to add the two statements code followed by ``m5.begin();`` as shown -below +?> If your board LCD can't display or has some other problem, we suggest you to add the two statements code followed by ``m5.begin();`` as shown below. Because GPIO5 who has connected NSS pin of LoRa module need be pull-up at the moment your board(or system) power on to prevent system's LCD can't display. ```arduino pinMode(5,OUTPUT); digitalWrite(5,HIGH); m5.begin(); ``` -?> **Note** Because GPIO5 who has connected NSS pin of LoRa module need be pull-up -at the moment your board(or system) power on to prevent system's LCD -can't display. + +## Example + +### Arduino IDE + +This is point-to-point communication example between two LORA modules. One is transmitter, another is receiver. + +*If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LORA/Arduino)* + +```arduino +#include +#include + +// declaration +static uint32_t counter; + +// initialization +// override the default CS, reset, and IRQ pins (optional) +LoRa.setPins(); // default set CS, reset, IRQ pin +M5.Lcd.println("LoRa Sender"); +// frequency in Hz (433E6, 866E6, 915E6) +LoRa.begin(433E6); + +// send data +LoRa.beginPacket(); +LoRa.print("hello "); +LoRa.print(counter);// lora send data +LoRa.endPacket(); +``` + +```arduino +/* + LoRaReceiver.ino +*/ +#include +#include + +// initialization +M5.begin(); +// override the default CS, reset, and IRQ pins (optional) +LoRa.setPins();// default set CS, reset, IRQ pin +// frequency in Hz (433E6, 866E6, 915E6) +LoRa.begin(433E6); + +// try to parse packet +int packetSize = LoRa.parsePacket(); +if (packetSize) { + // read packet + while (LoRa.available()) { + char ch = (char)LoRa.read(); + M5.Lcd.print(ch); + } + // print RSSI of packet + M5.Lcd.print("\" with RSSI "); + M5.Lcd.println(LoRa.packetRssi()); +} +``` + + \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 487f6b3d..b57eed37 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,9 +24,7 @@ **Communication Modules** - - -[![module_lora.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lora_01.png)](en/module/lora)         [![module_lorawan.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lorawan_01.png)](en/module/lorawan)         [![module_sim800.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_sim800_01.png)](en/module/sim800) +[![module_gps.png](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_gps_01.png)](en/module/gps)         [![module_lora.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lora_01.png)](en/module/lora)         [![module_lorawan.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_lorawan_01.png)](en/module/lorawan)         [![module_sim800.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_sim800_01.png)](en/module/sim800) [![module_commu.jpg](http://m5-docs.oss-cn-shenzhen.aliyuncs.com/assets/img/product_pics/homepage_picture/module/module_commu_01.png)](en/module/commu)          diff --git a/docs/zh_CN/faq.md b/docs/zh_CN/faq.md index 46d80fa1..cdc04e7c 100644 --- a/docs/zh_CN/faq.md +++ b/docs/zh_CN/faq.md @@ -45,4 +45,9 @@ https://github.com/m5stack/M5-Schematic/blob/master/Core/hardware_diff_between_m5cores.md +- Q. USB插入Core之后,识别不到串口号? + - A. 这些Core主要区别在内部硬件配置和套件搭配上,从基础版到升级版,分别是增加了运动传感器和加大了RAM和FLASH,具体区别请访问这个链接 + + https://github.com/m5stack/M5-Schematic/blob/master/Core/hardware_diff_between_m5cores.md + --- --> \ No newline at end of file diff --git a/docs/zh_CN/module/lora.md b/docs/zh_CN/module/lora.md index c7035781..3c003d14 100644 --- a/docs/zh_CN/module/lora.md +++ b/docs/zh_CN/module/lora.md @@ -47,10 +47,63 @@ M5Stack LoRa模块适用于长距离通信,结合多个LoRa模块,能组成 m5.begin(); ``` - +### Arduino IDE +这是两个LORA模块点对点通信的例程,一个作为信号发射节点,一个作为信号接收节点。 +*以下仅为用法示意,并不完整。如果需要完整例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Module/LORA/Arduino)* + +```arduino +#include +#include + +// declaration +static uint32_t counter; + +// initialization +// override the default CS, reset, and IRQ pins (optional) +LoRa.setPins(); // default set CS, reset, IRQ pin +M5.Lcd.println("LoRa Sender"); +// frequency in Hz (433E6, 866E6, 915E6) +LoRa.begin(433E6); + +// send data +LoRa.beginPacket(); +LoRa.print("hello "); +LoRa.print(counter);// lora send data +LoRa.endPacket(); +``` + +```arduino +/* + LoRaReceiver.ino +*/ +#include +#include + +// initialization +M5.begin(); +// override the default CS, reset, and IRQ pins (optional) +LoRa.setPins();// default set CS, reset, IRQ pin +// frequency in Hz (433E6, 866E6, 915E6) +LoRa.begin(433E6); + +// try to parse packet +int packetSize = LoRa.parsePacket(); +if (packetSize) { + // read packet + while (LoRa.available()) { + char ch = (char)LoRa.read(); + M5.Lcd.print(ch); + } + // print RSSI of packet + M5.Lcd.print("\" with RSSI "); + M5.Lcd.println(LoRa.packetRssi()); +} +``` + + diff --git a/docs/zh_CN/unit/finger.md b/docs/zh_CN/unit/finger.md index 77ba3f2d..38d40726 100644 --- a/docs/zh_CN/unit/finger.md +++ b/docs/zh_CN/unit/finger.md @@ -18,6 +18,10 @@ - 设置指纹识别比对等级 +## 例程 + +### 1. Arduino IDE + ## 原理图 @@ -29,6 +33,10 @@ FINGER指纹识别UnitTXDRXD5VGND - +## 相关视频 + +- **FINGER的演示** + + \ No newline at end of file