diff --git a/docs/en/api/gpio.md b/docs/en/api/gpio.md index 7713b98a..7e58d6e6 100644 --- a/docs/en/api/gpio.md +++ b/docs/en/api/gpio.md @@ -15,7 +15,7 @@ Return: digital level(0/1) **Example** -```c++ +```arduino uint32_t pin21_data; pin21_data = digitalRead(21); ``` \ No newline at end of file diff --git a/docs/en/api/speaker.md b/docs/en/api/speaker.md index f554e80e..f2c3e127 100644 --- a/docs/en/api/speaker.md +++ b/docs/en/api/speaker.md @@ -10,6 +10,6 @@ Set the pitch of speaker. | freq | uint32_t | frequency | **Example** -```c++ +```arduino M5.Speaker.tone(100); ``` \ No newline at end of file diff --git a/docs/en/module/lora.md b/docs/en/module/lora.md index c2842a8a..7d077ad0 100644 --- a/docs/en/module/lora.md +++ b/docs/en/module/lora.md @@ -46,7 +46,7 @@ account the distance, anti-interference and power consumption ?> **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 -```cpp +```arduino pinMode(5,OUTPUT); digitalWrite(5,HIGH); m5.begin(); diff --git a/docs/en/module/servo.md b/docs/en/module/servo.md index b5a3cef1..21d05b60 100644 --- a/docs/en/module/servo.md +++ b/docs/en/module/servo.md @@ -41,7 +41,7 @@ Servo is communicated with M5Core through GROVE interface(I2C communication). Th ### 1. Arduino IDE -```c++ +```arduino #define SERVO_ADDR 0x53 //the IIC address of SERVO Module /* * control servo(CH channle) by us diff --git a/docs/en/module/sim800.md b/docs/en/module/sim800.md index 49953617..17caf702 100644 --- a/docs/en/module/sim800.md +++ b/docs/en/module/sim800.md @@ -66,7 +66,7 @@ your own.npm i docsify-cli -g Here's a example using SIM800 for sending SMS -```c++ +```arduino /* * Master.ino */ diff --git a/docs/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md b/docs/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md index b598b05a..abeb0b21 100644 --- a/docs/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md +++ b/docs/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows.md @@ -77,7 +77,7 @@ Open Arduino IDE, then new a `.ino` file, rename it as `my_test.ino` Copy the below code to my_test.ino -```cpp +```arduino #include // the setup routine runs once when M5Stack starts up diff --git a/docs/en/unit/adc.md b/docs/en/unit/adc.md index 1844d37c..c1c0b2fc 100644 --- a/docs/en/unit/adc.md +++ b/docs/en/unit/adc.md @@ -35,7 +35,7 @@ This is a unit having self-calibrating function and 16bit analog-to-digitial cov ## Example -```c++ +```arduino ADS1100 ads;//new a object ads.getAddr_ADS1100(0x48);//ADS1100_DEFAULT_ADDRESS: 0x48 diff --git a/docs/en/unit/angle.md b/docs/en/unit/angle.md index 5b6d5b7f..c24749f9 100644 --- a/docs/en/unit/angle.md +++ b/docs/en/unit/angle.md @@ -26,7 +26,7 @@ angle. ### 1. Arduino IDE -```c++ +```arduino #include // select the input pin for the potentiometer int sensorPin = 36; diff --git a/docs/en/unit/button.md b/docs/en/unit/button.md index 23bb2e8f..141d6f62 100644 --- a/docs/en/unit/button.md +++ b/docs/en/unit/button.md @@ -23,7 +23,7 @@ The Unit BUTTON is a sigle-button unit that can be detected whether the button p ## Example -```c++ +```arduino float tmp = dht12.readTemperature();//temperature float hum = dht12.readHumidity();//humidity float pressure = bme.readPressure();//pressure diff --git a/docs/en/unit/color.md b/docs/en/unit/color.md index bda79392..d3f71305 100644 --- a/docs/en/unit/color.md +++ b/docs/en/unit/color.md @@ -33,7 +33,7 @@ This is a unit can detecte the color of object surface which integrates TCS3472 ## Example ### 1. Arduino IDE -```c++ +```arduino Adafruit_TCS34725 tcs; tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS, TCS34725_GAIN_4X); diff --git a/docs/en/unit/dac.md b/docs/en/unit/dac.md index 1b672b0f..ad41ffb7 100644 --- a/docs/en/unit/dac.md +++ b/docs/en/unit/dac.md @@ -33,7 +33,7 @@ This is a unit can convert digital signal to analog signal like voltage waveform ## Example ### 1. Arduino IDE