mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
updated
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
*Refer to GPIO API of [Arduino](http://www.arduino.cc)*
|
||||
|
||||
### <mark>digitalRead</mark>
|
||||
### digitalRead
|
||||
> uint32 digitalRead(uint8 pin);
|
||||
|
||||
Read the value of `pin`
|
||||
|
||||
+18
-7
@@ -1,15 +1,26 @@
|
||||
# Speaker
|
||||
|
||||
### <mark>tone</mark>
|
||||
> M5.Speaker.tone(uint32_t freq);
|
||||
### tone
|
||||
|
||||
Set the pitch of speaker.
|
||||
**Function prototype:**
|
||||
|
||||
| Param | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| freq | <code>uint32_t</code> | frequency |
|
||||
<mark>tone(uint16_t freq);</mark> // for arduino
|
||||
|
||||
<mark>tone(uint16_t freq, uint32_t duration);</mark> // for arduino
|
||||
<!-- <mark>fillScreen(color)</mark> # for micropython -->
|
||||
|
||||
**Function: Set the pitch of speaker.**
|
||||
|
||||
| Param | Description |
|
||||
| --- | --- |
|
||||
| freq | frequency |
|
||||
| duration | duration (unit: millisecond) |
|
||||
|
||||
**Example**
|
||||
```arduino
|
||||
M5.Speaker.tone(100);
|
||||
#include <M5Stack.h>
|
||||
|
||||
M5.begin();
|
||||
|
||||
M5.Speaker.tone(900, 1000);
|
||||
```
|
||||
+2
-2
@@ -55,11 +55,11 @@ pixels.setPixelColor(2, pixels.Color(0,0,100));
|
||||
pixels.show(); // This sends the updated pixel color to the hardware.
|
||||
```
|
||||
|
||||
<!-- ### 2. UIFlow
|
||||
### 2. UIFlow
|
||||
|
||||
*If you want the complete code, please click [here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RGB/UIFlow).*
|
||||
|
||||
<img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_02.png" width="55%" height="55%">-->
|
||||
<img src="assets/img/product_pics/unit/unit_example/RGB/example_unit_rgb_01.png">
|
||||
|
||||
<!-- ## 原理图 -->
|
||||
|
||||
|
||||
+22
-22
@@ -13,7 +13,7 @@
|
||||
|
||||
[](en/core/basic) [](en/core/gray) [](en/core/fire)
|
||||
|
||||
**BASIC** **GRAY** **FIRE**
|
||||
*BASIC* *GRAY* *FIRE*
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
[](en/core/m5go_lite) [](en/core/m5go) [](en/core/face_kit)
|
||||
|
||||
**M5GO Lite** **M5GO Kit** **FACES Kit**
|
||||
*M5GO Lite* *M5GO Kit* *FACES Kit*
|
||||
|
||||
***
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
[](en/module/gps) [](en/module/lora) [](en/module/lorawan) [](en/module/sim800)
|
||||
|
||||
**GPS** **LORA** **LoRaWAN** **SIM800L**
|
||||
*GPS* *LORA* *LoRaWAN* *SIM800L*
|
||||
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
|
||||
[](en/module/battery) [](en/module/proto) [](en/module/plus) [](en/module/usb)
|
||||
|
||||
**BATTERY** **PROTO** **PLUS** **USB**
|
||||
*BATTERY* *PROTO* *PLUS* *USB*
|
||||
|
||||
[](en/module/bus)
|
||||
|
||||
**BUS**
|
||||
*BUS*
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
[](en/module/stepmotor) [](en/module/servo) [](en/module/lego_plus)
|
||||
|
||||
**STEPMOTOR** **SERVO** **LEGO+**
|
||||
*STEPMOTOR* *SERVO* *LEGO+*
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
[](en/module/encoder) [](en/module/joystick)
|
||||
|
||||
**ENCODER** **JOYSTICK**
|
||||
*ENCODER* *JOYSTICK*
|
||||
|
||||
***
|
||||
|
||||
@@ -89,13 +89,13 @@
|
||||
|
||||
[](en/base/lan_base) [](en/base/node_base) [](en/base/btc_base) [](en/base/plc_base)
|
||||
|
||||
**LAN** **NODE** **BTC** **PLC**
|
||||
*LAN* *NODE* *BTC* *PLC*
|
||||
|
||||
|
||||
|
||||
[](en/base/core_bottom) [](en/base/m5go_bottom) [](en/base/m5go_rfid) [](en/base/m5go_charger)
|
||||
|
||||
**Core BOTTOM** **M5GO BOTTOM** **M5GO RFID** **M5GO CHARGER**
|
||||
*Core BOTTOM* *M5GO BOTTOM* *M5GO RFID* *M5GO CHARGER*
|
||||
|
||||
***
|
||||
|
||||
@@ -109,55 +109,55 @@
|
||||
|
||||
[](en/unit/esp32cam) [](en/unit/m5camera) [](en/unit/m5camera_f)
|
||||
|
||||
**ESP32CAM** **M5Camera** **M5CameraF**
|
||||
*ESP32CAM* *M5Camera* *M5CameraF*
|
||||
|
||||
|
||||
|
||||
[](en/unit/env) [](en/unit/earth) [](en/unit/light) [](en/unit/angle)
|
||||
|
||||
**ENV** **EARTH** **LIGHT** **ANGLE**
|
||||
*ENV* *EARTH* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](en/unit/ir) [](en/unit/pir) [](en/unit/ncir) [](en/unit/thermal)
|
||||
|
||||
**IR** **PIR** **NCIR** **THERMAL**
|
||||
*IR* *PIR* *NCIR* *THERMAL*
|
||||
|
||||
|
||||
|
||||
[](en/unit/button) [](en/unit/dual_button) [](en/unit/joystick) [](en/unit/cardkb)
|
||||
|
||||
**BUTTOM** **Dual-BUTTOM** **JOYSTICK** **CardKB**
|
||||
*BUTTOM* *Dual-BUTTOM* *JOYSTICK* *CardKB*
|
||||
|
||||
|
||||
|
||||
[](en/unit/color) [](en/unit/tof) [](en/unit/heart) [](en/unit/rfid)
|
||||
|
||||
**COLOR** **ToF** **HEART** **RFID**
|
||||
*COLOR* *ToF* *HEART* *RFID*
|
||||
|
||||
|
||||
|
||||
[](en/unit/adc) [](en/unit/dac) [](en/unit/makey) [](en/unit/rgb)
|
||||
|
||||
**ADC** **DAC** **LIGHT** **ANGLE**
|
||||
*ADC* *DAC* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](en/unit/relay) [](en/unit/hub) [](en/unit/396port) [](en/unit/proto)
|
||||
|
||||
**RELAY** **HUB** **3.96Port** **PROTO**
|
||||
*RELAY* *HUB* *3.96Port* *PROTO*
|
||||
|
||||
|
||||
|
||||
[](en/unit/extio) [](en/unit/rs485) [](en/unit/gps) [](en/unit/finger)
|
||||
|
||||
**EXT.IO** **RS485** **GPS** **FINGER**
|
||||
*EXT.IO* *RS485* *GPS* *FINGER*
|
||||
|
||||
|
||||
|
||||
[](en/unit/weight) [](en/unit/trace)
|
||||
|
||||
**WEIGHT** **TRACE**
|
||||
*WEIGHT* *TRACE*
|
||||
|
||||
|
||||
|
||||
@@ -165,13 +165,13 @@
|
||||
|
||||
[](en/unit/neopixel) [](en/unit/catear) [](en/unit/hex) [](en/unit/neoflash)
|
||||
|
||||
**NeoPixel** **CatEar** **HEX** **NeoFlash**
|
||||
*NeoPixel* *CatEar* *HEX* *NeoFlash*
|
||||
|
||||
|
||||
|
||||
[](en/unit/butterfly)
|
||||
|
||||
**BUTTERFLY**
|
||||
*BUTTERFLY*
|
||||
|
||||
***
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
[](en/app/bala) [](en/app/lidarbot) [](en/app/piano) [](en/app/flir)
|
||||
|
||||
**BALA** **LidarBOT** **PIANO** **FLIR**
|
||||
*BALA* *LidarBOT* *PIANO* *FLIR*
|
||||
|
||||
***
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
|
||||
[](en/accessory/convertor/grove_t)
|
||||
|
||||
**Grove-T**
|
||||
*Grove-T*
|
||||
|
||||
<!-- [](en/tool/usb_downloader)
|
||||
|
||||
|
||||
+22
-22
@@ -12,7 +12,7 @@
|
||||
|
||||
[](ja/core/basic) [](ja/core/gray) [](ja/core/fire)
|
||||
|
||||
**BASIC** **GRAY** **FIRE**
|
||||
*BASIC* *GRAY* *FIRE*
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
[](ja/core/m5stick)
|
||||
|
||||
**M5Stick**
|
||||
*M5Stick*
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
[](ja/core/m5go_lite) [](ja/core/m5go) [](ja/core/face_kit)
|
||||
|
||||
**M5GO Lite** **M5GO Kit** **FACES Kit**
|
||||
*M5GO Lite* *M5GO Kit* *FACES Kit*
|
||||
|
||||
***
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
|
||||
[](ja/module/gps) [](ja/module/lora) [](ja/module/lorawan) [](ja/module/sim800)
|
||||
|
||||
**GPS** **LORA** **LoRaWAN** **SIM800L**
|
||||
*GPS* *LORA* *LoRaWAN* *SIM800L*
|
||||
|
||||
|
||||
|
||||
[](ja/module/commu)
|
||||
|
||||
**COMMU**
|
||||
*COMMU*
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
[](ja/module/battery) [](ja/module/proto) [](ja/module/plus) [](ja/module/usb)
|
||||
|
||||
**BATTERY** **PROTO** **PLUS** **USB**
|
||||
*BATTERY* *PROTO* *PLUS* *USB*
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
[](ja/module/stepmotor) [](ja/module/servo) [](ja/module/lego_plus)
|
||||
|
||||
**STEPMOTOR** **SERVO** **LEGO+**
|
||||
*STEPMOTOR* *SERVO* *LEGO+*
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
[](ja/module/encoder) [](ja/module/joystick)
|
||||
|
||||
**ENCODER** **JOYSTICK**
|
||||
*ENCODER* *JOYSTICK*
|
||||
|
||||
***
|
||||
|
||||
@@ -84,13 +84,13 @@
|
||||
|
||||
[](ja/base/lan_base) [](ja/base/node_base) [](ja/base/btc_base) [](ja/base/plc_base)
|
||||
|
||||
**LAN** **NODE** **BTC** **PLC**
|
||||
*LAN* *NODE* *BTC* *PLC*
|
||||
|
||||
|
||||
|
||||
[](ja/base/core_bottom) [](ja/base/m5go_bottom) [](ja/base/m5go_rfid) [](ja/base/m5go_charger)
|
||||
|
||||
**Core BOTTOM** **M5GO BOTTOM** **M5GO RFID** **M5GO CHARGER**
|
||||
*Core BOTTOM* *M5GO BOTTOM* *M5GO RFID* *M5GO CHARGER*
|
||||
|
||||
***
|
||||
|
||||
@@ -104,55 +104,55 @@
|
||||
|
||||
[](ja/unit/esp32cam) [](ja/unit/m5camera) [](ja/unit/m5camera_f)
|
||||
|
||||
**ESP32CAM** **M5Camera** **M5CameraF**
|
||||
*ESP32CAM* *M5Camera* *M5CameraF*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/env) [](ja/unit/earth) [](ja/unit/light) [](ja/unit/angle)
|
||||
|
||||
**ENV** **EARTH** **LIGHT** **ANGLE**
|
||||
*ENV* *EARTH* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/ir) [](ja/unit/pir) [](ja/unit/ncir) [](ja/unit/thermal)
|
||||
|
||||
**IR** **PIR** **NCIR** **THERMAL**
|
||||
*IR* *PIR* *NCIR* *THERMAL*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/button) [](ja/unit/dual_button) [](ja/unit/joystick) [](ja/unit/cardkb)
|
||||
|
||||
**BUTTOM** **Dual-BUTTOM** **JOYSTICK** **CardKB**
|
||||
*BUTTOM* *Dual-BUTTOM* *JOYSTICK* *CardKB*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/color) [](ja/unit/tof) [](ja/unit/heart) [](ja/unit/rfid)
|
||||
|
||||
**COLOR** **ToF** **HEART** **RFID**
|
||||
*COLOR* *ToF* *HEART* *RFID*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/adc) [](ja/unit/dac) [](ja/unit/makey) [](ja/unit/rgb)
|
||||
|
||||
**ADC** **DAC** **LIGHT** **ANGLE**
|
||||
*ADC* *DAC* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/relay) [](ja/unit/hub) [](ja/unit/396port) [](ja/unit/proto)
|
||||
|
||||
**RELAY** **HUB** **3.96Port** **PROTO**
|
||||
*RELAY* *HUB* *3.96Port* *PROTO*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/extio) [](ja/unit/rs485) [](ja/unit/gps) [](ja/unit/finger)
|
||||
|
||||
**EXT.IO** **RS485** **GPS** **FINGER**
|
||||
*EXT.IO* *RS485* *GPS* *FINGER*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/weight) [](ja/unit/trace)
|
||||
|
||||
**WEIGHT** **TRACE**
|
||||
*WEIGHT* *TRACE*
|
||||
|
||||
|
||||
|
||||
@@ -160,13 +160,13 @@
|
||||
|
||||
[](ja/unit/neopixel) [](ja/unit/catear) [](ja/unit/hex) [](ja/unit/neoflash)
|
||||
|
||||
**NeoPixel** **CatEar** **HEX** **NeoFlash**
|
||||
*NeoPixel* *CatEar* *HEX* *NeoFlash*
|
||||
|
||||
|
||||
|
||||
[](ja/unit/butterfly)
|
||||
|
||||
**BUTTERFLY**
|
||||
*BUTTERFLY*
|
||||
|
||||
***
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
[](ja/app/bala) [](ja/app/lidarbot) [](ja/app/piano) [](ja/app/flir)
|
||||
|
||||
**BALA** **LidarBOT** **PIANO** **FLIR**
|
||||
*BALA* *LidarBOT* *PIANO* *FLIR*
|
||||
|
||||
<!-- *** -->
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Speaker
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
### <mark>tone</mark>
|
||||
> M5.Speaker.tone(uint32_t freq);
|
||||
|
||||
@@ -14,4 +14,4 @@ Set the pitch of speaker.
|
||||
**Example**
|
||||
```arduino
|
||||
M5.Speaker.tone(100);
|
||||
```
|
||||
``` -->
|
||||
+2
-2
@@ -48,11 +48,11 @@ pixels.setPixelColor(2, pixels.Color(0,0,100));
|
||||
pixels.show(); // This sends the updated pixel color to the hardware.
|
||||
```
|
||||
|
||||
<!-- ### 2. UIFlow
|
||||
### 2. UIFlow
|
||||
|
||||
*特定のルーチンについてはここをクリックしてください[サンプルコード](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RGB/UIFlow).*
|
||||
|
||||
<img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_02.png" width="55%" height="55%">-->
|
||||
<img src="assets/img/product_pics/unit/unit_example/RGB/example_unit_rgb_01.png">
|
||||
|
||||
<!-- ## 回路図
|
||||
|
||||
|
||||
+24
-24
@@ -12,7 +12,7 @@
|
||||
|
||||
[](zh_CN/core/basic) [](zh_CN/core/gray) [](zh_CN/core/fire)
|
||||
|
||||
**BASIC** **GRAY** **FIRE**
|
||||
*BASIC* *GRAY* *FIRE*
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
[](zh_CN/core/m5stick)
|
||||
|
||||
**M5Stick**
|
||||
*M5Stick*
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
[](zh_CN/core/m5go_lite) [](zh_CN/core/m5go) [](zh_CN/core/face_kit)
|
||||
|
||||
**M5GO Lite 套件** **M5GO 套件** **FACES 套件**
|
||||
*M5GO Lite 套件* *M5GO 套件* *FACES 套件*
|
||||
|
||||
***
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
|
||||
[](zh_CN/module/gps) [](zh_CN/module/lora) [](zh_CN/module/lorawan) [](zh_CN/module/sim800)
|
||||
|
||||
**GPS** **LORA** **LoRaWAN** **SIM800L**
|
||||
*GPS* *LORA* *LoRaWAN* *SIM800L*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/module/commu)
|
||||
|
||||
**COMMU**
|
||||
*COMMU*
|
||||
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
|
||||
[](zh_CN/module/battery) [](zh_CN/module/proto) [](zh_CN/module/plus) [](zh_CN/module/usb)
|
||||
|
||||
**BATTERY** **PROTO** PLUS **USB**
|
||||
*BATTERY* *PROTO* PLUS *USB*
|
||||
|
||||
[](zh_CN/module/bus)
|
||||
|
||||
**BUS**
|
||||
*BUS*
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
[](zh_CN/module/stepmotor) [](zh_CN/module/servo) [](zh_CN/module/lego_plus)
|
||||
|
||||
**STEPMOTOR** **SERVO** **LEGO+**
|
||||
*STEPMOTOR* *SERVO* *LEGO+*
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
[](zh_CN/module/encoder) [](zh_CN/module/joystick)
|
||||
|
||||
**ENCODER** **JOYSTICK**
|
||||
*ENCODER* *JOYSTICK*
|
||||
|
||||
***
|
||||
|
||||
@@ -88,13 +88,13 @@
|
||||
|
||||
[](zh_CN/base/lan_base) [](zh_CN/base/node_base) [](zh_CN/base/btc_base) [](zh_CN/base/plc_base)
|
||||
|
||||
**LAN** **NODE** **BTC** **PLC**
|
||||
*LAN* *NODE* *BTC* *PLC*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/base/core_bottom) [](zh_CN/base/m5go_bottom) [](zh_CN/base/m5go_rfid) [](zh_CN/base/m5go_charger)
|
||||
|
||||
**Core BOTTOM** **M5GO BOTTOM** **M5GO RFID** **M5GO CHARGER**
|
||||
*Core BOTTOM* *M5GO BOTTOM* *M5GO RFID* *M5GO CHARGER*
|
||||
|
||||
***
|
||||
|
||||
@@ -108,55 +108,55 @@
|
||||
|
||||
[](zh_CN/unit/esp32cam) [](zh_CN/unit/m5camera) [](zh_CN/unit/m5camera_f)
|
||||
|
||||
**ESP32CAM** **M5Camera** **M5CameraF**
|
||||
*ESP32CAM* *M5Camera* *M5CameraF*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/env) [](zh_CN/unit/earth) [](zh_CN/unit/light) [](zh_CN/unit/angle)
|
||||
|
||||
**ENV** **EARTH** **LIGHT** **ANGLE**
|
||||
*ENV* *EARTH* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/ir) [](zh_CN/unit/pir) [](zh_CN/unit/ncir) [](zh_CN/unit/thermal)
|
||||
|
||||
**IR** **PIR** **NCIR** **THERMAL**
|
||||
*IR* *PIR* *NCIR* *THERMAL*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/button) [](zh_CN/unit/dual_button) [](zh_CN/unit/joystick) [](zh_CN/unit/cardkb)
|
||||
|
||||
**BUTTOM** **Dual-BUTTOM** **JOYSTICK** **CardKB**
|
||||
*BUTTOM* *Dual-BUTTOM* *JOYSTICK* *CardKB*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/color) [](zh_CN/unit/tof) [](zh_CN/unit/heart) [](zh_CN/unit/rfid)
|
||||
|
||||
**COLOR** **ToF** **HEART** **RFID**
|
||||
*COLOR* *ToF* *HEART* *RFID*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/adc) [](zh_CN/unit/dac) [](zh_CN/unit/makey) [](zh_CN/unit/rgb)
|
||||
|
||||
**ADC** **DAC** **LIGHT** **ANGLE**
|
||||
*ADC* *DAC* *LIGHT* *ANGLE*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/relay) [](zh_CN/unit/hub) [](zh_CN/unit/396port) [](zh_CN/unit/proto)
|
||||
|
||||
**RELAY** **HUB** **3.96Port** **PROTO**
|
||||
*RELAY* *HUB* *3.96Port* *PROTO*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/extio) [](zh_CN/unit/rs485) [](zh_CN/unit/gps) [](zh_CN/unit/finger)
|
||||
|
||||
**EXT.IO** **RS485** **GPS** **FINGER**
|
||||
*EXT.IO* *RS485* *GPS* *FINGER*
|
||||
|
||||
|
||||
|
||||
[](zh_CN/unit/weight) [](zh_CN/unit/trace)
|
||||
|
||||
**WEIGHT** **TRACE**
|
||||
*WEIGHT* *TRACE*
|
||||
|
||||
|
||||
|
||||
@@ -164,11 +164,11 @@
|
||||
|
||||
[](zh_CN/unit/neopixel) [](zh_CN/unit/catear) [](zh_CN/unit/hex) [](zh_CN/unit/neoflash)
|
||||
|
||||
**NeoPixel** **CatEar** **HEX** **NeoFlash**
|
||||
*NeoPixel* *CatEar* *HEX* *NeoFlash*
|
||||
|
||||
[](zh_CN/unit/butterfly)
|
||||
|
||||
**BUTTERFLY**
|
||||
*BUTTERFLY*
|
||||
|
||||
***
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
[](zh_CN/app/bala) [](zh_CN/app/lidarbot) [](zh_CN/app/piano) [](zh_CN/app/flir)
|
||||
|
||||
**BALA** **LidarBOT** **PIANO** **FLIR**
|
||||
*BALA* *LidarBOT* *PIANO* *FLIR*
|
||||
|
||||
***
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
[](zh_CN/accessory/convertor/grove_t)
|
||||
|
||||
**Grove-T**
|
||||
*Grove-T*
|
||||
|
||||
<!-- GitHub Buttons -->
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 喇叭
|
||||
|
||||
### <mark>tone</mark>
|
||||
<!-- ### tone
|
||||
> M5.Speaker.tone(uint32_t freq);
|
||||
|
||||
设置声音音高
|
||||
@@ -12,13 +12,14 @@
|
||||
**例程**
|
||||
```arduino
|
||||
M5.Speaker.tone(100);
|
||||
```
|
||||
``` -->
|
||||
|
||||
### tone()
|
||||
|
||||
**函数原型:**
|
||||
|
||||
<mark>tone(uint16_t freq);</mark> // for arduino
|
||||
|
||||
<mark>tone(uint16_t freq, uint32_t duration);</mark> // for arduino
|
||||
<!-- <mark>fillScreen(color)</mark> # for micropython -->
|
||||
|
||||
@@ -29,7 +30,7 @@ M5.Speaker.tone(100);
|
||||
| freq | 声音频率 |
|
||||
| duration | 持续时间 (单位:毫秒) |
|
||||
|
||||
*如果函数的 duration 值没给出,则使用当前的背景颜色。*
|
||||
<!-- *如果函数的 duration 值没给出,则使用当前的背景颜色。* -->
|
||||
|
||||
**例程**
|
||||
```arduino
|
||||
|
||||
@@ -53,11 +53,11 @@ pixels.setPixelColor(2, pixels.Color(0,0,100));
|
||||
pixels.show(); // This sends the updated pixel color to the hardware.
|
||||
```
|
||||
|
||||
<!-- ### 2. UIFlow
|
||||
### 2. UIFlow
|
||||
|
||||
*具体例程请点击[这里](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RGB/UIFlow)。*
|
||||
|
||||
<img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_01.png" width="30%" height="30%"> <img src="assets/img/product_pics/unit/unit_example/example_unit_rgb_02.png" width="55%" height="55%">-->
|
||||
<img src="assets/img/product_pics/unit/unit_example/RGB/example_unit_rgb_01.png">
|
||||
|
||||
<!-- ## 原理图 -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user