diff --git a/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/reTerminal-build-UI-using-LVGL.md b/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/reTerminal-build-UI-using-LVGL.md index 5c6452d41897..5b4c349c1410 100644 --- a/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/reTerminal-build-UI-using-LVGL.md +++ b/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/reTerminal-build-UI-using-LVGL.md @@ -147,7 +147,7 @@ To see how can you build your own UI application for reTerminal with LVGL 8.0, y All the necessary components are imported and initialized in main.c, after that the main UI function is called. The UI description, callbacks and helper functions are located inside of **lv_demo_reterminal_UI/lv_demo_reterminal_UI.c**. -```C +```cpp tv = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, tab_h); lv_obj_set_style_text_font(lv_scr_act(), font_normal, 0); @@ -166,7 +166,7 @@ We create a Tabview widget on the active screen and populate it with three tabs: The content of each tab is initialized separately in a corresponding function: -```C +```cpp assistant_create(t1); debug_create(t2); stats_create(t3); @@ -178,7 +178,7 @@ The content of each tab is initialized separately in a corresponding function: Additionally color changer elements are created on the Tabview widget and built-in accelerometer is initialized. After that we create three timer callbacks with dummy input data: -```C +```cpp static uint32_t user_data = 10; lv_timer_t * time_timer = lv_timer_create(time_timer_cb, 1, &user_data); lv_timer_t * system_timer = lv_timer_create(system_timer_cb, 500, &user_data); @@ -187,7 +187,7 @@ Additionally color changer elements are created on the Tabview widget and built- These are responsible for getting system time, system status (CPU, Mem, Disk Space, Ethernet current speed, etc) and accelerometer readings respectively. You can find these three callback functions at the bottom of the lv_demo_reterminal_UI.c. -```C +```cpp void time_timer_cb(lv_timer_t * timer) { @@ -245,7 +245,7 @@ If you decide to follow our demo application closely when creating your first UI **assistant_create** We create a panel object for the tab and set its height. -```C +```cpp lv_obj_t * panel1 = lv_obj_create(parent); lv_obj_set_height(panel1, lv_pct(100)); ``` @@ -256,7 +256,7 @@ Then we create an image button object from C array located in assets folder, obt

pir

-```C +```cpp LV_IMG_DECLARE(speech_btn_img); /*Create a transition animation on width transformation and recolor.*/ @@ -289,7 +289,7 @@ In the next code block we create text labels for time, date, user greeting. Thes

pir

-```C +```cpp lv_obj_t * name = lv_label_create(panel1); lv_label_set_text(name, "Hi there, Username"); lv_obj_add_style(name, &style_large, 0); @@ -318,7 +318,7 @@ Note that the grid layout feature of LVGL needs to be globally enabled with ```L You can read about Layouts in LVGL in more detail by following [this link](https://docs.lvgl.io/master/layouts/grid.html). -```C +```cpp static lv_coord_t grid_main_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST}; static lv_coord_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; diff --git a/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/weather-dashboard-with-Grafana-reTerminal.md b/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/weather-dashboard-with-Grafana-reTerminal.md index 71233d6345f5..6ec581567581 100644 --- a/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/weather-dashboard-with-Grafana-reTerminal.md +++ b/docs/Edge/Raspberry_Pi_Devices/reTerminal/Application/UI_design/weather-dashboard-with-Grafana-reTerminal.md @@ -127,7 +127,7 @@ To collect the weather data, we are going to be using an ESP32 with a DHT11 sens - **Step 2.** Copy the following codes in the skecth. -```c++ +```cpp #include //Import the required libraries #include "DHT.h" #include "Seeed_BMP280.h" diff --git a/docs/FAQ/XIAO/check_battery_voltage.md b/docs/FAQ/XIAO/check_battery_voltage.md index 679172b1ff81..dbc8b104f7f6 100644 --- a/docs/FAQ/XIAO/check_battery_voltage.md +++ b/docs/FAQ/XIAO/check_battery_voltage.md @@ -27,7 +27,7 @@ In addition, during communication in particular, spike-like errors occurred, whi The following is the procedure to test the battery voltage. -```c++ +```cpp void setup() { Serial.begin(115200); pinMode(A0, INPUT); // ADC diff --git a/docs/Network/SenseCAP_K1100/Embedded_ML_Application/K1111-Edge-Impulse.md b/docs/Network/SenseCAP_K1100/Embedded_ML_Application/K1111-Edge-Impulse.md index 8dcead1db813..6d8cbd7ca2b6 100644 --- a/docs/Network/SenseCAP_K1100/Embedded_ML_Application/K1111-Edge-Impulse.md +++ b/docs/Network/SenseCAP_K1100/Embedded_ML_Application/K1111-Edge-Impulse.md @@ -170,7 +170,7 @@ After we generated the library from Edge Impulse. We need to modify the code for Flash the test code below. -```c++ +```cpp #include #include"LIS3DHTR.h" #include"TFT_eSPI.h" diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Helium_Cloud_Services/Helium_Connected&Azure_Integrated/Connecting-to-Helium.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Helium_Cloud_Services/Helium_Connected&Azure_Integrated/Connecting-to-Helium.md index 37b2062caaf3..9b9db85e361f 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Helium_Cloud_Services/Helium_Connected&Azure_Integrated/Connecting-to-Helium.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Helium_Cloud_Services/Helium_Connected&Azure_Integrated/Connecting-to-Helium.md @@ -152,7 +152,7 @@ The above code has no restrictions on the Grove - Wio-E5 connection, it will aut ::: Please select the LoRaWAN® band you wish to use. This band must be consistent with the gateway band you are using. The available frequency bands are in the comments of the code below. In the tutorials we use, the default is the **EU868** band. -```c++ +```cpp #define Frequency DSKLORAE5_ZONE_EU868 /* Select your frequency band here. @@ -532,7 +532,7 @@ If you want to apply the content of this tutorial to your own project developmen At the beginning of the program, we need to prepare the necessary triad information to connect to Helium and to set the frequency of the Wio-E5. -```c++ +```cpp #define Frequency DSKLORAE5_ZONE_EU868 /* Select your frequency band here. @@ -556,7 +556,7 @@ Next, a `data_decord()` function is defined. This function converts the sensor v In general, to prevent data overflow, we need to consider the maximum and minimum values that the sensor may read. And split into hexadecimal numbers that will not overflow. -```c++ +```cpp void data_decord(int val_1, int val_2, uint8_t data[4]) { int val[] = {val_1, val_2}; @@ -580,20 +580,20 @@ void data_decord(int val_1, int val_2, uint8_t data[4]) For the SHT40 sensor, he will have two data, one is temperature data and one is humidity data, and there are positive and negative values, so the negative numbers need to be processed, and also the decimal places need to be processed. -```c++ +```cpp int_temp = temperature*100; int_humi = humidity*100; ``` The next step is the initialization of the SHT40 and the initial setup of the Wio-E5. These will all be executed in the `setup()` function. -```c++ +```cpp lorae5.begin(DSKLORAE5_SWSERIAL_WIO_P2) ``` In the initialization code, `DSKLORAE5_SWSERIAL_WIO_P2` represents the Grove interface on the **right** side of the Wio Terminal, while `DSKLORAE5_SWSERIAL_WIO_P1` represents the Grove interface on the **left** side. For other projects without external sensors, you can also use `DSKLORAE5_SEARCH_WIO` , which will automatically search for the Grove interface your Wio-E5 is connected to. -```c++ +```cpp lorae5.send_sync( //Sending the sensor values out 8, // LoRaWan Port data, // data array @@ -606,7 +606,7 @@ lorae5.send_sync( //Sending the sensor values out The important role of the `send_sync()` function is to send the sensor values over the LoRaWAN®. The first parameter indicates the channel number to send the data, the second parameter indicates the content of the data sent, and the third parameter indicates the length of the data sent. In general, we only need to focus on the content of the first three parameters. -```c++ +```cpp delay(15000); ``` diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-IMU-Sensor-Grove-LoRa-E5.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-IMU-Sensor-Grove-LoRa-E5.md index c1ab3e392b99..479788e3b674 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-IMU-Sensor-Grove-LoRa-E5.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-IMU-Sensor-Grove-LoRa-E5.md @@ -171,7 +171,7 @@ Now, the 3-Axis Digital Accelerometer library can be installed to the Arduino ID This repo demonstrates how to use the built-in IMU sensor as a component in Wio Terminal. Using the library's **getAccelerationX()**, **getAccelerationY()**, and **getAccelerationZ()** functions, you can directly obtain the X-axis, Y-axis, and Z-axis offsets of the IMU sensor. These three values may be positive or negative float numbers. -```c++ +```cpp #include"LIS3DHTR.h" LIS3DHTR lis; diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Soil-Moisture-Sensor-Grove-LoRa-E5.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Soil-Moisture-Sensor-Grove-LoRa-E5.md index 386632ea0f11..234c836d9c3b 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Soil-Moisture-Sensor-Grove-LoRa-E5.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Soil-Moisture-Sensor-Grove-LoRa-E5.md @@ -157,7 +157,7 @@ The reason why the wiring method of the soil moisture sensor is different from o This repo demonstrates how to use the soil moisture sensor. The soil moisture sensor uses an analog interface where you can simply read the moisture value of the soil by reading its pins. -```c++ +```cpp int sensorPin = A0; int sensorValue = 0; diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Temp-Humi-Sensor-Grove-LoRa-E5.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Temp-Humi-Sensor-Grove-LoRa-E5.md index 54603146cd3c..439250e066af 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Temp-Humi-Sensor-Grove-LoRa-E5.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Temp-Humi-Sensor-Grove-LoRa-E5.md @@ -174,7 +174,7 @@ Now, the Grove Temp&Humi Sensor library can be installed to the Arduino IDE. Ope This repo shows us the temperature and humidity data obtained. In the code, we use the `measureHighPrecision()` function to get the temperature and humidity information, which is positive and float. -```c++ +```cpp #include #include #include diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-VOC-and-eCO2-Gas-Sensor-Grove-LoRa-E5.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-VOC-and-eCO2-Gas-Sensor-Grove-LoRa-E5.md index 928df8c2dba2..e96facea89c2 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-VOC-and-eCO2-Gas-Sensor-Grove-LoRa-E5.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-VOC-and-eCO2-Gas-Sensor-Grove-LoRa-E5.md @@ -170,7 +170,7 @@ Now, the Grove VOC and eCO2 Gas Sensor library can be installed to the Arduino I This repo shows us the VOC and eCO2 data obtained. In the code, we use the `sgp_measure_signals_blocking_read()` function to get the VOC and eCO2 information, which is positive and integer. -```c++ +```cpp #include #include "sensirion_common.h" #include "sgp30.h" diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Vision-AI-Module-Grove-LoRa-E5.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Vision-AI-Module-Grove-LoRa-E5.md index dbcec9b075e3..b3b276d84089 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Vision-AI-Module-Grove-LoRa-E5.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/Sensors_Basic_Usage_with_Arduino/K1100-Vision-AI-Module-Grove-LoRa-E5.md @@ -171,7 +171,7 @@ Now, the Vision AI Module library can be installed to the Arduino IDE. Open the This repo is able to obtain the number of models identified by the camera feed and the confidence level. They are unsigned integer data with no more than 8 bits. -```c++ +```cpp #include "Seeed_Arduino_GroveAI.h" #include diff --git a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/TTN_Cloud_Services/Connecting-to-TTN.md b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/TTN_Cloud_Services/Connecting-to-TTN.md index 1ca66ab9eb5c..408c2dd28afc 100644 --- a/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/TTN_Cloud_Services/Connecting-to-TTN.md +++ b/docs/Network/SenseCAP_K1100/LoRaWAN-Network_Application/TTN_Cloud_Services/Connecting-to-TTN.md @@ -83,7 +83,7 @@ Please download the necessary environment for Arduino and Wio Terminal in [pre-a Click [here](https://github.com/limengdu/Seeed-Studio-LoRaWAN-Dev-Kit/blob/main/example/Get-Grove-LoRa-E5-AppEUI-DevEUI/Get-Grove-LoRa-E5-AppEUI-DevEUI.ino) to download the code for the DevEUI, AppEUI that comes with Grove - Wio-E5 and upload it to Wio Terminal. -```c++ +```cpp #include #include "disk91_LoRaE5.h" @@ -164,7 +164,7 @@ lorae5.sendATCommand("AT+KEY=APPKEY,\"2B7E151628XXXXXXXXXX158809CF4F3C\"","","+K Here is the complete code. -```c++ +```cpp #include #include "disk91_LoRaE5.h" @@ -472,7 +472,7 @@ If you want to apply the content of this tutorial to your own project developmen At the beginning of the program, we need to prepare the necessary triad information to connect to TTN and to set the frequency of the Wio-E5. -```c++ +```cpp #define Frequency DSKLORAE5_ZONE_EU868 /* Select your frequency band here. @@ -496,7 +496,7 @@ Next, a `data_decord()` function is defined. This function converts the sensor v In general, to prevent data overflow, we need to consider the maximum and minimum values that the sensor may read. And split into hexadecimal numbers that will not overflow. -```c++ +```cpp void data_decord(int val_1, int val_2, uint8_t data[4]) { int val[] = {val_1, val_2}; @@ -520,20 +520,20 @@ void data_decord(int val_1, int val_2, uint8_t data[4]) For the SHT40 sensor, he will have two data, one is temperature data and one is humidity data, and there are positive and negative values, so the negative numbers need to be processed, and also the decimal places need to be processed. -```c++ +```cpp int_temp = temperature*100; int_humi = humidity*100; ``` The next step is the initialization of the SHT40 and the initial setup of the Wio-E5. These will all be executed in the `setup()` function. -```c++ +```cpp lorae5.begin(DSKLORAE5_SWSERIAL_WIO_P2) ``` In the initialization code, `DSKLORAE5_SWSERIAL_WIO_P2` represents the Grove interface on the **right** side of the Wio Terminal, while `DSKLORAE5_SWSERIAL_WIO_P1` represents the Grove interface on the **left** side. For other projects without external sensors, you can also use `DSKLORAE5_SEARCH_WIO` , which will automatically search for the Grove interface your Wio-E5 is connected to. -```c++ +```cpp lorae5.send_sync( //Sending the sensor values out 8, // LoRaWan Port data, // data array @@ -546,7 +546,7 @@ lorae5.send_sync( //Sending the sensor values out The important role of the `send_sync()` function is to send the sensor values over the LoRaWAN®. The first parameter indicates the channel number to send the data, the second parameter indicates the content of the data sent, and the third parameter indicates the length of the data sent. In general, we only need to focus on the content of the first three parameters. -```c++ +```cpp delay(15000); ``` diff --git a/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Connect-Wio-Terminal-to-Google-Cloud.md b/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Connect-Wio-Terminal-to-Google-Cloud.md index be855c7f3cd4..92edd121b06d 100644 --- a/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Connect-Wio-Terminal-to-Google-Cloud.md +++ b/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Connect-Wio-Terminal-to-Google-Cloud.md @@ -248,14 +248,14 @@ Now we need to set the Wi-Fi credentials and Google Cloud IoT Core information i - **STEP 3:** Change the **Wifi network details** -```c++ +```cpp const char *ssid = "Enter_SSID"; const char *password = "Enter_Password"; ``` - **STEP 4:** Change the **Google Cloud IoT details** -```c++ +```cpp const char *project_id = "Enter_Project_ID"; const char *location = "Enter_location"; const char *registry_id = "Enter_Registry_ID"; @@ -264,7 +264,7 @@ const char *device_id = "Enter_Device_ID"; - **STEP 5:** Copy the private key bytes that we obtained from **ec_private.pem** and saved into notepad before -```c++ +```cpp const char *private_key_str = "6e:b8:17:35:c7:fc:6b:d7:a9:cb:cb:49:7f:a0:67:" "63:38:b0:90:57:57:e0:c0:9a:e8:6f:06:0c:d9:ee:" @@ -277,7 +277,7 @@ const char *private_key_str = Open **esp32-mqtt.h** and replace the entire file with the following codes. Here we have replaced configTime function with the implementation of obtaining NTP time via UDP. -```c++ +```cpp #include #include #include @@ -484,7 +484,7 @@ void setupCloudIoT(){ Add Wio Terminal board to macro definitions inside **Esp32-lwmqtt.ino** -```c++ +```cpp #if defined(ESP32) || defined(WIO_TERMINAL) #define __ESP32_MQTT_H__ #endif @@ -546,7 +546,7 @@ Navigate to **Esp32-lwmqtt.ino** and add the following - **STEP 1:** After the loop, add the following for the built-in light sensor -```c++ +```cpp void loop() { int light = analogRead(WIO_LIGHT); //assign variable to store light sensor values light = map(light,0,1023,0,100); //Map sensor values @@ -554,7 +554,7 @@ void loop() { - **STEP 2:** Add the topic with the Subfolder name -```c++ +```cpp publishTelemetry(getDefaultSensor()); publishTelemetry("/light",String(light)); ``` @@ -590,7 +590,7 @@ Navigate to the previously used **Esp32-lwmqtt.ino** and add the following: - **STEP 1:** Add the following after **#include "esp32-mqtt.h"** -```c++ +```cpp #include "DHT.h" //DHT library #define DHTPIN 0 //Define Signal Pin of DHT @@ -600,13 +600,13 @@ DHT dht(DHTPIN, DHTTYPE); //Initializing DHT sensor - **STEP 2:** Add the following inside the **setup** to start the DHT sensor -```c++ +```cpp dht.begin(); ``` - **STEP 3:** Add the following inside the **if loop** within **void loop()** -```c++ +```cpp int temperature = dht.readTemperature(); //Assign variable to store temperature int humidity = dht.readHumidity(); //Assign variable to store humidity diff --git a/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Getting_started_with_Ubidots.md b/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Getting_started_with_Ubidots.md index 12cac8cf8737..c04d175ae808 100644 --- a/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Getting_started_with_Ubidots.md +++ b/docs/Network/SenseCAP_K1100/Wi-Fi-Network_Application/Cloud_Service/Getting_started_with_Ubidots.md @@ -206,7 +206,7 @@ To establish an MQTT connection, we will need to prepare the following informati At the beginning of the program below, we will define for these requirements at the top of the code, please fill in your own information as appropriate. -```c++ +```cpp //examples #define WIFISSID "" // Put your WifiSSID here #define PASSWORD " #include #include @@ -420,7 +420,7 @@ void loop() { If you want to send Grove Soil Moisture Sensor data to Ubidots, paste the complete code below into the Arduino and upload it to the Wio Terminal. -```c++ +```cpp #include #include #include @@ -553,7 +553,7 @@ void loop() { If you want to send Grove VOC and eCO2 Gas Sensor data to Ubidots, paste the complete code below into the Arduino and upload it to the Wio Terminal. -```c++ +```cpp #include #include #include @@ -711,7 +711,7 @@ void loop() { If you want to send Grove Temp&Humi Sensor data to Ubidots, paste the complete code below into the Arduino and upload it to the Wio Terminal. -```c++ +```cpp #include #include #include @@ -866,7 +866,7 @@ void loop() { If you want to send Grove Vision Ai Module data to Ubidots, paste the complete code below into the Arduino and upload it to the Wio Terminal. -```c++ +```cpp #include #include #include diff --git a/docs/Seeed_Elderly/Air_Serial/Air602_WiFi_Development_Board.md b/docs/Seeed_Elderly/Air_Serial/Air602_WiFi_Development_Board.md index bde0839ae5d3..50dd947eea7c 100644 --- a/docs/Seeed_Elderly/Air_Serial/Air602_WiFi_Development_Board.md +++ b/docs/Seeed_Elderly/Air_Serial/Air602_WiFi_Development_Board.md @@ -110,7 +110,7 @@ What ever, please make sure you have checked the option **AddCrLf**, and set the Tap **AT+** then click **SEND** or press `enter` key to to check if the connection was successfully established. -```C +```cpp AT+ ``` @@ -120,19 +120,19 @@ When it returns **+OK**, you can use the AT command to control this module. - 1- **WPRT** sets the wireless network card working mode to SoftAP: -```C +```cpp AT+WPRT=2 ``` - 2- **APSSID** Set the AP SSID for the STA, e.g.*MyAP*: -```C +```cpp AT+APSSID=MyAp ``` - 3- **APENCRY** Set the wireless network card security mode to WEP64: -```C +```cpp AT+APENCRY=1 ``` @@ -142,7 +142,7 @@ open:0,WEP64:1,WEP128:2 - 4- **APKEY** Set the wireless network card key to *12345* -```C +```cpp AT+APKEY=1,1,12345 ``` @@ -154,7 +154,7 @@ Parameter 3:wireless key, e.g.:12345 - 5- **APNIP** Set the ip address and subnet mask -```C +```cpp AT+APNIP=1,192.168.1.1,255.255.255.0,192.168.1.1,192.168.1.1 ``` @@ -166,19 +166,19 @@ parameter 5:dns:192.168.1.1 - 6- **PMTF** saves the above parameters to spi flash, just start from step 7 with the next boot. -```C +```cpp AT+PMTF ``` - 7- **WJOIN** Create wireless network *MyAp* -```C +```cpp AT+WJOIN ``` - 8- **SLIST** Query the STA information which connected to your SoftAP. -```C +```cpp AT+SLIST ``` @@ -186,7 +186,7 @@ AT+SLIST Wireless network card scanning AP's AT command is : -```C +```cpp AT+WSCAN ``` @@ -198,19 +198,19 @@ The last paremeter is the signal strength, unit db - 1- **WPRT** Set the working mode to STA -```C +```cpp AT+WPRT=0 ``` - 2- **SSID** Set the AP name to join. e.g. *TEST_AP* -```C +```cpp AT+SSID=TEST_AP ``` - 3- **KEY** Set the wireless key of the AP you want to join. e.g. *12345678* -```C +```cpp AT+KEY=1,0,12345678 ``` @@ -222,19 +222,19 @@ parameter 3: Wireless key e.g.:12345678 - 4- **NIP** Enable DHCP -```C +```cpp AT+NIP=0 ``` - 5- PMTF Save the above parameters to spi flash, Just start from step 6 with the next boot -```C +```cpp AT+PMTF ``` - 6- WJOIN Join the wireless network TEST_AP -```C +```cpp AT+WJOIN ``` @@ -244,19 +244,19 @@ AT+WJOIN - 1- **WPRT** Set the working mode to APSTA -```C +```cpp AT+WPRT=3 ``` - 2- **SSID** Set the AP name to be joined, such as *TEST_AP* -```C +```cpp AT+SSID=TEST_AP ``` - 3- **KEY** Set the wireless key of the AP you want to join. e.g. *12345678* -```C +```cpp AT+KEY=1,0,12345678 ``` @@ -268,37 +268,37 @@ parameter 3: Wireless key e.g.:12345678 - 4- **APSSID** Set the network name of the created SOFTAP -```C +```cpp AT+APSSID=”MYSoftAP” ``` - 5- **APENCRY** Set the encryption type of SoftAP (such as WPA2-TKIP) -```C +```cpp AT+APENCRY=5 ``` - 6- **APKEY** Set the password for SoftAP (e.g. ASCII code 87654321) -```C +```cpp AT+APKEY=1,0,87654321 ``` - 7- **APNIP** Set the IP address and subnet mask -```C +```cpp AT+APNIP=1,192.168.1.1,255.255.255.0,192.168.1.1,192.168.1.1 ``` - 8- **PMTF** Save the above parameters to spi flash, just start from step 9 -```C +```cpp AT+PMTF ``` - 9- **WJOIN** Join the wireless network TEST_AP -```C +```cpp AT+WJOIN ``` @@ -314,7 +314,7 @@ For the firmware programming please check here: A: The wireless network card disconnects the AP's AT command: -```C +```cpp AT+WLEAV ``` @@ -322,7 +322,7 @@ AT+WLEAV A: The AT command of SoftAP disconnected network is: -```C +```cpp AT+WLEAV=2 ``` @@ -330,7 +330,7 @@ AT+WLEAV=2 A: The AT command for the wireless network card to view the status of the current network card is: -```C +```cpp AT+LKSTT ``` @@ -338,7 +338,7 @@ AT+LKSTT A: The AT command to view the current SoftAP status is: -```C +```cpp AT+APLKSTT ``` diff --git a/docs/Seeed_Elderly/Artik/Eagleye_530s.md b/docs/Seeed_Elderly/Artik/Eagleye_530s.md index 8a4712ff12af..4c2241834aa0 100644 --- a/docs/Seeed_Elderly/Artik/Eagleye_530s.md +++ b/docs/Seeed_Elderly/Artik/Eagleye_530s.md @@ -984,7 +984,7 @@ git clone https://github.com/DexterInd/GrovePi.git - Step 2. Modify the source code /root/GrovePi/Software/Cpp/grovepi.cpp and add one line as shown. -```c++ +```cpp void GrovePi::SMBusName(char *smbus_name) { unsigned int hw_revision = gpioHardwareRevision(); diff --git a/docs/Seeed_Elderly/Bee/Bluetooth_Bee.md b/docs/Seeed_Elderly/Bee/Bluetooth_Bee.md index 964e2e355874..c234706aa489 100644 --- a/docs/Seeed_Elderly/Bee/Bluetooth_Bee.md +++ b/docs/Seeed_Elderly/Bee/Bluetooth_Bee.md @@ -291,7 +291,7 @@ xx status: The following sketch configures **Bluetooth Bee** for [Transportunternehmen](http://aps-solver.de/leistungen/) as Slave Device and waits for connection request from PC or other master device. Bluetooth Bee is connected to Seeeduino via XBee Shield as shown above. Bluetooth Bee is connected to digital Pins 11 and 12 of Arduino / Seeduino. We use NewSoftSerial library for supporting serial communication on these pins. The hardware serial port of Arduino is available for uploading sketch or debugging. This sketch uses a flow control mechanism using CheckOK(). It avoids using arbitrary delay between each command. If CheckOK() is not required, use a delay of at least 3 seconds between commands. -```c++ +```cpp /* BluetoothBee Demo Code - Flowcontrol Based Implementation 2010,2011 Copyright (c) Seeed Technology Inc. All right reserved. @@ -408,7 +408,7 @@ void sendBlueToothCommand(char command[]) The following sketch is a modification of above program using delay() instead of CheckOK(). In this case the hardware serial port is used for debugging purpose. Open serial monitor with setting 9600 baud. The complete communication between MCU and Bluetooth Bee will be visible in serial monitor. -```c++ +```cpp /* BluetoothBee Demo Code - Delay Based Implementaion 2011 Copyright (c) Seeed Technology Inc. All right reserved. diff --git a/docs/Seeed_Elderly/Radar_Sensor/Microwave-Sensor-24GHz-Doppler-Radar-Motion-Sensor-MW2401TR11.md b/docs/Seeed_Elderly/Radar_Sensor/Microwave-Sensor-24GHz-Doppler-Radar-Motion-Sensor-MW2401TR11.md index 6c93ef4b0630..38e5f8939b2f 100644 --- a/docs/Seeed_Elderly/Radar_Sensor/Microwave-Sensor-24GHz-Doppler-Radar-Motion-Sensor-MW2401TR11.md +++ b/docs/Seeed_Elderly/Radar_Sensor/Microwave-Sensor-24GHz-Doppler-Radar-Motion-Sensor-MW2401TR11.md @@ -192,7 +192,7 @@ it just an example, you are able to use other devices with RX and TX port or s - **step 2. setup Seeeduino Cortex-MO+, please follow** [seeedruino Cortex-MO+ instructions](https://wiki.seeedstudio.com/Seeeduino-Cortex-M0/) - **step 3. copy the code into arduino IDE then upload.** [upload code guide](https://wiki.seeedstudio.com/Upload_Code/) -```C +```cpp int MW_out = 2; // set pin 2 as OUT port void setup() { diff --git a/docs/Seeed_Elderly/W600/W600_Module.md b/docs/Seeed_Elderly/W600/W600_Module.md index b06905f7bf42..c254c5c32e4c 100644 --- a/docs/Seeed_Elderly/W600/W600_Module.md +++ b/docs/Seeed_Elderly/W600/W600_Module.md @@ -131,7 +131,7 @@ What ever, please make sure you have checked the option **AddCrLf**, and set the Tap **AT+** then click **SEND** or press ++enter++ key to to check if the connection was successfully established. -```C +```cpp AT+ ``` @@ -141,19 +141,19 @@ When it returns **+OK**, you can use the AT command to control this module. - 1- **WPRT** sets the wireless network card working mode to SoftAP: -```C +```cpp AT+WPRT=2 ``` - 2- **APSSID** Set the AP SSID for the STA, e.g.*MyAP*: -```C +```cpp AT+APSSID=MyAp ``` - 3- **APENCRY** Set the wireless network card security mode to WEP64: -```C +```cpp AT+APENCRY=1 ``` @@ -163,7 +163,7 @@ open:0,WEP64:1,WEP128:2 - 4- **APKEY** Set the wireless network card key to *12345* -```C +```cpp AT+APKEY=1,1,12345 ``` @@ -175,7 +175,7 @@ Parameter 3:wireless key, e.g.:12345 - 5- **APNIP** Set the ip address and subnet mask -```C +```cpp AT+APNIP=1,192.168.1.1,255.255.255.0,192.168.1.1,192.168.1.1 ``` @@ -187,19 +187,19 @@ parameter 5:dns:192.168.1.1 - 6- **PMTF** saves the above parameters to spi flash, just start from step 7 with the next boot. -```C +```cpp AT+PMTF ``` - 7- **WJOIN** Create wireless network *MyAp* -```C +```cpp AT+WJOIN ``` - 8- **SLIST** Query the STA information which connected to your SoftAP. -```C +```cpp AT+SLIST ``` @@ -207,7 +207,7 @@ AT+SLIST Wireless network card scanning AP's AT command is : -```C +```cpp AT+WSCAN ``` @@ -219,19 +219,19 @@ The last paremeter is the signal strength, unit db - 1- **WPRT** Set the working mode to STA -```C +```cpp AT+WPRT=0 ``` - 2- **SSID** Set the AP name to join. e.g. *TEST_AP* -```C +```cpp AT+SSID=TEST_AP ``` - 3- **KEY** Set the wireless key of the AP you want to join. e.g. *12345678* -```C +```cpp AT+KEY=1,0,12345678 ``` @@ -243,19 +243,19 @@ parameter 3: Wireless key e.g.:12345678 - 4- **NIP** Enable DHCP -```C +```cpp AT+NIP=0 ``` - 5- PMTF Save the above parameters to spi flash, Just start from step 6 with the next boot -```C +```cpp AT+PMTF ``` - 6- WJOIN Join the wireless network TEST_AP -```C +```cpp AT+WJOIN ``` @@ -265,19 +265,19 @@ AT+WJOIN - 1- **WPRT** Set the working mode to APSTA -```C +```cpp AT+WPRT=3 ``` - 2- **SSID** Set the AP name to be joined, such as *TEST_AP* -```C +```cpp AT+SSID=TEST_AP ``` - 3- **KEY** Set the wireless key of the AP you want to join. e.g. *12345678* -```C +```cpp AT+KEY=1,0,12345678 ``` @@ -289,37 +289,37 @@ parameter 3: Wireless key e.g.:12345678 - 4- **APSSID** Set the network name of the created SOFTAP -```C +```cpp AT+APSSID=”MYSoftAP” ``` - 5- **APENCRY** Set the encryption type of SoftAP (such as WPA2-TKIP) -```C +```cpp AT+APENCRY=5 ``` - 6- **APKEY** Set the password for SoftAP (e.g. ASCII code 87654321) -```C +```cpp AT+APKEY=1,0,87654321 ``` - 7- **APNIP** Set the IP address and subnet mask -```C +```cpp AT+APNIP=1,192.168.1.1,255.255.255.0,192.168.1.1,192.168.1.1 ``` - 8- **PMTF** Save the above parameters to spi flash, just start from step 9 -```C +```cpp AT+PMTF ``` - 9- **WJOIN** Join the wireless network TEST_AP -```C +```cpp AT+WJOIN ``` @@ -339,7 +339,7 @@ For the firmware programming please check here: A: The wireless network card disconnects the AP's AT command: -```C +```cpp AT+WLEAV ``` @@ -347,7 +347,7 @@ AT+WLEAV A: The AT command of SoftAP disconnected network is: -```C +```cpp AT+WLEAV=2 ``` @@ -355,7 +355,7 @@ AT+WLEAV=2 A: The AT command for the wireless network card to view the status of the current network card is: -```C +```cpp AT+LKSTT ``` @@ -363,7 +363,7 @@ AT+LKSTT A: The AT command to view the current SoftAP status is: -```C +```cpp AT+APLKSTT ``` diff --git a/docs/Sensor/Beyond_Grove/Sensors/Gear_Stepper_Motor_Driver_Pack.md b/docs/Sensor/Beyond_Grove/Sensors/Gear_Stepper_Motor_Driver_Pack.md index 5ea182d2fd8f..a63626b28f58 100755 --- a/docs/Sensor/Beyond_Grove/Sensors/Gear_Stepper_Motor_Driver_Pack.md +++ b/docs/Sensor/Beyond_Grove/Sensors/Gear_Stepper_Motor_Driver_Pack.md @@ -120,7 +120,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 1.** Click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp int pwm1=9; int pwm2=10; int ctr_a =9; diff --git a/docs/Sensor/Beyond_Grove/Sensors/Ultra_Sonic_range_measurement_module.md b/docs/Sensor/Beyond_Grove/Sensors/Ultra_Sonic_range_measurement_module.md index b9b2d4f7392a..7277e7e4797c 100755 --- a/docs/Sensor/Beyond_Grove/Sensors/Ultra_Sonic_range_measurement_module.md +++ b/docs/Sensor/Beyond_Grove/Sensors/Ultra_Sonic_range_measurement_module.md @@ -107,7 +107,7 @@ A short ultrasonic pulse is transmitted at the time 0, reflected by an object. T **Step 1.** Copy the code and flash it into the controller board. **Step 2.** Upload the code and open monitor window. -```C +```cpp #include "Arduino.h" class Ultrasonic { diff --git a/docs/Sensor/Beyond_Grove/Sensors/Water-Flow-Sensor.md b/docs/Sensor/Beyond_Grove/Sensors/Water-Flow-Sensor.md index 0068a3dfc75d..06f431b6f0b2 100755 --- a/docs/Sensor/Beyond_Grove/Sensors/Water-Flow-Sensor.md +++ b/docs/Sensor/Beyond_Grove/Sensors/Water-Flow-Sensor.md @@ -149,7 +149,7 @@ The code here **WORKS** for the most classic YF – S201, YF - S402 and other Wa #### Software Code -```C++ +```cpp /* YF‐ S201 Water Flow Sensor Water Flow Sensor output processed to read in litres/hour @@ -203,7 +203,7 @@ If everything goes well, open the serial monitor tool and set the baud rate to 9 In the code section, we used the following formula, so how did this formula come about? -```C++ +```cpp l_hour = (flow_frequency * 60 / 7.5) ``` @@ -211,26 +211,26 @@ Earlier we mentioned that with each revolution of the wheel, the volume of fluid For the YF-S201, every liter of water that flows, the Hall Sensor outputs 450 pulses. Let’s do little math here. 450 pulse for 1 liter, so each pulse means 1/450 liter water flowing through. We take the total volume of liquid flowing through the water flow sensor at a certain time **t**(unit s) as **V_total**(unit L), and the total number of pulses detected as **N**. Then we get: -```C++ +```cpp V_total(L) = N* 1/450(L) ``` Also, the total volume of fluid flowing through the water flow sensor is equal to the **water flow rate(Q - unit L/s)** multiplied by time **t**(unit s) . -```C++ +```cpp V_total(L) = Q(L/s)*t(s) ``` So we get: -```C++ +```cpp N* 1/450 = Q(L/s)*t(s) N/t = 450 * Q(L/s) ``` **N/t** happen to be frequency **f**, so: -```C++ +```cpp f = 450*Q(L/s); Q(L/s) = f/450; Q(L/min) = f*60/450 = f/7.5 @@ -239,7 +239,7 @@ Q(L/hour) = f*60*60/450 = f*60 /7.5 For the YF – S402, every liter of water that flows, the Hall Sensor outputs 4380 pulses. So, the formula should be: -```C++ +```cpp f = 4380*Q(L/s); Q(L/s) = f/4380; Q(L/min) = f*60/4380 = f/73 diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-16-Channel_PWM_Driver-PCA9685.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-16-Channel_PWM_Driver-PCA9685.md index 480fab6369d3..c894fbd7ae3d 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-16-Channel_PWM_Driver-PCA9685.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-16-Channel_PWM_Driver-PCA9685.md @@ -172,7 +172,7 @@ If you want to use servo, you can connect as shown below: 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "PCA9685.h" #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_SPDT_Relay.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_SPDT_Relay.md index db462d9ec563..d09e85b672cf 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_SPDT_Relay.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_SPDT_Relay.md @@ -129,7 +129,7 @@ The **SIG1** is pulled down by the 10k R2, if there is no signal, the 'Gate' of - **Step 1.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```c++ +```cpp #include uint8_t channel1 = 7; uint8_t channel2 = 8; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_Solid_State_Relay.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_Solid_State_Relay.md index 7d1deaca86a6..1e56f8e2b5b6 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_Solid_State_Relay.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-2-Channel_Solid_State_Relay.md @@ -157,7 +157,7 @@ The **CTR1** is the control signal from the Arduino or other board. It is pulled - **Step 1.** Open the Arduino IDE and create a new file, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```c++ +```cpp #include uint8_t channel1 = 2; uint8_t channel2 = 3; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_SPDT_Relay.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_SPDT_Relay.md index 48b3318432ac..4ceee635b438 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_SPDT_Relay.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_SPDT_Relay.md @@ -149,7 +149,7 @@ An introduction of **What is a Grove Relay Module** and **How does a Relay work* Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```c++ +```cpp #include Multi_Channel_Relay relay; @@ -319,7 +319,7 @@ Channel 2 on In case you want to change the address, you need to set the address before use. For example, we want to change it into 0x2f. We can use the following code. -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_Solid_State_Relay.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_Solid_State_Relay.md index 3392a15fcf20..10345cb2081d 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_Solid_State_Relay.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-4-Channel_Solid_State_Relay.md @@ -181,7 +181,7 @@ This is a typical Bi-directional level shifter circuit to connect two different Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```c++ +```cpp #include Multi_Channel_Relay relay; @@ -275,7 +275,7 @@ void loop() If every thing goes well, you will get the result. Meanwhile, you will see the on-board LEDs alternately lit and extinguished. ::: -```c++ +```cpp Scanning... I2C device found at address 0x12 ! Found 1 I2C devices @@ -343,7 +343,7 @@ Channel 2 on In case you want to change the address, you need to set the address before use. For example, we want to change it into 0x2f. We can use the following code. -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-8-Channel_Solid_State_Relay.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-8-Channel_Solid_State_Relay.md index 38fce331d810..64ce8aeefaa9 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-8-Channel_Solid_State_Relay.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-8-Channel_Solid_State_Relay.md @@ -180,7 +180,7 @@ This is a typical Bi-directional level shifter circuit to connect two different Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```c++ +```cpp #include #define USE_8_CHANNELS (1) @@ -302,7 +302,7 @@ void loop() If every thing goes well, you will get the result. Meanwhile, you will see the on-board LEDs alternately lit and extinguished. ::: -```c++ +```cpp Scanning... I2C device found at address 0x11 ! Found 1 I2C devices @@ -376,7 +376,7 @@ Channel 2 on In case you want to change the address, you need to set the address before use. For example, we want to change it into 0x2f. We can use the following code. -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Haptic_Motor.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Haptic_Motor.md index 6623098a6621..13daf7c859bd 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Haptic_Motor.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Haptic_Motor.md @@ -109,7 +109,7 @@ Grove - Haptic motor is a grove module integrated with [DRV2605L](http://www.ti. - **Step 2.** Refer [How to install library](https://wiki.seeedstudio.com/How_to_install_Arduino_Library) to install library for Arduino. - **Step 3.** Copy the code into Arduino IDE and upload. If you do not know how to upload the code, please check [how to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp #include DRV2605 haptic; diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Infrared_Emitter.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Infrared_Emitter.md index 6440705b3cd0..cc4dc0899eea 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Infrared_Emitter.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Infrared_Emitter.md @@ -114,7 +114,7 @@ Copy the following **Send Example Code** to the Arduino IDE: **Send Example Code:** -```c++ +```cpp /* send.ino Example sketch for IRLib2 * Illustrates how to send a code. */ diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3-v3.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3-v3.md index 03294fd56e15..408fb152db54 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3-v3.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3-v3.md @@ -94,7 +94,7 @@ As the name indicates, the Grove - MP3 V3 is the upgraded version of Grove - MP3 The WT2003S_Terminal_Player Example code is as follow: -```C++ +```cpp #include "WT2003S_Player.h" #ifdef __AVR__ diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3_v2.0.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3_v2.0.md index 51577e3aa7db..8a3b87104598 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3_v2.0.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-MP3_v2.0.md @@ -142,7 +142,7 @@ Most of arduino boards have at least one Serial, some have multiple serials(Ardu For more info about the Serial, please refer to [Seeed Arduino Serial](https://wiki.seeedstudio.com/Seeed_Arduino_Serial/). ::: -```c++ +```cpp #ifdef __AVR__ #include SoftwareSerial SSerial(2, 3); // RX, TX diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Optocoupler_Relay-M281.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Optocoupler_Relay-M281.md index 339db9ca48a5..3db0aea148f1 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Optocoupler_Relay-M281.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Optocoupler_Relay-M281.md @@ -126,7 +126,7 @@ Unlike the other TRIAC SSR in our website, this relay is based on MOSFET, so it - **Step 1.** Copy the following code into a new sketch in the Arduino IDE -```C++ +```cpp const int Pinout = 5; void setup() { diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Passive-Buzzer.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Passive-Buzzer.md index e34aa1ca2cb0..de146b3f7256 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Passive-Buzzer.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Passive-Buzzer.md @@ -63,7 +63,7 @@ The Grove interface on the breadboard and on the Grove Passive Buzzer are connec #### Code example1 - simply get the beep sound -```c++ +```cpp int buzzer = 5; // Buzzer connect with Pin 5 int frequency = 2700; //reach the Resonant Frequency int cycle = 1000000/frequency; @@ -86,7 +86,7 @@ void loop() #### Code example2 - Use buzzer to play music -```c++ +```cpp //set the corresponding notes with frequency #define NOTE_D0 0 #define NOTE_D1 294 diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Solid_State_Relay_V2.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Solid_State_Relay_V2.md index 5bad8e6355e8..ee40d9b3c46d 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Solid_State_Relay_V2.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Solid_State_Relay_V2.md @@ -151,7 +151,7 @@ The **CTR** is the control signal from the Arduino or other board. It is pulled - **Step 1.** Open the Arduino IDE and create a new file, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```c++ +```cpp #include uint8_t pin = 7; void setup() { diff --git a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Speaker-Plus.md b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Speaker-Plus.md index 8944b09d6085..6bbe322afd26 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Speaker-Plus.md +++ b/docs/Sensor/Grove/Grove_Accessories/Actuator/Grove-Speaker-Plus.md @@ -105,7 +105,7 @@ You can supply different frequency signal to this module with Arduino. Arduino g If this is the first time you work with Arduino, we strongly recommend you to see [Getting Started with Arduino](https://wiki.seeedstudio.com/Getting_Started_with_Arduino/) before the start. ::: -```C++ +```cpp /*macro definition of Speaker pin*/ #define SPEAKER 3 diff --git a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-10A_DC_Current_Sensor-ACS725.md b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-10A_DC_Current_Sensor-ACS725.md index efe18ae66795..bf6f3c9e4bfb 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-10A_DC_Current_Sensor-ACS725.md +++ b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-10A_DC_Current_Sensor-ACS725.md @@ -132,7 +132,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 2.** In the /example/ folder, you can find the demo code. Here we take the **Grove_10A_Current_Sensor** for instance. Just click the [Grove_10A_Current_Sensor.ino](https://github.com/Seeed-Studio/Grove_Current_Sensor/blob/master/examples/Grove_10A_Current_Sensor/Grove_10A_Current_Sensor.ino) to open the demo. Or you can copy the following code: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -226,14 +226,14 @@ Due to the presence of zero offset, the sensor will also have a reading when the Line 19: -```C++ +```cpp float Vref = 322; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` In the demo code, we set the Vref to 322, however, the zero offset value varies from board to board. As you know, the board we use in this demo is 346.68. So let's modify the Line 21: -```C++ +```cpp float Vref = 346.68; ``` diff --git a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-2.5A-DC-Current-Sensor-ACS70331.md b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-2.5A-DC-Current-Sensor-ACS70331.md index 77781e168c8a..da97b1d0e6b2 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-2.5A-DC-Current-Sensor-ACS70331.md +++ b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-2.5A-DC-Current-Sensor-ACS70331.md @@ -151,7 +151,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 2.** In the /example/ folder, you can find the demo code. Here we take the [Grove_2_5A_Current_Sensor.ino](https://github.com/Seeed-Studio/Grove_Current_Sensor/tree/master/examples/Grove_2_5A_Current_Sensor) for instance. Just click the Grove_2_5A_Current_Sensor.ino to open the demo. Or you can copy the following code: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -248,14 +248,14 @@ Due to the presence of zero offset, the sensor will also have a reading when the Line 21: -```C++ +```cpp float Vref = 265; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` In the demo code, we set the Vref to 265, however, the zero offset value varies from board to board. As you know, the board we use in this demo is 288.09. So let's modify the Line 21: -```C++ +```cpp float Vref = 283.20; ``` diff --git a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-5A_DC_AC_Current_Sensor-ACS70331.md b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-5A_DC_AC_Current_Sensor-ACS70331.md index 3becc603790e..f03a7748cc2b 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-5A_DC_AC_Current_Sensor-ACS70331.md +++ b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-5A_DC_AC_Current_Sensor-ACS70331.md @@ -156,7 +156,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 2.** In the /example/ folder, you can find the demo code. Here we take the [Grove - ±5A DC/AC Current Sensor (ACS70331)](https://github.com/Seeed-Studio/Grove_Current_Sensor/blob/master/examples/Grove_5A_DC_Current_Sensor/Grove_5A_DC_Current_Sensor.ino) for instance. Just click the **Grove_5A_DC_Current_Sensor.ino** to open the demo. Or you can copy the following code: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -254,14 +254,14 @@ Due to the presence of zero offset, the sensor will also have a reading when the Line 32: -```C++ +```cpp float Vref = 1508; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` In the demo code, we set the Vref to 1508, however, the zero offset value varies from board to board. As you know, the board we use in this demo is 595.70. So let's modify the Line 21: -```C++ +```cpp float Vref = 595.70; ``` @@ -288,7 +288,7 @@ When you use AC power, please pay attention to safety and avoid electric shock. For the hardware connection and calibration part, please refer to the [DC Demo](#dc-demo), the only difference is the code. Please use the following code for AC load. -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB diff --git a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md index 4b7abd4882dd..95994f2dd0fe 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Current/Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md +++ b/docs/Sensor/Grove/Grove_Accessories/Current/Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md @@ -186,7 +186,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "LTC2941.h" @@ -242,7 +242,7 @@ The library file may be updated. This code may not be applicable to the updated If every thing goes well, when you open the Serial Monitor and tap any key the press the send button , it may show as below: ::: -```C++ +```cpp LTC2941 Raw Data 1439.96C,399.99mAh,100.00% 1439.96C,399.99mAh,100.00% @@ -255,7 +255,7 @@ LTC2941 Raw Data In the demo, we use a 400mAh battery, so you can see the results `1439.96mC,399.99mAh,100.00%`. The percentage of remaining battery is valid only after you set the battery capacity. You can change the battery capacity at the code line 21, -```C +```cpp ltc2941.setBatteryFullMAh(400); // set the battery capacity here ``` diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-16x2_LCD_Series.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-16x2_LCD_Series.md index 8f0811d426c8..176b65c0a1b6 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-16x2_LCD_Series.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-16x2_LCD_Series.md @@ -162,7 +162,7 @@ The first version of Grove - 16 x 2 LCD series does not have a built-in pull-up in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include #include "rgb_lcd.h" diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-LCD_RGB_Backlight.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-LCD_RGB_Backlight.md index 8650059dcac8..8a48227f28ea 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-LCD_RGB_Backlight.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-LCD_RGB_Backlight.md @@ -165,7 +165,7 @@ Here are some projects for your reference. Here is the code of HelloWorld.ino. -```c++ +```cpp #include #include "rgb_lcd.h" @@ -371,7 +371,7 @@ if __name__=="__main__": - Q2: How to use button to switch Grove RGB LCD to display different pages? - A2: Here is the code. -```c++ +```cpp #include #include "rgb_lcd.h" diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.66-SSD1306_v1.0.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.66-SSD1306_v1.0.md index 540701d32b84..c19214b2583c 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.66-SSD1306_v1.0.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.66-SSD1306_v1.0.md @@ -93,7 +93,7 @@ This Grove-OLED Display supports the U8g2 monochrome displays library written by - **Step 2.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```C++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.96-SSD1315.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.96-SSD1315.md index 609940955f0d..c471ac89c586 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.96-SSD1315.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-0.96-SSD1315.md @@ -95,7 +95,7 @@ Thanks to the new SSD1315 chip, it can work with 3.3V, so that we removed the ex - **Step 2.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```C++ +```cpp #include #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-1.12-SH1107_V3.0.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-1.12-SH1107_V3.0.md index 4da36ff05945..f6fa20d18ee9 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-1.12-SH1107_V3.0.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED-Display-1.12-SH1107_V3.0.md @@ -100,7 +100,7 @@ This is an easy-to-use module, what you need to do is connect the module to I2C - **Step 4.** Upload the demo code below in your Arduino IDE. -```C++ +```cpp #include #include #include @@ -178,7 +178,7 @@ void loop(void) { - **Step 3.** Upload the demo code below in your Arduino IDE. -```C++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_0.96inch.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_0.96inch.md index 565b20556733..54ef3da270aa 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_0.96inch.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_0.96inch.md @@ -117,7 +117,7 @@ The OLED128*64 uses all the pins of SSD1308 chip, the default original point is - **Step 2.** Refer [How to install library](https://wiki.seeedstudio.com/How_to_install_Arduino_Library) to install library for Arduino. - **Step 3.** Copy the code into Arduino IDE and upload. If you do not know how to upload the code, please check [how to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```CPP +```cpp #include #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_1.12inch.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_1.12inch.md index 1f14ff838ff7..bce1ca6d1659 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_1.12inch.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-OLED_Display_1.12inch.md @@ -112,7 +112,7 @@ This is an easy-to-use module, what you need to do is connect the module to I2C - **Step 4.** Upload the demo code below in your Arduino IDE. -```C++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_1_54.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_1_54.md index 8ba07d92ce87..6f122b9f7aa8 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_1_54.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_1_54.md @@ -174,7 +174,7 @@ It will be a lot fun to display your own image, now, let's show you how to DIY y Before the start, please check the **E_ink154_factoryCode.ino** again. You can find the two array easily. -```c++ +```cpp const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, @@ -190,7 +190,7 @@ const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, and -```c++ +```cpp const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, diff --git a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_2_13.md b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_2_13.md index 07a08d8f4b48..a6ad5cd874a2 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_2_13.md +++ b/docs/Sensor/Grove/Grove_Accessories/Display/Grove-Triple_Color_E-Ink_Display_2_13.md @@ -175,7 +175,7 @@ It will be a lot fun to display your own image, now, let's show you how to DIY y Before the start, please check the **Eink_factory_code_213.ino** again. You can find the two array easily. -```c++ +```cpp const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, @@ -191,7 +191,7 @@ const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, and -```c++ +```cpp const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, diff --git a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md index 55447b6ced91..d985c07b0da1 100755 --- a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md +++ b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md @@ -54,7 +54,7 @@ Connect the I2C Hub with Seeeduino XIAO's I2C interface, and connect each I2C de #### Software code -```C++ +```cpp #include "TCA9548A.h" // if you use the software I2C to drive, you can uncommnet the define SOFTWAREWIRE which in TCA9548A.h. diff --git a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-Differential_Amplifier_v1.0.md b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-Differential_Amplifier_v1.0.md index 96f5a616ce5e..c8c7ad43ef5b 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-Differential_Amplifier_v1.0.md +++ b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-Differential_Amplifier_v1.0.md @@ -159,7 +159,7 @@ Connect the weight sensor to the amplifier as the picture depicts below. Copy and paste the demo code below to Arduino IDE and upload it. -```c++ +```cpp void setup() { Serial.begin(9600); diff --git a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-RS485.md b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-RS485.md index 95f256e1c792..00563dd747c4 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-RS485.md +++ b/docs/Sensor/Grove/Grove_Accessories/Input_Output/Grove-RS485.md @@ -92,7 +92,7 @@ The Grove - NFC supports I2C and UART, [Seeed Arduino NFC Library](https://githu - **Step 1.** Open two Arduino IDE windows and copy these codes as below separately. One of the device is using as master device and the other one is using as slave device. -```c++ +```cpp /* Slave */ #include SoftwareSerial Slave(6, 7); @@ -117,7 +117,7 @@ void loop() { } ``` -```c++ +```cpp /* Master */ #include SoftwareSerial Master(6, 7); diff --git a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_Matrix_Driver-HT16K33.md b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_Matrix_Driver-HT16K33.md index 7337397be3a3..2081fc76cc7a 100644 --- a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_Matrix_Driver-HT16K33.md +++ b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_Matrix_Driver-HT16K33.md @@ -159,7 +159,7 @@ For example, if I want to change the address to 0x73, I need to connect pad A1,A -```C++ +```cpp #include @@ -222,7 +222,7 @@ Are you willing to let the LED matrix to display the emoji? Now, it is your turn - **Step 5.** Create the new '.ino' file under the same folder with other LED Matrix examples and copy below code. -```C++ +```cpp #include "Grove_LED_Matrix_Driver_HT16K33.h" #include diff --git a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_ring.md b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_ring.md index a05a452598f0..ef01b5a1ede7 100644 --- a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_ring.md +++ b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-LED_ring.md @@ -167,7 +167,7 @@ Now, we will demonstrate you how to run the code 'buttoncycler'. This is a demon #### ⁨buttoncycler⁩ After run this code, when you press the button it will change to a new pixel animation. Note that you need to press the button once to start the first animation! -```C++ +```cpp #include "Adafruit_NeoPixel.h" @@ -344,7 +344,7 @@ uint32_t Wheel(byte WheelPos) { **RGBW strand test** -```C++ +```cpp #include "Adafruit_NeoPixel.h" #ifdef __AVR__ @@ -613,7 +613,7 @@ uint8_t blue(uint32_t c) { **Simple** -```C++ +```cpp #include "Adafruit_NeoPixel.h" #ifdef __AVR__ @@ -665,7 +665,7 @@ void loop() { **Simple New Operator** -```C++ +```cpp #include "Adafruit_NeoPixel.h" #ifdef __AVR__ @@ -723,7 +723,7 @@ void loop() { **Strand test** -```C++ +```cpp #include "Adafruit_NeoPixel.h" #ifdef __AVR__ diff --git a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Matrix_w-Driver.md b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Matrix_w-Driver.md index 4648d9b5685d..d5ca4a15c44f 100644 --- a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Matrix_w-Driver.md +++ b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Matrix_w-Driver.md @@ -222,7 +222,7 @@ e.g. in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "grove_two_rgb_led_matrix.h" #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE @@ -339,7 +339,7 @@ Let's begin DIY. -```C++ +```cpp #include "grove_two_rgb_led_matrix.h" #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE diff --git a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Stick-10-WS2813_Mini.md b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Stick-10-WS2813_Mini.md index 7686770a476e..8285af517616 100644 --- a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Stick-10-WS2813_Mini.md +++ b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-RGB_LED_Stick-10-WS2813_Mini.md @@ -168,7 +168,7 @@ As long as not two or more adjacent LEDs are broken, the remaining LEDs will be in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp // NeoPixel Ring simple sketch (c) 2013 Shae Erisson // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library diff --git a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-Red_LED_Matrix_w_Driver.md b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-Red_LED_Matrix_w_Driver.md index ee29f00ec983..6ce84e11f4f6 100644 --- a/docs/Sensor/Grove/Grove_Accessories/LED/Grove-Red_LED_Matrix_w_Driver.md +++ b/docs/Sensor/Grove/Grove_Accessories/LED/Grove-Red_LED_Matrix_w_Driver.md @@ -158,7 +158,7 @@ For example, if I want to change the address to 0x73, I need to connect pad A1,A -```C++ +```cpp #include @@ -221,7 +221,7 @@ Are you willing to let the LED matrix to display the emoji? Now, it is your turn - **Step 5.** Create the new '.ino' file under the same folder with other LED Matrix examples and copy below code. -```C++ +```cpp #include "Grove_LED_Matrix_Driver_HT16K33.h" #include diff --git a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-5-Way_Switch.md b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-5-Way_Switch.md index 32e23285ae61..6e09a0c6d822 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-5-Way_Switch.md +++ b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-5-Way_Switch.md @@ -130,7 +130,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Grove_Multi_Switch.h" GroveMultiSwitch mswitch[1]; @@ -262,7 +262,7 @@ void loop() If every thing goes well, you will get the result. When you press the **KEY E**, it will trigger **KEY E: RAW - LOW PRESSED** ::: -```C++ +```cpp Grove Multi Switch ***** Device probe Device BN-5E-0.1 Grove Multi Switch diff --git a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-6-Position_DIP_Switch.md b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-6-Position_DIP_Switch.md index 16f587a3644a..9882fa39d734 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-6-Position_DIP_Switch.md +++ b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-6-Position_DIP_Switch.md @@ -118,7 +118,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Grove_Multi_Switch.h" GroveMultiSwitch mswitch[1]; @@ -250,7 +250,7 @@ void loop() If every thing goes well, you will get the result. For instance, the default switch is off-High, when you turn the **Switch6** to **ON**, the output will be **POS 6: RAW - LOW ON**. ::: -```C++ +```cpp Grove Multi Switch ***** Device probe OK ***** Grove 6-Position DIP Switch Inserted! diff --git a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Dual-Button.md b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Dual-Button.md index 3ffe1d2b58ed..079a6f34357e 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Dual-Button.md +++ b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Dual-Button.md @@ -70,7 +70,7 @@ interface. - **Step1** Copy the code below to the Arduino IDE and upload. If you do not know how to update the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp //set the corresponding notes with frequency #define NOTE_D0 0 #define NOTE_D1 294 diff --git a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-LED_Button.md b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-LED_Button.md index ce3c6682f151..5413a5c64648 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-LED_Button.md +++ b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-LED_Button.md @@ -135,7 +135,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 1.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```C++ +```cpp #include "Arduino.h" //1: toggle mode, 2: follow mode diff --git a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Mech_Keycap.md b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Mech_Keycap.md index 3e09bd910d95..fe127759736b 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Mech_Keycap.md +++ b/docs/Sensor/Grove/Grove_Accessories/Switch&Button/Grove-Mech_Keycap.md @@ -131,7 +131,7 @@ If we don't have Grove Base Shield, We also can directly connect Grove-Mech keyc - **Step 3.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```c++ +```cpp /** * This is an exmaple of the Grove - Mech Keycap. * Every press of the key will change the color the SK6805 RGB LED. The SK6805 is a NeoPixel compatible chip. diff --git a/docs/Sensor/Grove/Grove_Accessories/Time/Grove-RTC.md b/docs/Sensor/Grove/Grove_Accessories/Time/Grove-RTC.md index 05bcd1a15a72..18422c81e961 100644 --- a/docs/Sensor/Grove/Grove_Accessories/Time/Grove-RTC.md +++ b/docs/Sensor/Grove/Grove_Accessories/Time/Grove-RTC.md @@ -95,7 +95,7 @@ If we don't have the base shield, we also can directly connect the Grove-RTC to
-```c++ +```cpp #include #include "DS1307.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/AI-powered/Grove-Vision-AI-Module.md b/docs/Sensor/Grove/Grove_Sensors/AI-powered/Grove-Vision-AI-Module.md index 34cbea03824d..33a4ff5e624b 100644 --- a/docs/Sensor/Grove/Grove_Sensors/AI-powered/Grove-Vision-AI-Module.md +++ b/docs/Sensor/Grove/Grove_Sensors/AI-powered/Grove-Vision-AI-Module.md @@ -185,7 +185,7 @@ Before we get started developing a sketch, let's look at the available functions 5. `Serial.print(data.confidence)` - The **struct** format can not be directly used to print, it should point to the specific type which is defined in the head file. -```C +```cpp typedef struct { uint16_t x; diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis-Digital-Accelerometer-LIS3DHTR.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis-Digital-Accelerometer-LIS3DHTR.md index 336cd5839ba5..b2b418541edc 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis-Digital-Accelerometer-LIS3DHTR.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis-Digital-Accelerometer-LIS3DHTR.md @@ -65,7 +65,7 @@ Connect the Grove - 3-Axis Digital Accelerometer (LIS3DHTR) with Seeeduino XIAO' #### Software Code -```C++ +```cpp // This example use I2C. #include "LIS3DHTR.h" #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_20g-ADXL356B.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_20g-ADXL356B.md index 13287e19cc3e..ebecdd612f3c 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_20g-ADXL356B.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_20g-ADXL356B.md @@ -146,7 +146,7 @@ Product|Measurement Range|Output Port|Power Consumption or you can just copy the code below: -```c++ +```cpp #include @@ -271,7 +271,7 @@ void loop() - **Step 5.** Now you can use this sensor, and the output will be like this: -```C++ +```cpp Please Place the module horizontally! Start calibration........ Calibration OK!! diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_40g-ADXL356C.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_40g-ADXL356C.md index 6bfb8a9e6577..f19fe9965d4e 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_40g-ADXL356C.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Analog_Accelerometer_40g-ADXL356C.md @@ -142,7 +142,7 @@ or you can just copy the following code. :::note This code is written for both ADXL_356B and ADXL_356C, and if you need to implement them on 356C, pls switch the line `#define MODUEL_RANGE 20` with `#define MODUEL_RANGE 40`, or it will not work. ::: -```c++ +```cpp #include @@ -267,7 +267,7 @@ void loop() - **Step 5.** Now you can use this sensor, and the output will be like this: -```C++ +```cpp Please Place the module horizontally! Start calibration........ Calibration OK!! diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_200g-ADXL372.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_200g-ADXL372.md index 6c3460c5725b..8857223f04d5 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_200g-ADXL372.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_200g-ADXL372.md @@ -250,7 +250,7 @@ void loop() { - **Step 7.** Now you can use this sensor, and the output will be like this: -```C++ +```cpp Please Place the module horizontally! Start calibration........ ................ diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_40g-ADXL357.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_40g-ADXL357.md index 84980230e662..6caeaa7c9820 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_40g-ADXL357.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer_40g-ADXL357.md @@ -287,7 +287,7 @@ void loop(void) - **Step 7.** Now you can use this sensor, and the output will be like this: -```C++ +```cpp Start calibration.......Init OK! Uncalibration temp = 29.20 Please Place the module horizontally! diff --git "a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer\302\26116g_Ultra-low_Power-BMA400.md" "b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer\302\26116g_Ultra-low_Power-BMA400.md" index 4f6ec5dd8696..34f98b0fd004 100644 --- "a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer\302\26116g_Ultra-low_Power-BMA400.md" +++ "b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-3-Axis_Digital_Accelerometer\302\26116g_Ultra-low_Power-BMA400.md" @@ -191,7 +191,7 @@ This is a typical Bi-directional level shifter circuit to connect two different 3. Or, you can just click the icon

pir

in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "BMA400.h" @@ -254,7 +254,7 @@ void loop(void) If every thing goes well, it may show as below: ::: -```C++ +```cpp BMA400 Raw Data BMA400 is connected 85.94,357.42,916.02,23 diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-6-Axis_Accelerometer&Gyroscope_BMI088.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-6-Axis_Accelerometer&Gyroscope_BMI088.md index 3c5c46242d16..cac1a65ffe8a 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-6-Axis_Accelerometer&Gyroscope_BMI088.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-6-Axis_Accelerometer&Gyroscope_BMI088.md @@ -145,7 +145,7 @@ This is a typical Bi-directional level shifter circuit to connect two different

pir

in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "BMI088.h" @@ -215,7 +215,7 @@ void loop(void) If every thing goes well, when you open the Serial Monitor, it may show as below: ::: -```c++ +```cpp BMI088 Raw Data BMI088 is connected 394.41,-383.06,818.66,1.71,-4.88,-2.93,27 diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_10DOF.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_10DOF.md index 168b68145bd8..59b6dbf6c093 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_10DOF.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_10DOF.md @@ -113,7 +113,7 @@ We will provide an example here to show you how to use this sensor. Here is a part of the code: -```c++ +```cpp void setup() { diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF-lcm20600+AK09918.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF-lcm20600+AK09918.md index 60ffcd7057d7..a195c1502b3f 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF-lcm20600+AK09918.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF-lcm20600+AK09918.md @@ -187,7 +187,7 @@ This is a typical Bi-directional level shifter circuit to connect two different

pir

in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "AK09918.h" #include "ICM20600.h" #include @@ -389,7 +389,7 @@ void calibrate(uint32_t timeout, int32_t *offsetx, int32_t *offsety, int32_t*off If every thing goes well, when you open the Serial Monitor, the notice will pop up--*Start figure-8 calibration after 2 seconds.* Which means in order to calibrate this module, you should move it and draw the number 8 trajectory in the air. When the "......." appears, you can start your calibration. ::: -```C++ +```cpp Start figure-8 calibration after 2 seconds. ....................................................................... A: -362, -205, 738 mg diff --git a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF_v2.0.md b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF_v2.0.md index 4b1e04fa17b1..4fe04fb4959c 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF_v2.0.md +++ b/docs/Sensor/Grove/Grove_Sensors/Accelerometer/Grove-IMU_9DOF_v2.0.md @@ -113,7 +113,7 @@ Grove - IMU 9DOF v2.0 is an upgraded version of **Grove - IMU 9DOF v1.0** and it Here is the main part of the code -```c++ +```cpp void setup() { // join I2C bus (I2Cdev library doesn't do this automatically) diff --git a/docs/Sensor/Grove/Grove_Sensors/Air_Quality/Grove-Laser_PM2.5_Sensor-HM3301.md b/docs/Sensor/Grove/Grove_Sensors/Air_Quality/Grove-Laser_PM2.5_Sensor-HM3301.md index c869f60d4a82..ee0bf2ef3ca2 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Air_Quality/Grove-Laser_PM2.5_Sensor-HM3301.md +++ b/docs/Sensor/Grove/Grove_Sensors/Air_Quality/Grove-Laser_PM2.5_Sensor-HM3301.md @@ -135,7 +135,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_HM330X.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-CO2_Temperature_Humidity_Sensor-SCD30.md b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-CO2_Temperature_Humidity_Sensor-SCD30.md index bf5385008fab..7c75d73781bb 100644 --- a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-CO2_Temperature_Humidity_Sensor-SCD30.md +++ b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-CO2_Temperature_Humidity_Sensor-SCD30.md @@ -182,7 +182,7 @@ SenseCAP S210x series industrial sensors provide an out-of-box experience for en c. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "SCD30.h" #if defined(ARDUINO_ARCH_AVR) diff --git a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-Light-Gesture-Color-Proximity_Sensor-TMG39931.md b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-Light-Gesture-Color-Proximity_Sensor-TMG39931.md index da45f83c2da8..a8e3e39a9d80 100644 --- a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-Light-Gesture-Color-Proximity_Sensor-TMG39931.md +++ b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove-Light-Gesture-Color-Proximity_Sensor-TMG39931.md @@ -140,7 +140,7 @@ The gesture functionality is not supported yet, since this functionality needs a 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include #include "Seeed_TMG3993.h" @@ -201,7 +201,7 @@ Two thresholds need to be configured - low and high. Any proximity value which i - **Step 3.** Restart the Arduino IDE. Open the example, the same way as in Example 1, but this time choose "Example2-ProximityInterrupt" instead of "Example1". Or copy the following code into Arduino IDE: -```C++ +```cpp #include @@ -272,7 +272,7 @@ This example reads the R, G, B, C sensor values. C is defined as the non-color f - **Step 3.** Restart the Arduino IDE. Open the example, the same way as in Example 1, but this time choose "Example3-Color-Light" instead of "Example1". Or copy the following code into Arduino IDE: -```C++ +```cpp #include diff --git a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove_SEN5X_All_in_One.md b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove_SEN5X_All_in_One.md index 75a13eb0cea2..47dee32a6f75 100644 --- a/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove_SEN5X_All_in_One.md +++ b/docs/Sensor/Grove/Grove_Sensors/All_in_one/Grove_SEN5X_All_in_One.md @@ -95,7 +95,7 @@ This demo can detect 4 types of PM (particulate matter), VOC (Volatile Organi |![enter image description here](https://files.seeedstudio.com/wiki/wiki_english/docs/images/seeeduino_v4.2.jpg)|![enter image description here](https://files.seeedstudio.com/wiki/wiki_english/docs/images/base_shield.jpg)|
|[Get ONE Now](https://www.seeedstudio.com/Seeeduino-V4.2-p-2517.html)|[Get ONE Now](https://www.seeedstudio.com/Base-Shield-V2-p-1378.html)|[Get ONE Now](https://www.seeedstudio.com/Grove-All-in-one-Environmental-Sensor-SEN54-p-5374.html)| -```c++ +```cpp /* * I2C-Generator: 0.3.0 @@ -400,7 +400,7 @@ Compile the driver: **Step 4.** Run `./sen5x_i2c_example_usage` in the same directory you used to compile the driver. -```c++ +```cpp //sen5x_i2c_example_usage.c diff --git a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP180.md b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP180.md index 33a164e80364..1478488390bc 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP180.md +++ b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP180.md @@ -208,7 +208,7 @@ Platforms Supported Here is the code -```c++ +```cpp #include "Barometer.h" #include float temperature; diff --git a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP280.md b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP280.md index 434d8814a3e7..0c84ad240268 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP280.md +++ b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-Barometer_Sensor-BMP280.md @@ -164,7 +164,7 @@ Do not touch or shake or let this product in vibration when it works. This will **Here is the code:** -```c++ +```cpp /* * bmp280_example.ino * Example sketch for BMP280 diff --git a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-High-Precision-Barometric-Pressure-Sensor-DPS310.md b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-High-Precision-Barometric-Pressure-Sensor-DPS310.md index 9057b0767180..018d7f877267 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-High-Precision-Barometric-Pressure-Sensor-DPS310.md +++ b/docs/Sensor/Grove/Grove_Sensors/Barometer/Grove-High-Precision-Barometric-Pressure-Sensor-DPS310.md @@ -171,7 +171,7 @@ We've already released the [Grove - Barometer Sensor (BMP280)](https://wiki.seee - **Step 3.** Copy the code into Arduino IDE and upload. -```C++ +```cpp #include Dps310 Dps310PressureSensor = Dps310(); diff --git a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Capacitive-Fingerprint-Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Capacitive-Fingerprint-Sensor.md index bd809c4d75ab..c798fde25d76 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Capacitive-Fingerprint-Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Capacitive-Fingerprint-Sensor.md @@ -127,7 +127,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 2. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp /* @@ -230,7 +230,7 @@ The library file may be updated. This code may not be applicable to the updated If every thing goes well, when you open the Serial Monitor, it may show as below: ::: -```c++ +```cpp Usage: Please put your finger on the touchpad Repeat for 4 times or pressed continuously diff --git a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Finger-clip_Heart_Rate_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Finger-clip_Heart_Rate_Sensor.md index 3f7a23c89a52..7c3084ed99d1 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Finger-clip_Heart_Rate_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Finger-clip_Heart_Rate_Sensor.md @@ -66,7 +66,7 @@ Link the Sensor to I2C port of Seeeduino with Grove Cable. Copy the following code into a new sketch of Arduino and upload the sketch, then you can get heart rate from the Serial Monitor. It may take about a minute to get valid heart rate after you touch your finger with sensor. -```c++ +```cpp #include void setup() { Serial.begin(9600); @@ -88,7 +88,7 @@ void loop() { The standard I2C library for the Arduino is the Wire Library. While this library does not work when the I2C pins SDA/SCL are in use already for other purposes. So you can use the SoftwareI2C. You can connect the SCL to D2 and SDA to D3. Please download the [SoftI2CMaster library](https://github.com/felias-fogg/SoftI2CMaster) and follow [How to install arduino library](https://wiki.seeedstudio.com/How_to_install_Arduino_Library/) to setup the library. Copy the following code into a new sketch of Arduino and upload the sketch, then you can get heart rate from the Serial Monitor. It may take about a minute to get valid heart rate after you touch your finger with sensor. -```c++ +```cpp #define SDA_PORT PORTD #define SDA_PIN 3 #define SCL_PORT PORTD @@ -116,7 +116,7 @@ void loop() { Read a byte from I2C device 0xA0 (8 bit address), it's the heart rate. -```c++ +```cpp #include "mbed.h" I2C i2c(I2C_SDA, I2C_SCL); diff --git a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Human_Presence_Sensor-AK9753.md b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Human_Presence_Sensor-AK9753.md index 8e7ed724304b..46c6e7ff386e 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Human_Presence_Sensor-AK9753.md +++ b/docs/Sensor/Grove/Grove_Sensors/Biometric/Grove-Human_Presence_Sensor-AK9753.md @@ -160,7 +160,7 @@ Now let's check what will happen then: When you upload the example1 code, Open the **Serial Monitor** of Arduino IDE by click **Tool-> Serial Monitor**. Or tap the ++ctrl+shift+m++ key at the same time. Set the baud rate to **9600**. You can see the following results: -```C++ +```cpp Grove - Human Presence Sensor example 1:[432], 2:[288], 3[248], 4:[384], temp[20.87], millis[109] 1:[424], 2:[296], 3[232], 4:[400], temp[20.87], millis[215] @@ -212,7 +212,7 @@ This example reads the data of four IR sensors and converts them into current (p When you upload the example1 code, Open the **Serial Monitor** of Arduino IDE by click **Tool-> Serial Monitor**. Or tap the ++ctrl+shift+m++ key at the same time. Set the baud rate to **9600**. You can see the following results: -```c++ +```cpp Grove - Human Presence Sensor example o o x o millis: 16949 o x x o millis: 17050 diff --git a/docs/Sensor/Grove/Grove_Sensors/Gas/Grove-Gas_Sensor-MQ2.md b/docs/Sensor/Grove/Grove_Sensors/Gas/Grove-Gas_Sensor-MQ2.md index 3c935401ca03..2e82b3a00cb5 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Gas/Grove-Gas_Sensor-MQ2.md +++ b/docs/Sensor/Grove/Grove_Sensors/Gas/Grove-Gas_Sensor-MQ2.md @@ -145,7 +145,7 @@ there are some examples Please copy and paste code below to a new Arduino sketc **Basic example:Gas Detection** In this example, the sensor is connected to A0 pin. The voltage read from the sensor is displayed. This value can be used as a threshold to detect any increase/decrease in gas concentration. -```C +```cpp void setup() { Serial.begin(9600); } diff --git a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-I2C_UV_Sensor-VEML6070.md b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-I2C_UV_Sensor-VEML6070.md index bca0093dae8d..a2ff5274d7ae 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-I2C_UV_Sensor-VEML6070.md +++ b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-I2C_UV_Sensor-VEML6070.md @@ -124,7 +124,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_VEML6070.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Receiver.md b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Receiver.md index 814ebeee3c13..2b54a6f35f78 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Receiver.md +++ b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Receiver.md @@ -99,7 +99,7 @@ Copy the following **Send Example Code** to the Arduino IDE: **Send Example Code:** -```c++ +```cpp /* send.ino Example sketch for IRLib2 * Illustrates how to send a code. */ diff --git a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Reflective_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Reflective_Sensor.md index e09d4faf6780..be18f3c26c30 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Reflective_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Light/Grove-Infrared_Reflective_Sensor.md @@ -143,7 +143,7 @@ Let us implement simple optical encoder to detect the speed of a motor - **Step 3.** Open a new sketch, and copy the following code into the sketch. -```c++ +```cpp unsigned int counter=0; void blink() { diff --git a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-EC-Sensor-kit.md b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-EC-Sensor-kit.md index df4b5388ddea..ee76222d696e 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-EC-Sensor-kit.md +++ b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-EC-Sensor-kit.md @@ -96,7 +96,7 @@ are reach the standard.Grove EC Sensor is a analog electrical conductivity meter - **Step 4.** Upload the demo. If you do not know how to upload the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). #### Software Code -```C++ +```cpp #include "DFRobot_EC.h" #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-Pro.md b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-Pro.md index ab0da796b1cf..72e6cd41216f 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-Pro.md +++ b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-Pro.md @@ -184,7 +184,7 @@ The probe is then fully inserted into the liquid to be measured. You can rest as The following is a sample program for the Grove ORP Sensor. -```c++ +```cpp #define VOLTAGE 3.37 //vcc voltage(unit: V) #define OFFSET 16 //UNUSED - zero drift voltage(unit: mV) #define LED 13 //operating instructions diff --git a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-kit.md b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-kit.md index 3da5a86f96be..dac788964d26 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-kit.md +++ b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-ORP-Sensor-kit.md @@ -79,7 +79,7 @@ An Oxidation Reduction Potential (ORP) Sensor measures the activity of oxidizers #### Software Code -```C++ +```cpp #define VOLTAGE 5.00 //system voltage #define OFFSET 0 //zero drift voltage #define LED 13 //operating instructions diff --git a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-PH-Sensor-kit.md b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-PH-Sensor-kit.md index c70058f6c375..6fedd829a340 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-PH-Sensor-kit.md +++ b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-PH-Sensor-kit.md @@ -92,7 +92,7 @@ Are you trying to find an easy to use and cost-effect PH sensor/meter? Do you wa - **Step 4.** Upload the demo. If you do not know how to upload the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). #### Software Code -```C++ +```cpp /* # This sample code is used to test the pH meter V1.1. # Editor : YouYou diff --git a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-Water-Level-Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-Water-Level-Sensor.md index ab735e34a0d4..7caa96421724 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-Water-Level-Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Liquid/Grove-Water-Level-Sensor.md @@ -97,7 +97,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 1.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```C++ +```cpp #include #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-12-bit-Magnetic-Rotary-Position-Sensor-AS5600.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-12-bit-Magnetic-Rotary-Position-Sensor-AS5600.md index 09e36b18ff5d..f3e8acef65c9 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-12-bit-Magnetic-Rotary-Position-Sensor-AS5600.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-12-bit-Magnetic-Rotary-Position-Sensor-AS5600.md @@ -104,7 +104,7 @@ Refer How to install library to [install library](https://wiki.seeedstudio.com/H The readAngle Example code is as follow: -```C++ +```cpp #include #include #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Digital-PIR-Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Digital-PIR-Sensor.md index 761d6f1e15b4..d84062454584 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Digital-PIR-Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Digital-PIR-Sensor.md @@ -72,7 +72,7 @@ The Grove interface on the breadboard and on the Grove digital PIR Sensor are co #### Softwawre - **Step1** Copy the code below to the Arduino IDE and upload. If you do not know how to update the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp #define digital_pir_sensor 5 // connect to Pin 5 void setup() diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Encoder.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Encoder.md index cd8b59733656..8dccf31aa8f6 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Encoder.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Encoder.md @@ -100,7 +100,7 @@ When you need to add a rotary knob to your project, for example a volume knob fo - **Step 2.** Refer [How to install library](https://wiki.seeedstudio.com/How_to_install_Arduino_Library) to install library for Arduino. - **Step 3.** Copy the code into Arduino IDE and upload. If you do not know how to upload the code, please check [how to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Mini_Track_Ball.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Mini_Track_Ball.md index 8eabb8061d1b..29c0ad2dba30 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Mini_Track_Ball.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Mini_Track_Ball.md @@ -93,7 +93,7 @@ Interface to control motions. -```c++ +```cpp #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Optical_Rotary_Encoder-TCUT1600X01.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Optical_Rotary_Encoder-TCUT1600X01.md index f8eecd5fc560..cf2f5d923585 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Optical_Rotary_Encoder-TCUT1600X01.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Optical_Rotary_Encoder-TCUT1600X01.md @@ -183,7 +183,7 @@ When the library is installed you will see **INSTALLED** , click **Close** then. in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp /* Encoder Library - Basic Example * http://www.pjrc.com/teensy/td_libs_Encoder.html * @@ -228,7 +228,7 @@ void loop() { :::success If every thing goes well, you will get the result. When you move the obstacle from left to right, the count value will increase by 1; when you move the obstacle from right to left, the count value will be decremented by 1. ::: -```C++ +```cpp Basic Encoder Test: 0 1 diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Step_Counter-BMA456.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Step_Counter-BMA456.md index 7c6b0b70554d..a8b515fc6ea9 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Step_Counter-BMA456.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Step_Counter-BMA456.md @@ -166,7 +166,7 @@ This is a typical Bi-directional level shifter circuit to connect two different 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "arduino_bma456.h" uint32_t step = 0; @@ -204,7 +204,7 @@ void loop(void) If every thing goes well, when you open the Serial Monitor and walk with this sensor on or move it to simulated walking posture , it may show as below: ::: -```C++ +```cpp BM Step: 0 BMA456 Step Counter diff --git a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Vibration_Sensor_SW-420.md b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Vibration_Sensor_SW-420.md index e7d9ecfbb389..613c2ab107a3 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Vibration_Sensor_SW-420.md +++ b/docs/Sensor/Grove/Grove_Sensors/Motion/Grove-Vibration_Sensor_SW-420.md @@ -189,7 +189,7 @@ Now you can set the **V+** to adjust the sensitivity, just remember: the lower t - **Step 2.** Copy all the code below, or you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into the new sketch. -```C++ +```cpp // constants won't change. They're used here to set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int buzzer = 3; // the number of the buzzer pin diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Adjustable_PIR_Motion_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Adjustable_PIR_Motion_Sensor.md index b5f55bf3545b..27a1ae9fcb2f 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Adjustable_PIR_Motion_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Adjustable_PIR_Motion_Sensor.md @@ -141,7 +141,7 @@ The typical voltage of L221D is 3.3V, so we use the [XC6206P332MR](https://files - **Step 1.** Just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp /*macro definitions of PIR motion sensor pin and LED pin*/ #define PIR_MOTION_SENSOR 2//Use pin 2 to receive the signal from the module #define LED 4//the Grove - LED is connected to D4 of Arduino diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Digital_Distance_Interrupter_0.5_to_5cm-GP2Y0D805Z0F.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Digital_Distance_Interrupter_0.5_to_5cm-GP2Y0D805Z0F.md index 75a90ef0615e..8d0579e26051 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Digital_Distance_Interrupter_0.5_to_5cm-GP2Y0D805Z0F.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Digital_Distance_Interrupter_0.5_to_5cm-GP2Y0D805Z0F.md @@ -97,7 +97,7 @@ GP2Y0D805Z0F is a distance measuring sensor unit, composed of an integrated comb - **Step 1.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```c++ +```cpp /* * * Copyright (c) 2018 Seeed Technology Co., Ltd. diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Doppler-Radar.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Doppler-Radar.md index 08cb5c795f14..b802e1801036 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Doppler-Radar.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Doppler-Radar.md @@ -136,7 +136,7 @@ Doppler radar works by sending a beam of electromagnetic radiation waves from th - **Step 4.** Upload the demo. If you do not know how to upload the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). #### Software Code -```C++ +```cpp #include "GBT24LTR11.h" #ifdef __AVR__ diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Gesture_v1.0.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Gesture_v1.0.md index 12d9152d400d..2f105569c222 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Gesture_v1.0.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Gesture_v1.0.md @@ -106,7 +106,7 @@ Software Installation. - **Step 4.** Start the Arduino IDE, Let's try the up/down demo. - **Step 5.** Copy below code and paste to arduino IDE. -```c++ +```cpp /* The following simple demo will show you a very easy application: When you move up, the red led will be turned on, otherwise the red led will be turned off. */ @@ -138,7 +138,7 @@ void loop() - **Step 8.** Let's try the 9 gestures by select **File->Example->Grove_Gesture->paj7620_9gestures**, then select Seeeduino v4 as board manager and correct COM port. -```c++ +```cpp #include #include "paj7620.h" @@ -281,7 +281,7 @@ void loop() - **Step 9.** Click upload and open the Serial Monitor port. - **Step 10.** This example can recognize 9 gestures and output the result, including move up, move down, move left, move right, move forward, move backward, circle-clockwise, circle-counter clockwise, and wave. Let's try and see COM port output as below. -```c++ +```cpp PAJ7620U2 TEST DEMO: Recognize 9 gestures. INIT SENSOR... Addr0 =20, Addr1 =76 @@ -1030,7 +1030,7 @@ while True: - **Step 4.** Here is the screen output. -```c++ +```cpp pi@raspberrypi:~/Dexter/GrovePi/Software/Python/grove_gesture_sensor $ python3 gesture_value.py wake-up finish. Paj7620 initialize register finished. diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-TF_Mini_LiDAR.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-TF_Mini_LiDAR.md index 1db0a8a32170..e259babc7080 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-TF_Mini_LiDAR.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-TF_Mini_LiDAR.md @@ -107,7 +107,7 @@ Platforms Supported - **Step 2**. Copy the code into Arduino IDE and upload. -```C++ +```cpp #include "TFLidar.h" #define USETFMINI @@ -169,7 +169,7 @@ void loop() { You could delete **Line 41** to **Line 43** of the demo code if only the **Distance** is required: ::: -```C++ +```cpp SERIAL.print("strength = "); SERIAL.print(SeeedTFLidar.get_strength()); //output signal strength value ``` @@ -208,7 +208,7 @@ SERIAL.print(SeeedTFLidar.get_strength()); //output signal strength value #### Software -```C++ +```cpp #include"seeed_line_chart.h" //include the library #include "TFLidar.h" #define LINE_DIS 0X00 diff --git a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Ultrasonic_Ranger.md b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Ultrasonic_Ranger.md index d44a0694929e..70465543933f 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Ultrasonic_Ranger.md +++ b/docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Ultrasonic_Ranger.md @@ -509,7 +509,7 @@ The distance to obstacles in front is: 2 inches - A4: Yes, Here is the example, one sensor is connected to D2 and other to D3. -```c++ +```cpp #include "Ultrasonic.h" Ultrasonic ultrasonic1(2); diff --git a/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Capacitive_Moisture_Sensor-Corrosion-Resistant.md b/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Capacitive_Moisture_Sensor-Corrosion-Resistant.md index a2fd44350ef0..28bda88297cb 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Capacitive_Moisture_Sensor-Corrosion-Resistant.md +++ b/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Capacitive_Moisture_Sensor-Corrosion-Resistant.md @@ -147,7 +147,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se **Step 1.** Copy the code below, and download it to your arduino. If you do not know how to upload the code, please check [How to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```C++ +```cpp /* AnalogReadSerial @@ -182,7 +182,7 @@ void loop() { If every thing goes well, when you open the Serial Monitor it may show as below: ::: -```C++ +```cpp 678 663 631 diff --git a/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Moisture_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Moisture_Sensor.md index 016bce46f76f..a8db8c68b0f7 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Moisture_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Soli_Humidity/Grove-Moisture_Sensor.md @@ -112,7 +112,7 @@ If we don't have Grove Base Shield, We also can directly connect Grove-Moisture - **Step 1.** Copy the code into Arduino IDE and upload. If you do not know how to upload the code, please check [how to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp int sensorPin = A0; int sensorValue = 0; diff --git a/docs/Sensor/Grove/Grove_Sensors/Sound/Grove-Analog-Microphone.md b/docs/Sensor/Grove/Grove_Sensors/Sound/Grove-Analog-Microphone.md index e425ea973c1f..019f309ecad2 100755 --- a/docs/Sensor/Grove/Grove_Sensors/Sound/Grove-Analog-Microphone.md +++ b/docs/Sensor/Grove/Grove_Sensors/Sound/Grove-Analog-Microphone.md @@ -152,7 +152,7 @@ void loop() { **Software** -```C +```cpp #include "seeed_line_chart.h" //include the library TFT_eSPI tft; diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-AHT20-I2C-Industrial-Grade-Temperature&Humidity-Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-AHT20-I2C-Industrial-Grade-Temperature&Humidity-Sensor.md index 5ee1d887b8d9..1a1342516241 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-AHT20-I2C-Industrial-Grade-Temperature&Humidity-Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-AHT20-I2C-Industrial-Grade-Temperature&Humidity-Sensor.md @@ -104,7 +104,7 @@ Please plug the USB cable,Grove-AHT20 Temperature&Humidity Sensor Interface in #### Software Code -```C++ +```cpp // ARDUINO DEMO FOR GROVE-AHT20 // #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-I2C_High_Accuracy_Temp&Humi_Sensor-SHT35.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-I2C_High_Accuracy_Temp&Humi_Sensor-SHT35.md index bfd80ab8ad5e..3cd08e4b4f28 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-I2C_High_Accuracy_Temp&Humi_Sensor-SHT35.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-I2C_High_Accuracy_Temp&Humi_Sensor-SHT35.md @@ -149,7 +149,7 @@ If we don't have Grove Base Shield, We also can directly connect this module to 3. Or, you can just click the icon
in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_SHT35.h" @@ -223,7 +223,7 @@ void loop() If every thing goes well, when you open the Serial Monitor , it may show as below: ::: -```C++ +```cpp serial start!! => temperature =24.10 diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-SHT4x.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-SHT4x.md index 93587f0827b4..cca66110cd58 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-SHT4x.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-SHT4x.md @@ -148,7 +148,7 @@ Now that we have our library installed and we understand the basic functions, le **Step 4.** Negative to "file-->examples-->Sensirion IIC Sen4x-->exampleUsage" and open the example provided in the library. You can also copy the code below: -```c++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TempAndHumi_Sensor-SHT31.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TempAndHumi_Sensor-SHT31.md index 774b8e972a57..127bea79bf4a 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TempAndHumi_Sensor-SHT31.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TempAndHumi_Sensor-SHT31.md @@ -131,7 +131,7 @@ SenseCAP S210x series industrial sensors provide an out-of-box experience for en - **Step 3.** Restart the Arduino IDE. Open a new sketch, and copy the following code into the new sketch. -```C +```cpp #include #include #include "SHT31.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-Temperature-Humidity-Sensor-DH20.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-Temperature-Humidity-Sensor-DH20.md index 8f69489dbfc4..b61c0869a54a 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-Temperature-Humidity-Sensor-DH20.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-Temperature-Humidity-Sensor-DH20.md @@ -111,7 +111,7 @@ It has equipped with a fully calibrated digital I2C interface, so there are slig Once it is all set up, we can upload the sample code to see if it works: -```C++ +```cpp // Example testing sketch for various DHT humidity/temperature sensors // Written by ladyada, public domain #include "Wire.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TemperatureAndHumidity_Sensor-HDC1000.md b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TemperatureAndHumidity_Sensor-HDC1000.md index 30e3a300cbc1..4031a2d014b3 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TemperatureAndHumidity_Sensor-HDC1000.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temp&Humi/Grove-TemperatureAndHumidity_Sensor-HDC1000.md @@ -246,7 +246,7 @@ Here is how to use Grove - Temperature&Humidity Sensor (HDC1000) with Seeeduino - **Step 3.** Restart the Arduino IDE. Open a new sketch, and copy the following code into the new sketch. -```c++ +```cpp /* * HDC1000.h * A library for HDC1000 1.0 diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-1-Wire_Thermocouple_Amplifier-MAX31850K.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-1-Wire_Thermocouple_Amplifier-MAX31850K.md index 975e5407559c..52b9a0e61dc8 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-1-Wire_Thermocouple_Amplifier-MAX31850K.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-1-Wire_Thermocouple_Amplifier-MAX31850K.md @@ -179,7 +179,7 @@ This folder **\Arduino\libraries\Seeed_MAX31850K-master\examples** contains two Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include #include @@ -300,7 +300,7 @@ void loop(void) If every thing goes well, you will get the result. ::: -```c++ +```cpp DONE Device Address: 3B23211800ing temperatures... 77.00 Requesting temperatures...DONE diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-High_Temperature_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-High_Temperature_Sensor.md index f9eaef763d12..3d6fc538c02e 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-High_Temperature_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-High_Temperature_Sensor.md @@ -105,7 +105,7 @@ The platforms mentioned above as supported is/are an indication of the module's - Step 2. Refer [How to install library](https://wiki.seeedstudio.com/How_to_install_Arduino_Library) to install library for Arduino. - Step 3. Copy the code into Arduino IDE and upload. -```c++ +```cpp #include "High_Temp.h" HighTemp ht(A1, A0); diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_High_Accuracy_Temperature_Sensor-MCP9808.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_High_Accuracy_Temperature_Sensor-MCP9808.md index 4dfa479208aa..6a79f14e4dda 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_High_Accuracy_Temperature_Sensor-MCP9808.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_High_Accuracy_Temperature_Sensor-MCP9808.md @@ -87,7 +87,7 @@ we often use the hexadecimal address in the code, so let's convert the binary ad high level, we will get 0001,1111, which is 0x1F. So the I2C address range from 0x18 to 0x1F, among them, you can choose whatever you want, just make sure you will change the I2C address in the file **Seeed_MCP9808.h** in the **Grove_Temperature_sensor_MCP9808-master** library. -```c++ +```cpp #define DEFAULT_IIC_ADDR 0X18 ``` @@ -207,7 +207,7 @@ This is a typical Bi-directional level shifter circuit to connect two different The result sould be like -```C++ +```cpp sensor init!! temperature value is: 29.31 temperature value is: 29.31 @@ -225,7 +225,7 @@ temperature value is: 29.25 The code in the demo **MCP9808_demo_with_limit**: -```c++ +```cpp #include "Seeed_MCP9808.h" @@ -268,7 +268,7 @@ When the temperature is higher than 30℃, the **ALE Pad** output high between 28℃ and 30℃, and output low when the tempareture is higer than 30℃ or lower than 28℃. The code should be like: -```c++ +```cpp sensor.set_lower_limit(SET_LOWER_LIMIT_ADDR,0x01c0); delay(10); diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_Thermocouple_Amplifier-MCP9600.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_Thermocouple_Amplifier-MCP9600.md index 0af2fc922402..e2d33640a178 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_Thermocouple_Amplifier-MCP9600.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-I2C_Thermocouple_Amplifier-MCP9600.md @@ -169,7 +169,7 @@ If we don't have Grove Base Shield, We also can directly connect this module to 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_MCP9600.h" #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE @@ -300,7 +300,7 @@ void loop() If every thing goes well, when you open the Serial Monitor, you will see the temperature value and the alert information. ::: -```C++ +```cpp serial start!! version =4011 @@ -355,7 +355,7 @@ $$ Alert pin 1, alert pin2 and alert pin3 follow the same principle. You can change the hysteresis value and the limit by modify the line 23 and line 26. -```C++ +```cpp CHECK_RESULT(ret,sensor.set_alert_limit(i,sensor.covert_temp_to_reg_form(28+i))); /*Set hysteresis.for example,set hysteresis to 2℃,when the INT limitation is 30℃,interruption will be generated when diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Infrared_Temperature_Sensor_Array-AMG8833.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Infrared_Temperature_Sensor_Array-AMG8833.md index 5b94cf693d1e..c3150db15cb3 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Infrared_Temperature_Sensor_Array-AMG8833.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Infrared_Temperature_Sensor_Array-AMG8833.md @@ -138,7 +138,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include #include #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Thermal-Imaging-Camera-IR-Array.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Thermal-Imaging-Camera-IR-Array.md index 370691605960..117df51331cf 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Thermal-Imaging-Camera-IR-Array.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/Grove-Thermal-Imaging-Camera-IR-Array.md @@ -89,7 +89,7 @@ If it is your first time playing Wio Terminal and not sure which interface to pl **Software Code 1** -```C++ +```cpp /* Output the temperature readings to all pixels to be read by a Processing visualizer */ @@ -286,7 +286,7 @@ Upload the software code 1 above into your Arduino IDE and open the **Serial Por **Software Code 2** -```C++ +```cpp #include #include "MLX90641_API.h" #include "MLX9064X_I2C_Driver.h" diff --git a/docs/Sensor/Grove/Grove_Sensors/Temperature/One-Wire-Temperature-Sensor-DS18B20.md b/docs/Sensor/Grove/Grove_Sensors/Temperature/One-Wire-Temperature-Sensor-DS18B20.md index 6ff69f1defc7..ffe82636b1f1 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Temperature/One-Wire-Temperature-Sensor-DS18B20.md +++ b/docs/Sensor/Grove/Grove_Sensors/Temperature/One-Wire-Temperature-Sensor-DS18B20.md @@ -108,7 +108,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se **Software Code** -```C++ +```cpp // Include the libraries we need #include #include diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12-Channel-Capacitive-Touch-Keypad-ATtiny1616-.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12-Channel-Capacitive-Touch-Keypad-ATtiny1616-.md index d47e9dc1e033..08e0f3867f1a 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12-Channel-Capacitive-Touch-Keypad-ATtiny1616-.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12-Channel-Capacitive-Touch-Keypad-ATtiny1616-.md @@ -111,7 +111,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 2**. Then open `12_Channel_Keypad.ino`, or you can just copy the following code into a new Arduino sketch. -```c++ +```cpp #include "SoftwareSerial.h" #if defined(ARDUINO_ARCH_AVR) @@ -279,7 +279,7 @@ For more detial, please check the official [Raspberry Pi UART Config](https://ww After the system environment is successfully configured, you can see a prompt like this: -```C++ +```cpp Running setup.py install for grove.py ... done Successfully installed grove.py-0.6 ####################################################### @@ -290,7 +290,7 @@ Successfully installed grove.py-0.6 Now, tap 'ls', you can find the **grove.py** folder under the root directory. -```c++ +```cpp pi@raspberrypi:~ $ ls 01_HelloRPi Desktop MagPi rpi_apa102driver 01_HelloRPi.cpp Documents Music Templates diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121.md index baa59903557f..809356ba2ff6 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-12_Key_Capacitive_I2C_Touch_Sensor_V2-MPR121.md @@ -192,7 +192,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_MPR121_driver.h" Mpr121 mpr121; @@ -257,7 +257,7 @@ void loop() If everything goes well, you will get the result. When you touch the CH0 ~ CH11 pads, it will trigger **key ?pressed** and **key ?release** ::: -```C++ +```cpp mpr121 inmpr121 init OK! key 11pressed key 11release @@ -413,7 +413,7 @@ if __name__ == '__main__': If everything goes well, you will get the result. When you touch the CH0 ~ CH11 pads, it will trigger **channel # pressed** and **Channel # released** with corresponding pressure values. ::: -```C++ +```cpp >>> %Run grove_12_chan_touch_sensor_MPR121.py Channel 8 is pressed, value is 308 Channel 8 is released, value is 0 diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-2_Channel_Inductive_Sensor-LDC1612.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-2_Channel_Inductive_Sensor-LDC1612.md index 4f8d9c098e98..9e82cbb59e0b 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-2_Channel_Inductive_Sensor-LDC1612.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-2_Channel_Inductive_Sensor-LDC1612.md @@ -132,7 +132,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se **Coin demo** This program allows user to detect the distance from the coin to the copper trace. -```C++ +```cpp #include "Seeed_LDC1612.h" @@ -230,7 +230,7 @@ The library file may be updated. This code may not be applicable to the updated If everything goes well, you will see the following result ::: -```C++ +```cpp The distance between the COIN is 5~10mm The distance between the COIN is 5~10mm @@ -247,7 +247,7 @@ The distance between the COIN is 5~10mm Code for basic_demo.ino -```C++ +```cpp #include "Seeed_LDC1612.h" @@ -302,7 +302,7 @@ void loop() If everything goes well, you will see the following result ::: -```C++ +```cpp start! 17:06:16.418 -> fsensor =3.74 @@ -327,7 +327,7 @@ You may connect coil 1 as shown below: Code for muti_channel_demo.ino -```C++ +```cpp #include "Seeed_LDC1612.h" #include "math.h" @@ -387,7 +387,7 @@ void loop() If everything goes well, you will see the following result ::: -```C++ +```cpp start! 17:04:34.063 -> fsensor =3.74 diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Capacitive_Touch_Slide_Sensor-CY8C4014LQI.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Capacitive_Touch_Slide_Sensor-CY8C4014LQI.md index f8ac0113cbf8..18291a9fd612 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Capacitive_Touch_Slide_Sensor-CY8C4014LQI.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Capacitive_Touch_Slide_Sensor-CY8C4014LQI.md @@ -149,7 +149,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se 3. Or, you can just click the icon ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into a new sketch in the Arduino IDE. -```C++ +```cpp #include "Seeed_CY8C401XX.h" @@ -201,7 +201,7 @@ The library file may be updated. This code may not be applicable to the updated If every thing goes well, when you open the Serial Monitor and touch the slide touch sensor, you will see the LED light up, and the Serial Monitor is shown below: ::: -```C++ +```cpp button value is1 button 1 is pressed slider value is0 diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Rotary_Angle_Sensor.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Rotary_Angle_Sensor.md index 40ca51358daf..e3bc789c4b2c 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Rotary_Angle_Sensor.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Rotary_Angle_Sensor.md @@ -107,7 +107,7 @@ If we don't have Grove Base Shield, We also can directly connect Grove-Rotary An - **Step 1.** Please copy below code to Arduio IDE and upload to arduino. If you do not know how to upload the code, please check [how to upload code](https://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp /*macro definitions of Rotary angle sensor and LED pin*/ #define ROTARY_ANGLE_SENSOR A0 diff --git a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Round_Force_Sensor_FSR402.md b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Round_Force_Sensor_FSR402.md index b9cf389be3d1..01785ceb0eb6 100644 --- a/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Round_Force_Sensor_FSR402.md +++ b/docs/Sensor/Grove/Grove_Sensors/Touch/Grove-Round_Force_Sensor_FSR402.md @@ -163,7 +163,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 1.** Open the Arduino IDE and create a new file, then copy the following code into the new file. -```C++ +```cpp /* How to use a Force sensitive resistor to fade an LED with Arduino More info: http://www.ardumotive.com/how-to-use-a-force-sensitive-resistor-en.html Dev: Michalis Vasilakis // Date: 22/9/2015 // www.ardumotive.com */ diff --git a/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver.md b/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver.md index 6add41f3e822..aca058209d99 100644 --- a/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver.md +++ b/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver.md @@ -121,7 +121,7 @@ Grove - I2C FM Receiver v1.1 | Change some components to make the board more st - **Step 3.** Copy the following code into you Arduino IDE, then save and compile. -```c++ +```cpp /* * I2C_FM.ino diff --git a/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver_v1.1.md b/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver_v1.1.md index c2e0a83aff45..896272c632a7 100644 --- a/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver_v1.1.md +++ b/docs/Sensor/Grove/Grove_Sensors_Network/Standard_Protocol/Grove-I2C_FM_Receiver_v1.1.md @@ -126,7 +126,7 @@ Grove - I2C FM Receiver v1.1 | Change some components to make the board more st - **Step 3.** Copy the following code into you Arduino IDE, then save and compile. -```c++ +```cpp /* * I2C_FM.ino diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/XIAO_ESP32C3_Getting_Started.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/XIAO_ESP32C3_Getting_Started.md index 9fe2507d0355..423039b2fe3f 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/XIAO_ESP32C3_Getting_Started.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/XIAO_ESP32C3_Getting_Started.md @@ -207,7 +207,7 @@ In addition, during communication in particular, spike-like errors occurred, whi The following is the procedure to test the battery voltage. -```c++ +```cpp void setup() { Serial.begin(115200); pinMode(A0, INPUT); // ADC diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Embedded_Swift.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Embedded_Swift.md index 4c77c3f0b718..3795c5aba11f 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Embedded_Swift.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Embedded_Swift.md @@ -9,6 +9,8 @@ last_update: --- # Guide to Embedded Swift with Seeed Studio XIAO-C6 +

pir

+ ## Introduction The Seeed Studio XIAO ESP32C6 is a powerful and versatile development board built around the ESP32-C6 SoC, featuring dual 32-bit **RISC-V** processors. The high-performance processor operates up to 160 MHz, while the low-power processor runs up to 20 MHz. With 512KB SRAM and 4MB Flash, the XIAO ESP32C6 offers significant programming space, making it ideal for various IoT applications. This board excels in wireless connectivity, supporting 2.4 GHz Wi-Fi 6, Bluetooth® 5.3, Zigbee, and Thread (802.15.4), and is Matter-native, which is crucial for smart-home interoperability. diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Getting_Started.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Getting_Started.md index 103fa22a9ccf..66fa32ff242c 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Getting_Started.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C6/XIAO_ESP32C6_Getting_Started.md @@ -10,7 +10,7 @@ slug: /xiao_esp32c6_getting_started toc_max_heading_level: 4 sidebar_position: 1 last_update: - date: 04/02/2024 + date: 07/16/2024 author: Spencer --- @@ -316,6 +316,21 @@ If you want to connect the battery for XIAO, we recommend you to purchase qualif When you use battery power, there will be no voltage on the 5V pin. ::: +:::tip red indicator light + +At the same time, we have the red indicator light for battery charging as [XIAO ESP32S3](/xiao_esp32s3_getting_started/#battery-usage): + +The red light behavior for the XIAO ESP32 C6 is as follows: + +- When the XIAO ESP32 C6 is not connected to a battery: + - The red light comes on when the Type-C cable is connected and goes off after 30 seconds. +- When the battery is connected and the Type-C cable is connected for charging: + - The red light flashes. +- When the battery is fully charged via the Type-C connection: + - The red light turns off. + +::: + ## Deep sleep mode and wake-up The XIAO ESP32C6 has a complete deep sleep mode and wake-up function. Here we will show two of the more common examples offered by the ESP. diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/Seeeduino-XIAO-Expansion-Board.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/Seeeduino-XIAO-Expansion-Board.md index d43781ede324..4970e07461da 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/Seeeduino-XIAO-Expansion-Board.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/Seeeduino-XIAO-Expansion-Board.md @@ -159,7 +159,7 @@ This example introduces how to use the OLED display on the Seeed Studio Expansio **OLED Code** -```CPP +```cpp #include #include #include @@ -190,7 +190,7 @@ This example introduces how to use the button on the Seeed Studio Expansion Base **Code** -```CPP +```cpp const int buttonPin = 1; // the number of the pushbutton pin int buttonState = 0; // variable for reading the pushbutton status @@ -234,7 +234,7 @@ This example uses Buzzer on the Seeed Studio Expansion Base for XIAO to play Hap **Code** -```CPP +```cpp int speakerPin = D3; int length = 28; // the number of notes char notes[] = "GGAGcB GGAGdc GGxecBA yyecdc"; @@ -303,7 +303,7 @@ This example uses a rotary angle sensor to control servo via integration ports o If your Development Board is **XIAO ESP32 Series**. Before you run the following code, you need to install ESP32Servo library first in **Arduino Library Manager** and change the following code from ```#include ``` to ```#include ```. ::: -```CPP +```cpp #include #include #include @@ -349,7 +349,7 @@ This example uses RTC to display the clock on the OLED. **Step 3**. Copy the code and stick on the Ardiono IDE then upload it. -```CPP +```cpp #include #include #include @@ -639,7 +639,7 @@ The MicroSD card system format is FAT or exFAT. If you use other MicroSD card sy **The `main.py` code** -```CPP +```cpp import sd f = open("/sd/hello.txt", "r") ## read the file from SD card print(f.read()) @@ -649,7 +649,7 @@ print(f.read()) **The `sd.py` code** -```CPP +```cpp import os import adafruit_sdcard import board @@ -731,7 +731,7 @@ Please follow the same color line to connect each sensor on the board. Please co **Code** -```CPP +```cpp #include #include @@ -849,7 +849,7 @@ Please follow the same color line to connect each sensor on the board. Please co **Code** -```CPP +```cpp #include #include #include @@ -995,7 +995,7 @@ If other people put their finger on it, the LED ring will turn to red colour and **Code** -```C +```cpp #include #include #include @@ -1183,7 +1183,7 @@ Please connect the expansion board and the required modules with Grove wire, con **Code** -```C +```cpp #include #include "ATSerial.h" #include "Protocol.h" @@ -1310,7 +1310,7 @@ Please connect each sensor as shown in the diagram. Connect the CO2 sensor and P **Code** -```C +```cpp #include #include #include @@ -1536,7 +1536,7 @@ As shown in the figure below, connect the heart rate sensor to the I2C interface **Code** -```C +```cpp #include #include @@ -1584,6 +1584,10 @@ void loop() { - **[SCH]**[**Seeed Studio Expansion Base for XIAO_v1.0_200824**](https://files.seeedstudio.com/wiki/Seeeduino-XIAO-Expansion-Board/document/Seeeduino%20XIAO%20Expansion%20board_v1.0_200824.sch) - **[BRD]**[**Seeed Studio Expansion Base for XIAO_v1.0_200824**](https://files.seeedstudio.com/wiki/Seeeduino-XIAO-Expansion-Board/document/Seeeduino%20XIAO%20Expansion%20board_v1.0_200824.brd) +## FAQ + +### Q1: Does the PMIC on the XIAO Expansion board output power on the 5V pins? If so, how much current can we draw? + ## Tech Support & Product Discussion Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs. diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/XIAO-RP2040-EI.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/XIAO-RP2040-EI.md index cb1ed7cc3ac3..c820e4f1858e 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/XIAO-RP2040-EI.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/XIAO-RP2040-EI.md @@ -48,7 +48,7 @@ Open the Arduino IDE, navigate to Sketch -> Include Library -> Manage Libraries. After the installation, copy the following code run it. -```c++ +```cpp #include #include "MMA7660.h" MMA7660 accelemeter; diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-Arduino.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-Arduino.md index 598457f6c55f..9eee9e902253 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-Arduino.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-Arduino.md @@ -108,7 +108,7 @@ Connect a pushbutton to Pin D0 and an LED to Pin 25. Then upload the following c Please note that the operating voltage of the Seeed Studio XIAO RP2040 is 3.3V, if you connect the sensor to 5V incorrectly, the motherboard may not work properly. ::: -```c++ +```cpp const int buttonPin = D0; // the number of the pushbutton pin const int ledPin = 25; // the number of the LED pin @@ -140,7 +140,7 @@ void loop() { Connect a potentiometer to Pin A0 and an LED to Pin 25. Then upload the following code to control the blinking interval of the LED by rotating the potentiometer knob. -```c++ +```cpp const int sensorPin = A0; const int ledPin = 25; void setup() { @@ -167,7 +167,7 @@ int sensorValue = analogRead(sensorPin); Use pin D6 as the TX pin of UART and pin D7 as RX pin of UART to send the "Hello World!" message -```c++ +```cpp void setup() { Serial.begin(115200); while (!Serial); @@ -193,7 +193,7 @@ Type the keyword "Adafruit_NeoPixel" library in Ardunio library Manager and inst - **Step 2.** Copy the codes to Arduino and click the **Upload** button to upload. -```c++ +```cpp #include int Power = 11; @@ -257,7 +257,7 @@ Type the keyword "U8G2" library in Ardunio library Manager and install the laste - **Step 2.** Copy the codes to Arduino and click the **Upload** button to upload. -```c++ +```cpp #include #include @@ -314,7 +314,7 @@ Type the keyword "Adafruit_SSD1306" library in Ardunio library Manager and insta - **Step 2.** Copy the codes to Arduino and click the **Upload** button to upload. -```c++ +```cpp #include #include #include diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-CircuitPython.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-CircuitPython.md index bc52375f3cc2..d3782e2bdac6 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-CircuitPython.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-CircuitPython.md @@ -58,7 +58,7 @@ Now you have successfully installed the CircuitPython to the Seeed Studio XIAO R **Step 3** Copy and upload the following codes: -```c++ +```cpp """Example for Pico. Blinks the built-in LED.""" import time import board diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-MicroPython.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-MicroPython.md index a848885763f4..93ddb6bf2d03 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-MicroPython.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/XIAO-RP2040-with-MicroPython.md @@ -64,7 +64,7 @@ Click on the Install button and close this page when the installation status say - **Step 3**. Copy the following codes to Thonny. -```c++ +```cpp from machine import Pin, Timer led = Pin(25, Pin.OUT) diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md index 3ec2a496823e..eb79da2b34f0 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md @@ -55,7 +55,7 @@ enable_uart=1 - **Step 2.** Copy the following code to Arduino IDE and upload the code into Seeed Studio XIAO SAMD21. -```c++ +```cpp uint32_t baud; uint32_t old_baud; void setup() { diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/XIAO-BLE-Sense-Bluetooth-Usage.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/XIAO-BLE-Sense-Bluetooth-Usage.md index 92a603c34c80..c0c5b7d7e6d4 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/XIAO-BLE-Sense-Bluetooth-Usage.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/XIAO-BLE-Sense-Bluetooth-Usage.md @@ -88,7 +88,7 @@ In this example, we are going to connect the Seeed Studio XIAO nF52840 (Sense) a Please paste this code below into the Arduino IDE and upload it to the Seeed Studio XIAO nRF52840. -```c++ +```cpp #include BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service @@ -163,7 +163,7 @@ void loop() { The key to the implementation of this example is the following paragraph. -```c++ +```cpp while (central.connected()) { if (switchCharacteristic.written()) { if (switchCharacteristic.value()) { @@ -228,7 +228,7 @@ Please open the example code in the library and upload it to Seeed Studio XIAO n
-```c++ +```cpp //Radar_with_XIAOBLE_example #include @@ -307,7 +307,7 @@ void loop() { In this example, the function that sends data to the mobile device is `setValue()`. If you want to get a real time display of the data you need to add `BLENotify` to this code below. The last parameter, 20, indicates the maximum length of data you can send. -```c++ +```cpp BLEStringCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify, 20); ``` @@ -361,7 +361,7 @@ Before you start, please be prepared to do the following. Please select one of the XIAO nRF52840, which does not require any device to be connected, and upload the program below directly. -```c++ +```cpp #include BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service @@ -448,7 +448,7 @@ Put the Seeed Studio XIAO nRF52840 on the expansion board. And for this purpose the XIAO with the extension board connected uploads the following procedure. -```c++ +```cpp #include #include #include diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/XIAO-BLE-PDM-EI.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/XIAO-BLE-PDM-EI.md index eb18da76e0b2..fef4e01354ec 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/XIAO-BLE-PDM-EI.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/XIAO-BLE-PDM-EI.md @@ -293,7 +293,7 @@ First, we need to define a threshold. We know that the predictions go from 0.0 t First, define some variables. I've define these right after the included libraries: -```C +```cpp /* threshold for predictions */ float threshold = 0.7; @@ -320,7 +320,7 @@ int oldLED; Next, in the loop() function, inside the for loop instruction, where we loop thought the CLASSIFIER_LABEL_COUNT (around line 129 - already with the lines above): -```C +```cpp for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { ``` @@ -328,7 +328,7 @@ We use a if instruction to check for the classification value . If it's above t The complete for loop, with our additions, is: -```C +```cpp for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { ei_printf(" %s: %.5f\n", result.classification[ix].label, result.classification[ix].value); //lets light up some LEDS diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE-Sense-Pin-Multiplexing.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE-Sense-Pin-Multiplexing.md index b9f76a6f8189..45dd192cd5a3 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE-Sense-Pin-Multiplexing.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE-Sense-Pin-Multiplexing.md @@ -20,7 +20,7 @@ Seeed Studio XIAO nRF52840 (Sense) has rich interfaces. There are **11 digital I Connect a pushbutton to Pin D6 and an LED to Pin D10. Then upload the following code to control the ON/OFF of LED using the pushbutton. -```c++ +```cpp const int buttonPin = 6; // pushbutton connected to digital pin 6 const int ledPin = 10; // LED connected to digital pin 10 @@ -82,7 +82,7 @@ void loop() { Connect a potentiometer to Pin A5 and an LED to Pin D10. Then upload the following code to control the blinking interval of the LED by rotating the potentiometer knob. -```c++ +```cpp const int sensorPin = 5; const int ledPin = 10; void setup() { @@ -109,7 +109,7 @@ void loop() { Use Serial1 to use the UART via GPIO instead of USB. You can use both concurrently as well. Use pin D6 as the TX pin of UART and pin D7 as RX pin of UART to send the "Hello World!" message. -```c++ +```cpp void setup() { Serial1.begin(115200); while (!Serial1); diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE_CircutPython.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE_CircutPython.md index 820f9ec10efb..c84f58400fae 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE_CircutPython.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO-BLE_CircutPython.md @@ -54,7 +54,7 @@ Now you have successfully install the CircuitPython to the Seeed Studio XIAO nRF **Step 3** Copy and upload the following codes: -```c++ +```cpp """Example for Seeed Studio XIAO nRF52840. Blinks the built-in LED.""" import time import board diff --git a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO_BLE.md b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO_BLE.md index 96028424831e..0392af01be4e 100644 --- a/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO_BLE.md +++ b/docs/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/XIAO_BLE.md @@ -2,12 +2,12 @@ description: Getting Started with Seeed Studio XIAO nRF52840 (Sense) title: Getting Started with XIAO nRF52840 keywords: -- xiao + - xiao image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png slug: /XIAO_BLE last_update: - date: 1/11/2023 - author: shuxu hu + date: 2024-07-16T06:09:39.067Z + author: Spencer --- # Getting Started with Seeed Studio XIAO nRF52840 (Sense) @@ -270,6 +270,19 @@ Currently for this issue, we recommend that users do not turn off the ADC functi

pir

+### Q4: How does the red light behave when powered on? + +

nRF52840 RGB Schematic

+ +The `P0.17` pin is used to control the red indicator light behavior, indicating the charging status: + +- Low level: when **charging** is in progress. +- High level: when the battery is either **not charging** or **fully charged**. + +When it is at a low level, the `RED_CHG` LED will light up. + +For more details, check the PMIC datasheet: [BQ25100](https://www.ti.com/lit/ds/symlink/bq25100a.pdf) and [XIAO nRF52840 datasheet](https://files.seeedstudio.com/wiki/XIAO-BLE/nRF52840_PS_v1.5.pdf). + ## Resources ### Seeed Studio XIAO nRF52840 diff --git a/docs/Sensor/Seeeduino Series/Seeeduino/Seeeduino_v4.0.md b/docs/Sensor/Seeeduino Series/Seeeduino/Seeeduino_v4.0.md index 1592765f493f..e490883441b1 100644 --- a/docs/Sensor/Seeeduino Series/Seeeduino/Seeeduino_v4.0.md +++ b/docs/Sensor/Seeeduino Series/Seeeduino/Seeeduino_v4.0.md @@ -265,7 +265,7 @@ Connect your ESP8266 WiFi module to the Seeeduino board as follows (See the phot **2.** Open the Arduino IDE **3.** Upload a blank program to your board, or make sure that the program it has does not user any Serial functions. -```C++ +```cpp void setup() { diff --git a/docs/Sensor/Seeeduino Series/Seeeduino_LoRAWAN.md b/docs/Sensor/Seeeduino Series/Seeeduino_LoRAWAN.md index 314e5b43a755..159528ddfafd 100644 --- a/docs/Sensor/Seeeduino Series/Seeeduino_LoRAWAN.md +++ b/docs/Sensor/Seeeduino Series/Seeeduino_LoRAWAN.md @@ -237,7 +237,7 @@ Charge status pin and positive pin of the battery had beed connect to A4 and A5, Copy and upload the below code to detect the battery status. -```c++ +```cpp // battey of Seeeduino LoRaWAN const int pin_battery_status = A5; @@ -356,7 +356,7 @@ After both of the sketch is well uploaded, open the serial monitor of the receiv * Step 4. Download [DHT Library](https://files.seeedstudio.com/wiki/Seeeduino_LoRa/res/DHT.zip) and unzip to arduino library folder. * Step 5. Copy below code to arduino IDE and upload. -```c++ +```cpp #include #include "DHT.h" @@ -450,7 +450,7 @@ void loop(void) * Step 1. Please refer to [User Manual](https://files.seeedstudio.com/wiki/LoRaWAN_Gateway-868MHz_Kit_with_Raspberry_Pi_3/res/RHF-UM01649-IoT-Discovery-User-Manual-seeed-v2.1.pdf) Session 3.2.3 to setup the gateway. * Step 2. For seeeduino Lorawan, Please open your Arduino IDE and click on **File > Examples > LoRaWAN > OTAA** and refer the code. -```c++ +```cpp #include @@ -537,7 +537,7 @@ void loop(void) * Step 1. Copy below code you Seeeduino LoRaWAN W/GPS. -```c++ +```cpp void setup() { Serial2.begin(9600); @@ -565,7 +565,7 @@ void loop() Thanks for **Todd Krein** for sharing the example in Github. Please download the [TinyGPS++ library](https://files.seeedstudio.com/wiki/Seeeduino_LoRa/res/TinyGPSPlus-master.zip) and then copy below code to Seeeduino Lorawan. -```c++ +```cpp #define USE_GPS 1 #include "LoRaWan.h" @@ -746,7 +746,7 @@ void dummy(void) If you want to check version of you board, please upload below code to your board. -```c++ +```cpp void setup() { Serial1.begin(9600); diff --git a/docs/Sensor/SenseCAP/SenseCAP_Indicator/Development_Tutorial/SenseCAP_Indicator_Arduino.md b/docs/Sensor/SenseCAP/SenseCAP_Indicator/Development_Tutorial/SenseCAP_Indicator_Arduino.md index 9c6f3756bcf4..e9b60eda1dfe 100644 --- a/docs/Sensor/SenseCAP/SenseCAP_Indicator/Development_Tutorial/SenseCAP_Indicator_Arduino.md +++ b/docs/Sensor/SenseCAP/SenseCAP_Indicator/Development_Tutorial/SenseCAP_Indicator_Arduino.md @@ -8,6 +8,7 @@ slug: /SenseCAP_Indicator_ESP32_Arduino last_update: date: 9/24/2023 author: Hendra +craft: true --- # Develop SenseCAP Indicator both chips with Arduino diff --git a/docs/Sensor/Wio_Series/Wio-E5/LoRa-E5_STM32WLE5JC_Module.md b/docs/Sensor/Wio_Series/Wio-E5/LoRa-E5_STM32WLE5JC_Module.md index 111524a79d98..a4e16fb78fb2 100644 --- a/docs/Sensor/Wio_Series/Wio-E5/LoRa-E5_STM32WLE5JC_Module.md +++ b/docs/Sensor/Wio_Series/Wio-E5/LoRa-E5_STM32WLE5JC_Module.md @@ -558,7 +558,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** * **Step 7.** Please follow the [guide](https://wiki.seeedstudio.com/LoRa_E5_mini/#13-connect-and-send-data-to-the-things-network) here to setup your TTN application, get your **Application EUI** and copy it to the macro definition `LORAWAN_JOIN_EUI` in `LoRaWAN/App/se-identity.h` , for example, the Application EUI here is `80 00 00 00 00 00 00 0x07` : -```C +```cpp // LoRaWAN/App/se-identity.h /*! @@ -569,7 +569,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** * **Step 8.** Also, you can modify your **Device EUI** and **Application Key**, by setting the macro definition `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` in `LoRaWAN/App/se-identity.h`. Make sure `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` are the same as the `Device EUI` and `App Key` in TTN console. -```C +```cpp // LoRaWAN/App/se-identity.h /*! diff --git a/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_Dev_Board.md b/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_Dev_Board.md index c0432a97a8c2..30c63f021918 100644 --- a/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_Dev_Board.md +++ b/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_Dev_Board.md @@ -441,7 +441,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** - **Step 7.** Please follow the [guide](https://wiki.seeedstudio.com/LoRa_E5_mini/#13-connect-and-send-data-to-the-things-network) here to setup your TTN application, get your **Application EUI** and copy it to the macro definition `LORAWAN_JOIN_EUI` in `LoRaWAN/App/se-identity.h` , for example, the Application EUI here is `80 00 00 00 00 00 00 0x07` : -```C +```cpp // LoRaWAN/App/se-identity.h /*! @@ -452,7 +452,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** - **Step 8.** Also, you can modify your **Device EUI** and **Application Key**, by setting the macro definition `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` in `LoRaWAN/App/se-identity.h`. Make sure `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` are the same as the `Device EUI` and `App Key` in TTN console. -```C +```cpp // LoRaWAN/App/se-identity.h /*! diff --git a/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_mini.md b/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_mini.md index a71957c7f6bf..4a9880d49e77 100644 --- a/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_mini.md +++ b/docs/Sensor/Wio_Series/Wio-E5/LoRa_E5_mini.md @@ -446,7 +446,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** - **Step 7.** Please follow the [guide](https://wiki.seeedstudio.com/LoRa_E5_mini/#13-connect-and-send-data-to-the-things-network) here to setup your TTN application, get your **Application EUI** and copy it to the macro definition `LORAWAN_JOIN_EUI` in `LoRaWAN/App/se-identity.h` , for example, the Application EUI here is `80 00 00 00 00 00 00 0x07` : -```C +```cpp // LoRaWAN/App/se-identity.h /*! @@ -457,7 +457,7 @@ Now we will modify our **Device EUI**, **Application EUI**, **Application KEY** - **Step 8.** Also, you can modify your **Device EUI** and **Application Key**, by setting the macro definition `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` in `LoRaWAN/App/se-identity.h`. Make sure `LORAWAN_DEVICE_EUI` and `LORAWAN_NWK_KEY` are the same as the `Device EUI` and `App Key` in TTN console. -```C +```cpp // LoRaWAN/App/se-identity.h /*! diff --git a/docs/Sensor/Wio_Series/Wio_Tracker/Wio-Extension-RTC.md b/docs/Sensor/Wio_Series/Wio_Tracker/Wio-Extension-RTC.md index 1ff7a72afbed..a6712ad8ceb9 100644 --- a/docs/Sensor/Wio_Series/Wio_Tracker/Wio-Extension-RTC.md +++ b/docs/Sensor/Wio_Series/Wio_Tracker/Wio-Extension-RTC.md @@ -165,7 +165,7 @@ Unzip the [sample sketch](https://github.com/Seeed-Studio/Wio_Extension_RTC/raw/ 6. Use Serial monitor to print the serial message. -```c++ +```cpp #include #include "WioRTC.h" diff --git a/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat.1.md b/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat.1.md index 09a9589c887d..0d826c216487 100644 --- a/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat.1.md +++ b/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat.1.md @@ -375,7 +375,7 @@ Hi, the board of "Wio LTE Cat.1" is stored in "Seeed SAMD Boards" package like " - Step 8. Select Sketch-->Upload to upload the code to Wio_LTE. - Step 9. Press **RST** button to enable the COM port. -```c++ +```cpp #include "wio_tracker.h" char message[128] = "Hello from Wio Traker!"; @@ -413,7 +413,7 @@ void loop() { - Step 10.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 11. The phone number owner will receive the message. -```C++ +```cpp Power On! @@ -435,7 +435,7 @@ Send OK! - Step 7. Select Sketch-->Upload to upload the code to Wio_LTE. - Step 8. Press **RST** button to enable the COM port. -```C++ +```cpp #include "wio_tracker.h" uint16_t newSMSNumber = -1; @@ -485,7 +485,7 @@ void loop() { - Step 9.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 10. Open serial monitor, when seeing **Waitting for new SMS!**, send message to the board, the new message will display soon with phone number, time, content. -```C +```cpp Power On! Wait for network registered... @@ -517,7 +517,7 @@ Waiting for new SMS! - Step 7. Select Sketch-->Upload to upload the code to Wio_LTE. - Step 8. Press **RST** button to enable the COM port. -```c++ +```cpp #include "gnss.h" @@ -566,7 +566,7 @@ void loop() { - Step 9.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 10. We will see lat, lon info printed on screen. -```C +```cpp Waitting for module to alvie... Waitting for module to alvie... Waitting for module to alvie... @@ -610,7 +610,7 @@ Data type in string: 113.966248,22.583819 - Step 7. Select Sketch-->Upload to upload the code to Wio_LTE. - Step 8. Press **RST** button to enable the COM port. -```C +```cpp #include "gnss.h" @@ -664,7 +664,7 @@ void loop() { - Step 9.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 10. We will see below logs. -```C +```cpp Waitting for module to alvie... Waitting for module to alvie... Waitting for module to alvie... @@ -741,7 +741,7 @@ $GPVTG,,T,2.3,M,0.0,N,0.0,K,A*0C - Step 10.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 11. The phone number owner will receive the call. -```c++ +```cpp #include "wio_tracker.h" WioTracker wio = WioTracker(); @@ -788,7 +788,7 @@ void loop() { - Step 7. Keep COM Port blank. - Step 8. Select Sketch-->Upload to upload the code to Wio_LTE. -```C +```cpp #include "ethernet.h" Ethernet eth = Ethernet(); @@ -898,7 +898,7 @@ Hello world! - Step 8. Select Sketch-->Upload to upload the code to Wio_LTE. -```C +```cpp // include the SD library: #include @@ -985,7 +985,7 @@ void loop(void) { -```C +```cpp Initializing SD card... Card type: SDHC diff --git a/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat_M1_NB-IoT_Tracker.md b/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat_M1_NB-IoT_Tracker.md index a1edbc2b1166..c2a525551678 100644 --- a/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat_M1_NB-IoT_Tracker.md +++ b/docs/Sensor/Wio_Series/Wio_Tracker/Wio_LTE_Cat_M1_NB-IoT_Tracker.md @@ -153,7 +153,7 @@ running up to 168MHZ - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include #include @@ -191,7 +191,7 @@ void loop() { - Step 7. Select Sketch-->Upload to upload the code to Wio LTE Cat NB1. - Step 8. Press **RST** button to enable the COM port. -```c++ +```cpp #include @@ -214,7 +214,7 @@ void loop() { - Step 9. Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 10. We will see lat, lon info printed on screen. -```C++ +```cpp $GNRMC,,V,,,,,,,,,,N*4D $GNVTG,,,,,,,,,N*2E $GNGGA,,,,,,0,00,99.99,,,,,,*56 @@ -253,7 +253,7 @@ $GNGLL,,,,,,V,N*7A - Step 7. Select Sketch-->Upload to upload the code to Wio_LTE. -```C++ +```cpp // include the SD library: #include @@ -354,7 +354,7 @@ void loop(void) { - Step 9.Use COM monitor tools to print the serial message. **Please do not use Arduino IDE COM monitor! That may cause the next time downloading fail, but reopen Arduino IDE can recover that issue**. - Step 10. Open serial monitor, we will see below info on screen. -```C++ +```cpp Initializing SD card... Card type: SDHC @@ -377,7 +377,7 @@ Files found on the card (name, date and size in bytes): - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include #include @@ -415,7 +415,7 @@ void loop() { - Step 7. Press **RST**, then you can see below info on screen. -```c++ +```cpp AT+CSQ +CSQ: 99,99 @@ -449,7 +449,7 @@ AT+CSQ - Step 5. Keep COM Port blank. - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include Ublox_sara_r4 ublox = Ublox_sara_r4(); @@ -521,7 +521,7 @@ void loop() { - Step 7. Press **RST**, then you can see below info on screen. -```c++ +```cpp [INFO] Begin... [INFO] Waitting for module to alvie... ... @@ -549,7 +549,7 @@ void loop() { - Step 5. Keep COM Port blank. - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include Ublox_sara_r4 ublox = Ublox_sara_r4(); @@ -648,7 +648,7 @@ void loop() { - Step 5. Keep COM Port blank. - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include #include @@ -745,7 +745,7 @@ void loop() - Step 5. Keep COM Port blank. - Step 6. Select Sketch-->Upload to upload the code to Wio_LTE. -```c++ +```cpp #include #include diff --git a/docs/Sensor/Wio_Series/Wio_Tracker/wio_gps_board.md b/docs/Sensor/Wio_Series/Wio_Tracker/wio_gps_board.md index 03f0a7e2b3fc..99c8ce7606f8 100644 --- a/docs/Sensor/Wio_Series/Wio_Tracker/wio_gps_board.md +++ b/docs/Sensor/Wio_Series/Wio_Tracker/wio_gps_board.md @@ -484,7 +484,7 @@ void loop() { - **Step 5.** Upload code to Wio GPS board, it shows how to read a file from the SD card using the SD library and send it over the serial port. -```c++ +```cpp /* SD card file dump diff --git a/docs/Sensor/Wio_Terminal/Application/Easy_IoT/Connect-Wio-Terminal-to-Google-Cloud-IoT-Core.md b/docs/Sensor/Wio_Terminal/Application/Easy_IoT/Connect-Wio-Terminal-to-Google-Cloud-IoT-Core.md index f08f9b01d120..c9b3d9a566ce 100644 --- a/docs/Sensor/Wio_Terminal/Application/Easy_IoT/Connect-Wio-Terminal-to-Google-Cloud-IoT-Core.md +++ b/docs/Sensor/Wio_Terminal/Application/Easy_IoT/Connect-Wio-Terminal-to-Google-Cloud-IoT-Core.md @@ -201,14 +201,14 @@ Now we need to set the Wi-Fi credentials and Google Cloud IoT Core information i - **STEP 3:** Change the **Wifi network details** -```c++ +```cpp const char *ssid = "Enter_SSID"; const char *password = "Enter_Password"; ``` - **STEP 4:** Change the **Google Cloud IoT details** -```c++ +```cpp const char *project_id = "Enter_Project_ID"; const char *location = "Enter_location"; const char *registry_id = "Enter_Registry_ID"; @@ -217,7 +217,7 @@ const char *device_id = "Enter_Device_ID"; - **STEP 5:** Copy the private key bytes that we obtained from **ec_private.pem** and saved into notepad before -```c++ +```cpp const char *private_key_str = "6e:b8:17:35:c7:fc:6b:d7:a9:cb:cb:49:7f:a0:67:" "63:38:b0:90:57:57:e0:c0:9a:e8:6f:06:0c:d9:ee:" @@ -230,7 +230,7 @@ const char *private_key_str = Open **esp32-mqtt.h** and replace the entire file with the following codes. Here we have replaced configTime function with the implementation of obtaining NTP time via UDP. -```c++ +```cpp #include #include #include @@ -437,7 +437,7 @@ void setupCloudIoT(){ Add Wio Terminal board to macro definitions inside **Esp32-lwmqtt.ino** -```c++ +```cpp #if defined(ESP32) || defined(WIO_TERMINAL) #define __ESP32_MQTT_H__ #endif @@ -506,7 +506,7 @@ Navigate to **Esp32-lwmqtt.ino** and add the following - **STEP 1:** After the loop, add the following for the built-in light sensor -```c++ +```cpp void loop() { int light = analogRead(WIO_LIGHT); //assign variable to store light sensor values light = map(light,0,1023,0,100); //Map sensor values @@ -514,7 +514,7 @@ void loop() { - **STEP 2:** Add the topic with the Subfolder name -```c++ +```cpp publishTelemetry(getDefaultSensor()); publishTelemetry("/light",String(light)); ``` @@ -550,7 +550,7 @@ Navigate to the previously used **Esp32-lwmqtt.ino** and add the following: - **STEP 1:** Add the following after **#include "esp32-mqtt.h"** -```c++ +```cpp #include "DHT.h" //DHT library #define DHTPIN 0 //Define Signal Pin of DHT @@ -560,13 +560,13 @@ DHT dht(DHTPIN, DHTTYPE); //Initializing DHT sensor - **STEP 2:** Add the following inside the **setup** to start the DHT sensor -```c++ +```cpp dht.begin(); ``` - **STEP 3:** Add the following inside the **if loop** within **void loop()** -```c++ +```cpp int temperature = dht.readTemperature(); //Assign variable to store temperature int humidity = dht.readHumidity(); //Assign variable to store humidity diff --git a/docs/Sensor/Wio_Terminal/Extension_Board/Wio_Terminal_LoRaWan_Chassis_with_Antenna-built-in_LoRa-E5_and_GNSS_EU868_US915.md b/docs/Sensor/Wio_Terminal/Extension_Board/Wio_Terminal_LoRaWan_Chassis_with_Antenna-built-in_LoRa-E5_and_GNSS_EU868_US915.md index 612764a60a63..91979cc72fff 100644 --- a/docs/Sensor/Wio_Terminal/Extension_Board/Wio_Terminal_LoRaWan_Chassis_with_Antenna-built-in_LoRa-E5_and_GNSS_EU868_US915.md +++ b/docs/Sensor/Wio_Terminal/Extension_Board/Wio_Terminal_LoRaWan_Chassis_with_Antenna-built-in_LoRa-E5_and_GNSS_EU868_US915.md @@ -193,7 +193,7 @@ Step 5: Add the code for decode the data:
-```CPP +```cpp function Decoder(bytes, port) { var decoded = {}; @@ -339,7 +339,7 @@ Step 5: Add the code for decode the data:
-```CPP +```cpp function Decoder(bytes, port) { var decoded = {}; diff --git a/docs/Sensor/Wio_Terminal/Hardware_Overview/Bluetooth/BLE-ibeacon-using-Wio-terminal.md b/docs/Sensor/Wio_Terminal/Hardware_Overview/Bluetooth/BLE-ibeacon-using-Wio-terminal.md index daa7cc118a51..67faf7f65e95 100644 --- a/docs/Sensor/Wio_Terminal/Hardware_Overview/Bluetooth/BLE-ibeacon-using-Wio-terminal.md +++ b/docs/Sensor/Wio_Terminal/Hardware_Overview/Bluetooth/BLE-ibeacon-using-Wio-terminal.md @@ -59,7 +59,7 @@ This is a simple test for scan the Wio terminal iBeacon device and presents the **Test code** -```CPP +```cpp #include "sys/time.h" #include "rpcBLEDevice.h" @@ -146,7 +146,7 @@ we can see, after people enter the door, they will see about A or B more detail, ## Code -```CPP +```cpp #include "sys/time.h" #include "BLEDevice.h" #include "BLEBeacon.h" diff --git a/docs/Sensor/Wio_Terminal/Tutorial/Blynk_for_Wio_Terminal/Blynk-wireless-OTA-functionality-to-Wio-Terminal.md b/docs/Sensor/Wio_Terminal/Tutorial/Blynk_for_Wio_Terminal/Blynk-wireless-OTA-functionality-to-Wio-Terminal.md index 1fda68d5b6de..5d5082d98c89 100644 --- a/docs/Sensor/Wio_Terminal/Tutorial/Blynk_for_Wio_Terminal/Blynk-wireless-OTA-functionality-to-Wio-Terminal.md +++ b/docs/Sensor/Wio_Terminal/Tutorial/Blynk_for_Wio_Terminal/Blynk-wireless-OTA-functionality-to-Wio-Terminal.md @@ -37,7 +37,7 @@ Then edit the name and select the device and connection mode, in this case "Seee Make a note of BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME. In the example, they are: -```C++ +```cpp #define BLYNK_TEMPLATE_ID "TMPLCc16MxA1" #define BLYNK_DEVICE_NAME "WioTerminal" ``` diff --git a/docs/Sensor/mmWave_radar_sensor/Radar_MR24BSD1.md b/docs/Sensor/mmWave_radar_sensor/Radar_MR24BSD1.md index 8a2a7e80cead..3456cf0e8371 100644 --- a/docs/Sensor/mmWave_radar_sensor/Radar_MR24BSD1.md +++ b/docs/Sensor/mmWave_radar_sensor/Radar_MR24BSD1.md @@ -278,7 +278,7 @@ The code in this example is as follows.
-```c++ +```cpp //Human_State_Data_Decoding_Example.ino #include @@ -347,7 +347,7 @@ The code in this example is as follows.
-```c++ +```cpp //Physical_Parameters_Example.ino #include @@ -403,7 +403,7 @@ The code in this example is as follows.
-```c++ +```cpp //Sleep_Breathing_Data_Decoding.ino #include diff --git a/docs/Sensor/mmWave_radar_sensor/Radar_MR24FDB1.md b/docs/Sensor/mmWave_radar_sensor/Radar_MR24FDB1.md index 17dcfe75c69f..e6a6d272bb14 100644 --- a/docs/Sensor/mmWave_radar_sensor/Radar_MR24FDB1.md +++ b/docs/Sensor/mmWave_radar_sensor/Radar_MR24FDB1.md @@ -207,7 +207,7 @@ The radar has a complete set of built-in algorithms that can directly output the The code in this example is as follows. -```c++ +```cpp #include FallDetectionRadar radar; @@ -262,7 +262,7 @@ The code in this example is as follows.
-```c++ +```cpp //Physical_Parameters_Example.ino #include diff --git a/docs/Sensor/mmWave_radar_sensor/Radar_MR24HPB1.md b/docs/Sensor/mmWave_radar_sensor/Radar_MR24HPB1.md index 65dc9e549f55..ecd1747c68ac 100644 --- a/docs/Sensor/mmWave_radar_sensor/Radar_MR24HPB1.md +++ b/docs/Sensor/mmWave_radar_sensor/Radar_MR24HPB1.md @@ -205,7 +205,7 @@ The code in this example is as follows.
-```c++ +```cpp //Physical_Parameters_Example.ino #include diff --git a/docs/Spanish/Sensor/Grove/Grove_Accessories/Actuator/_Grove-Infrared_Emitter_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Accessories/Actuator/_Grove-Infrared_Emitter_Spanish.md index f3ab087c3d62..64631fd13d72 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Accessories/Actuator/_Grove-Infrared_Emitter_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Accessories/Actuator/_Grove-Infrared_Emitter_Spanish.md @@ -110,7 +110,7 @@ Si no tienes la Shield Base - Grove, puedes conectar directamente el módulo Gro O puedes abrir un nuevo sketch y copiar el siguiente código en el. -```c++ +```cpp #include diff --git a/docs/Spanish/Sensor/Grove/Grove_Accessories/Display/_Grove-16x2_LCD_Series_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Accessories/Display/_Grove-16x2_LCD_Series_Spanish.md index afb68d9b613f..38f30b32cbeb 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Accessories/Display/_Grove-16x2_LCD_Series_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Accessories/Display/_Grove-16x2_LCD_Series_Spanish.md @@ -123,7 +123,7 @@ El Grove - 16 x 2 LCD comparte la misam librería con [Grove-LCD RGB Backlight]( 3. O, puedes simplemente dar click en el ícono ![](https://github.com/SeeedDocument/wiki_english/raw/master/docs/images/copy.jpg) en la esquina superior derecha del bloque de código de tu actual código en el IDE de Arduino. -```C++ +```cpp #include #include "rgb_lcd.h" diff --git a/docs/Spanish/Sensor/Grove/Grove_Accessories/Input&Output/_Grove-Rotary_Angle_Sensor_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Accessories/Input&Output/_Grove-Rotary_Angle_Sensor_Spanish.md index 16e3a476dc3e..7bcf75bbc1f7 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Accessories/Input&Output/_Grove-Rotary_Angle_Sensor_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Accessories/Input&Output/_Grove-Rotary_Angle_Sensor_Spanish.md @@ -161,7 +161,7 @@ If we don't have Grove Base Shield, We also can directly connect Grove-Rotary An - **Paso 1.** Por favor, copia el siguiente código en el IDE de Arduino y subelo al Arduino. Si no sabes como hacerlo, revisa [how to upload code](http://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp /*Macro definiciones del Sensor de Ángulo Rotatorio y pin LED*/ #define ROTARY_ANGLE_SENSOR A0 diff --git a/docs/Spanish/Sensor/Grove/Grove_Accessories/LED/_Grove-RGB_LED_Stick-10-WS2813_Mini_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Accessories/LED/_Grove-RGB_LED_Stick-10-WS2813_Mini_Spanish.md index faaffda3f9e6..3b2baad09c0a 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Accessories/LED/_Grove-RGB_LED_Stick-10-WS2813_Mini_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Accessories/LED/_Grove-RGB_LED_Stick-10-WS2813_Mini_Spanish.md @@ -135,7 +135,7 @@ Si es la primera vez que utilizas Arduino, ampliamente te recomendamos ver [Prim 3. O, puedes simplemente dar click en el ícono ![](https://github.com/SeeedDocument/wiki_english/raw/master/docs/images/copy.jpg) en la esquina superior derecha del bloque de código de tu actual código en el IDE de Arduino. -```C++ +```cpp // NeoPixel Ring simple sketch (c) 2013 Shae Erisson // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library diff --git a/docs/Spanish/Sensor/Grove/Grove_Accessories/Switch&Button/_Grove-LED_Button_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Accessories/Switch&Button/_Grove-LED_Button_Spanish.md index 233cc3837a4e..7d58c2a5c5ad 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Accessories/Switch&Button/_Grove-LED_Button_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Accessories/Switch&Button/_Grove-LED_Button_Spanish.md @@ -125,7 +125,7 @@ Si es la primera vez que utilizas Arduino, ampliamente te recomendamos ver [Prim - **Paso 1.** Abre el IDE Arduino y crea un archivo nuevo, copía el siguiente código en el archivo nuevo. -```C++ +```cpp #include "Arduino.h" //1: toggle mode, 2: follow mode diff --git a/docs/Spanish/Sensor/Grove/Grove_Sensor/Light/_Grove-Infrared_Receiver_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Sensor/Light/_Grove-Infrared_Receiver_Spanish.md index 96ddaf7457e1..0f0f03f83c37 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Sensor/Light/_Grove-Infrared_Receiver_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Sensor/Light/_Grove-Infrared_Receiver_Spanish.md @@ -97,7 +97,7 @@ Si no tienes la Shield Base - Grove, puedes conectar directamente el módulo Gro O puedes abrir un nuevo sketch y copia el siguiente código en tu IDE de Arduino. -```c++ +```cpp #include diff --git a/docs/Spanish/Sensor/Grove/Grove_Sensor/Motion/_Grove-Vibration_Sensor_SW-420_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Sensor/Motion/_Grove-Vibration_Sensor_SW-420_Spanish.md index f2465945f5b9..a52c66bf0d52 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Sensor/Motion/_Grove-Vibration_Sensor_SW-420_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Sensor/Motion/_Grove-Vibration_Sensor_SW-420_Spanish.md @@ -157,7 +157,7 @@ If this is the first time you work with Arduino, we strongly recommend you to se - **Step 2.** Copy all the code below, or you can just click the icon ![](https://github.com/SeeedDocument/wiki_english/raw/master/docs/images/copy.jpg) in upper right corner of the code block to copy the following code into the new sketch. -```C++ +```cpp // constants won't change. They're used here to set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int buzzer = 3; // the number of the buzzer pin diff --git a/docs/Spanish/Sensor/Grove/Grove_Sensor/Proximity/_Grove-Ultrasonic_Ranger_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Sensor/Proximity/_Grove-Ultrasonic_Ranger_Spanish.md index 045ea2e351c9..d0e66637eb41 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Sensor/Proximity/_Grove-Ultrasonic_Ranger_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Sensor/Proximity/_Grove-Ultrasonic_Ranger_Spanish.md @@ -383,7 +383,7 @@ pi@raspberrypi:~/GrovePi/Software/Python $ python grove_ultrasonic.py ``` -```c++ +```cpp #include "Ultrasonic.h" Ultrasonic ultrasonic1(2); diff --git a/docs/Spanish/Sensor/Grove/Grove_Sensor/Soli_Humidity/_Grove-Moisture_Sensor_Spanish.md b/docs/Spanish/Sensor/Grove/Grove_Sensor/Soli_Humidity/_Grove-Moisture_Sensor_Spanish.md index 5d9b77112909..8d440a2345fb 100644 --- a/docs/Spanish/Sensor/Grove/Grove_Sensor/Soli_Humidity/_Grove-Moisture_Sensor_Spanish.md +++ b/docs/Spanish/Sensor/Grove/Grove_Sensor/Soli_Humidity/_Grove-Moisture_Sensor_Spanish.md @@ -91,7 +91,7 @@ Si no cuantas con un Grove Shield Base, puedes conectar el Grove - Sensor de Hue - **Paso 1.** Copia el código en el IDE de Arduino y carguelo. Si no sabes como cargar un código, por favor revisa [how to upload code](http://wiki.seeedstudio.com/Upload_Code/). -```c++ +```cpp int sensorPin = A0; int sensorValue = 0; diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-For-Arduino.md b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-For-Arduino.md index d6d7e30ed563..875f2a93e7f8 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-For-Arduino.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-For-Arduino.md @@ -1147,7 +1147,7 @@ U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); If you break out other modules and only use OLED, you have to software I2C: -```CPP +```cpp // U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); @@ -1251,7 +1251,7 @@ Use Grove cable to connect the OLED to Seeeduino Lotus's **I2C** interface (Note Or you can set the bus lock to 100000 then add in the setup(). -```CPP +```cpp void setup(void) { u8x8.setBusClock(100000); // it for limit the I2C bus clock u8x8.begin(); diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-for-Arduino-education-pack.md b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-for-Arduino-education-pack.md index b62415b07e9f..ebe7beb9678b 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-for-Arduino-education-pack.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove-Beginner-Kit-for-Arduino-education-pack.md @@ -58,7 +58,7 @@ Please follow the same color line to connect each sensor on the board, put the P **Code** -```CPP +```cpp #define PIR_MOTION_SENSOR 2//Use pin 2 to receive the signal from the module int BuzzerPin = 5; // set D5 as buzzer @@ -134,7 +134,7 @@ Please connect the fan grove cable to D7, Servo grove cable to D3. ::: **Code** -```CPP +```cpp #include Servo myservo; // create servo object to control a servo @@ -227,7 +227,7 @@ This is controller botton function. **Code** -```CPP +```cpp #include #include diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove_Beginner_Kit_for_Arduino.md b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove_Beginner_Kit_for_Arduino.md index 2d35114bda26..45b6e0764b49 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove_Beginner_Kit_for_Arduino.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Grove Beginner Kit for Arduino/Grove_Beginner_Kit_for_Arduino.md @@ -250,7 +250,7 @@ Now you should see the built-in LED flashes in a one second interval. void setup() is the setup function only runs one time when you press reset or power the board. -```C +```cpp void setup() { } @@ -259,7 +259,7 @@ void setup() { initialize digital pin LED_BUILTIN as an output. -```C +```cpp pinMode(LED_BUILTIN, OUTPUT); @@ -268,7 +268,7 @@ pinMode(LED_BUILTIN, OUTPUT); void loop() is the loop function runs over and over again forever. -```C +```cpp void loop() { } @@ -277,7 +277,7 @@ void loop() { digitalWrite()is to set the LED_BUILTIN pin as voltage level HIGH, which means to turn on the LED. Similarly to turn off the LED just set the voltage level to LOW by changing the code HIGH to LOW. -```C +```cpp digitalWrite(LED_BUILTIN, HIGH); digitalWrite(LED_BUILTIN, LOW); @@ -286,7 +286,7 @@ digitalWrite(LED_BUILTIN, LOW); delay() means to pause the program, the number inside the bracket means the amount of time(in milliseconds) to pause(delay). -```C +```cpp delay(1000); @@ -394,7 +394,7 @@ Step 3: Observe result Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //assign buzzer as pin 6 #define buzzer 6 @@ -436,7 +436,7 @@ Step 3: Observe result Step 1: copy & paste the following code into Arduino IDE -```C++ +```cpp // initalise the frequency of the notes #define NOTE_A4 440 @@ -547,7 +547,7 @@ Step 2: Link Seeeduino Lotus with computer by a micro USB cable Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //assign name tiltswitchPin to pin 5 #define tiltswitchPin 5 @@ -592,7 +592,7 @@ Please tilt the tilt switch in both directions, you should see “1” or “0 Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //set title of pin 5 as tiltSwitch #define tiltSwitch 5 @@ -638,7 +638,7 @@ Please connect Grove – Buzzer module to D6 port of Seeeduino Lotus Step 1: copy & paste the following code into Arduino IDE -```C +```cpp // initalise the frequency of the notes #define NOTE_A4 440 @@ -820,7 +820,7 @@ Conclusion: Adding library method allows user easily add third party sensor driv Step 1: copy & paste the following code into Arduino IDE -```C++ +```cpp //add ChainableLED library to this project #include @@ -906,7 +906,7 @@ You should see the color of LED is changing according to the value of hue, which Step 1: copy & paste the following code into Arduino IDE -```C++ +```cpp /* Example of using the ChainableRGB library for controlling a Grove RGB. @@ -976,13 +976,13 @@ you should see the red color LED increases the brightness in every 0.5s, because If we change both red and green variables from this: -```C +```cpp leds.setColorRGB(i, power, 0, 0); ``` to this: -```C +```cpp leds.setColorRGB(i, power, 255-power, 0); ``` @@ -998,7 +998,7 @@ Connect Grove – Buzzer module to D6 port of Seeeduino Lotus. Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add ChainableLED library to this project #include @@ -1230,7 +1230,7 @@ Step 3: Link Seeeduino Lotus with computer by a micro USB cable Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add ChainableLED library to this project #include @@ -1287,7 +1287,7 @@ Note if the ambient light is to bright, you can use you hand to cover the light Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add ChainableLED library to this project #include @@ -1421,7 +1421,7 @@ Step 2: Link Seeeduino Lotus with computer by a micro USB cable Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //naming pin3 as singalPin #define signalPin 3 @@ -1461,7 +1461,7 @@ Connect Grove – Chainable RGB LED to D7 port of Seeeduino Lotus Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add ChainableLED library to this project #include @@ -1521,7 +1521,7 @@ You should see that if the line finder detects black line, the LED should turn o Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add ChainableLED library to this project #include @@ -1636,7 +1636,7 @@ Please follow the instructions in tutorial 3 on how to add libr Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //include the rgb_lcd library #include "rgb_lcd.h" @@ -1678,7 +1678,7 @@ You should see “Hello, World!” displayed in the first line and the a countin Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add LCD library #include "rgb_lcd.h" @@ -1858,7 +1858,7 @@ You will see the Seeed Studio Logo displayed in the first 8 blocks, followed by Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add LCD library @@ -2112,7 +2112,7 @@ Step 2: Link Seeeduino Lotus with computer by a micro USB cable Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add DHT sensor library #include @@ -2189,7 +2189,7 @@ Firstly Connect Grove - LCD RGB Backlight module to I2C. port of Seeeduino Lotus Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add DHT sensor library #include @@ -2318,7 +2318,7 @@ Please add the [3-axis accelerometer driver Library](https://github.com/Seeed- S Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add accelemeter library #include "MMA7660.h" @@ -2419,7 +2419,7 @@ Roll (Longitudinal axis) Φ: it has its origin at the centre of gravity and is d Step 1: copy & paste the following code into Arduino IDE -```C +```cpp #include //add accelemeter library @@ -2514,7 +2514,7 @@ Here we use the tilt switch to flip the page on LCD screen to show different set Step 1: copy & paste the following code into Arduino IDE -```C +```cpp //add accelemeter library #include "MMA7660.h" @@ -2764,7 +2764,7 @@ For more information please visit [Arduino TimeLib tutorial](http://playground.a Step 2: copy & paste the following code into Arduino IDE -```C +```cpp //add DHT sensor library #include @@ -3066,7 +3066,7 @@ Step 1: Please add the [TimeLib Library]( https://github.com/PaulStoffregen/Time Copy & paste the following code into Arduino IDE -```C +```cpp //add LCD library #include diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Grove_Speech_Recognizer_Kit_for_Arduino.md b/docs/Top_Brand/Arduino/Kit with Courses/Grove_Speech_Recognizer_Kit_for_Arduino.md index 8499a4074b18..899ed534ed90 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Grove_Speech_Recognizer_Kit_for_Arduino.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Grove_Speech_Recognizer_Kit_for_Arduino.md @@ -546,7 +546,7 @@ OK, let's embed Speech Recognizer and Grove - MP3 together. The following demo c * Plug Base Shield onto the Arduino UNO,and plug the Grove - MP3 v2 onto the D2 port of Base Shield. -```c++ +```cpp # include # include diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Intel_Edison_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md b/docs/Top_Brand/Arduino/Kit with Courses/Intel_Edison_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md index b576bae6172b..9de521b45dd0 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Intel_Edison_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Intel_Edison_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md @@ -115,14 +115,14 @@ The AWS CLI is a way to manage your AWS services from your board. You need this 1.First, you need to install pip (Python package manager): -```C++ +```cpp curl https://bootstrap.pypa.io/ez_setup.py -o - | python easy_install pip ``` 2.Next, install the AWS CLI with pip: -```C++ +```cpp pip install awscli ``` @@ -130,7 +130,7 @@ Note: In order to view the help files ("aws iot help") you need to install Groff 3.For Groff: -```C++ +```cpp wget http://ftp.gnu.org/gnu/groff/groff-1.22.3.tar.gz tar -zxvf groff-1.22.3.tar.gz cd groff-1.22.3 @@ -144,7 +144,7 @@ cd ~ 4.For Less: First rename the old version of less -```C++ +```cpp mv /usr/bin/less /usr/bin/less-OLD Then install the new version of less wget http://www.greenwoodsoftware.com/less/less-458.zip @@ -159,7 +159,7 @@ cd ~ 5.To make sure everything has installed correctly, run the iot help file: -```C++ +```cpp aws iot help ``` @@ -167,7 +167,7 @@ aws iot help At this point, you should have AWS CLI installed. And the Access ID and Key you have download before, configure AWS and enter the ID and Key with: -```C++ +```cpp aws configure ``` @@ -176,14 +176,14 @@ aws configure 1.First create a folder to store your certificates in: -```C++ +```cpp mkdir aws_certs cd aws_certs ``` 2.Generate a private key with open ssl: -```C++ +```cpp openssl genrsa -out privateKey.pem 2048 openssl req -new -key privateKey.pem -out cert.csr ``` @@ -194,13 +194,13 @@ openssl req -new -key privateKey.pem -out cert.csr 4.Run the following to activate the certificate: -```C++ +```cpp aws iot create-certificate-from-csr --certificate-signing-request file://cert.csr --set-as-active > certOutput.txt ``` 5.Run the following to save the certificate into a cert.pem file: -```C++ +```cpp aws iot describe-certificate --certificate-id <certificate ID> --output text --query certificateDescription.certificatePem > cert.pem ``` @@ -212,7 +212,7 @@ NOTE: Replace <certificate ID> with the ID stored in the "certificateId" f * Copy the following text (ctrl-c): -```C++ +```cpp { "Version": "2012-10-17", "Statement": [{ @@ -230,7 +230,7 @@ NOTE: Replace <certificate ID> with the ID stored in the "certificateId" f 7.First enter: -```C++ +```cpp aws iot create-policy --policy-name PubSubToAnyTopic --policy-document file://policy.doc ``` @@ -244,7 +244,7 @@ Notice:The policy name can be anything. 9.Then attach the policy to the certificate with: -```C++ +```cpp aws iot attach-principal-policy --principal <principal arn> --policy-name "PubSubToAnyTopic" ``` @@ -261,7 +261,7 @@ NOTE: replace <principal arn> with the value stored in "certifcateArn" in * Now that the certificates are in order we can use MQTT to subscribe and publish to the cloud. * First get the root CA pem file: -```C++ +```cpp curl https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem > rootCA.pem ``` @@ -271,7 +271,7 @@ curl https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-C 1.Create a nodejs project -```C++ +```cpp cd ~ mkdir aws_nodejs && cd aws_nodejs npm init @@ -283,11 +283,11 @@ touch main.js 2.Copy and save demo code to main.js -```C +```cpp vi main.js ``` -```C++ +```cpp // Plug Grove - Relay to base shield port D2 // Plug Grove - Temperature&Huminity(High quality) to i2c port @@ -410,7 +410,7 @@ function sendData(){ ![](https://files.seeedstudio.com/wiki/Intel_Edison_and_Grove_IoT_Starter_Kit_Powered_by_AWS/img/AWS_Edison_starter_kit_coding5.png) -```C++ +```cpp node main.js ``` diff --git a/docs/Top_Brand/Arduino/Kit with Courses/LinkIT_One_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md b/docs/Top_Brand/Arduino/Kit with Courses/LinkIT_One_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md index 08c4d9f60c92..f3df1df7a26a 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/LinkIT_One_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/LinkIT_One_and_Grove_IoT_Starter_Kit_Powered_by_AWS.md @@ -247,7 +247,7 @@ You can check the status of Touch Sensor now. Try press the Touch Sensor, and up **4.** And replace the code with below code(replace all existing code): -```C++ +```cpp { "desired": { "ledBarStatus": 5 diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Rainbow_Cube_kit_RGB_4_4_4_Rainbowduino_Compatible.md b/docs/Top_Brand/Arduino/Kit with Courses/Rainbow_Cube_kit_RGB_4_4_4_Rainbowduino_Compatible.md index e1f9e483d752..b82670fd07af 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Rainbow_Cube_kit_RGB_4_4_4_Rainbowduino_Compatible.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Rainbow_Cube_kit_RGB_4_4_4_Rainbowduino_Compatible.md @@ -237,7 +237,7 @@ Let us get started with a simple example: * Compile and upload the sketch -```C++ +```cpp /* Rainbowduino v3.0 Library examples: Cube1 @@ -286,7 +286,7 @@ First we need to initialize the driver using _init()_ Usage: -```C++ +```cpp Rb.init();//initialize Rainbowduino driver. This should be placed inside setup() ``` @@ -298,7 +298,7 @@ To set a LED (Z,X,Y) we use _setPixelZXY(Z,X,Y,R,G,B)_. Usage: -```C++ +```cpp Rb.setPixelZXY(unsigned char x, unsigned char y, unsigned char colorR, unsigned char colorG, unsigned char colorB); //This sets the pixel (z,x,y) by specifying each channel(color) with a 8bit number. ``` @@ -308,7 +308,7 @@ Alternatively a LED (Z,X,Y) can be set by using _setPixelZXY(Z,X,Y,24bRGB)_. Usage: -```C++ +```cpp Rb.setPixelZXY(unsigned char z, unsigned char x, unsigned char y, uint32_t colorRGB /*24-bit RGB Color*/) //This sets the LED (z,x,y) by specifying a 24bit RGB color code ``` @@ -318,7 +318,7 @@ At times, it useful to blank all the LEDs. For this there is an **API blankDispl Usage: -```C++ +```cpp Rb.blankDisplay(); //Clear the LEDs (make all LEDs blank) ``` @@ -327,7 +327,7 @@ Rb.blankDisplay(); * To understand the (Z,X,Y) pixel addressing let us see the another example. In this demo, the Layer 0 (i.e Z-0) is painted Green and Layer 3 is painted Blue. -```C++ +```cpp /* Rainbowduino v3.0 Library examples: Cube2 @@ -372,7 +372,7 @@ Output * In this demo, all LEDs are painted with some random color. After five seconds of delay, the whole cube is repainted with random colors. -```C++ +```cpp /* Rainbowduino v3.0 Library examples: Cube3 diff --git a/docs/Top_Brand/Arduino/Kit with Courses/Sidekick_Basic_Kit_for_Arduino_V2.md b/docs/Top_Brand/Arduino/Kit with Courses/Sidekick_Basic_Kit_for_Arduino_V2.md index 2b24c42955bd..dccd873710aa 100644 --- a/docs/Top_Brand/Arduino/Kit with Courses/Sidekick_Basic_Kit_for_Arduino_V2.md +++ b/docs/Top_Brand/Arduino/Kit with Courses/Sidekick_Basic_Kit_for_Arduino_V2.md @@ -211,7 +211,7 @@ Servos are DC motors with gearing and feedback system.They are used in driving m - Compile and upload the following sketch: -```c++ +```cpp //Blink a LED connected to Digital Pin 8 via a 330 Ohm resitors. void setup() { @@ -239,7 +239,7 @@ void loop() - Compile and upload the following sketch: -```c++ +```cpp //Running LED display: Three LEDs connected to Digital Pin 9, 10 and 11. void setup() @@ -285,7 +285,7 @@ void loop() - Compile and upload the following sketch: -```c++ +```cpp //Pushbutton switch demo: LED is connected to digital pin 8 and Pushbutton is connected to digital pin 12. //The LED glows when the button is pressed. @@ -316,7 +316,7 @@ void loop() - The above does demonstrate how to send a signal to the Arduino. In fact, you can achieve the same goal without the Arduino. Just press the button to close the circuit, then, let's flip the HIGH/LOW values as follows: -```c++ +```cpp void loop() { inputButtonState = digitalRead(12); //Read the Pushbutton state. @@ -355,7 +355,7 @@ void loop() - Connect LED annode to digital pin 5 (instead of 5V). - Compile and Upload the following sketch: -```c++ +```cpp //Varying the brightness of the LED using a Pot int value=0; int mval; @@ -387,7 +387,7 @@ void loop() - Compile and upload the following sketch: -```c++ +```cpp void setup() { } @@ -426,7 +426,7 @@ void loop() { - Compile and upload the following sketch: -```c++ +```cpp #define NOTE_D0 98 #define NOTE_D1 294 #define NOTE_D2 330 diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/A_Handy_Serial_Library.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/A_Handy_Serial_Library.md index cd376e25e79f..ed8bbae45391 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/A_Handy_Serial_Library.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/A_Handy_Serial_Library.md @@ -16,7 +16,7 @@ Arduino hadn’t debugging function, maybe this is the first impression of some As for some simple application, we can use serial print to debug, and Arduino had provided a very easy to use serial print function. -```c++ +```cpp void setup() { Serial.begin(115200); @@ -31,7 +31,7 @@ void loop() ``` Besides, there is Serial.print, Serial.write and so on. When you are familiar with these functions, you will find that these function is not so friendly actually, just have a look at the following code: -```c++ +```cpp void setup() { Serial.begin(115200); @@ -51,14 +51,14 @@ void loop() To print a[3]=5, it can take 4 lines of code, troublesom? Remember the C language lessons, it takes only one line of code: -```c++ +```cpp printf("a[%d] = %d", 3, 5); ``` As for C++, one line is enough also: -```c++ +```cpp cout << "a[" << 3 << "] = " << 5 << endl; ``` diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/How_to_use_and_write_a_library.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/How_to_use_and_write_a_library.md index 8edd454d12d7..7dbfcdaf2f7b 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/How_to_use_and_write_a_library.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Basic_Usage/How_to_use_and_write_a_library.md @@ -19,7 +19,7 @@ It’ very easy to use a Library, here we introduce how to write a Library. Then let’s go, we write a simple calculate Library here. Include the following function: -```c++ +```cpp int sum(int a, int b); int minus(int a, int b); ``` @@ -28,7 +28,7 @@ Yes, It’s very simple, it’s obvious that the first function return the sum o Firstly, we built a folder named Calc, it’s also the name of the Library. Then we built a Calc.h file, and fill it: -```c++ +```cpp #ifndef __CALC_H__ #define __CALC_H__ @@ -56,7 +56,7 @@ int minus(int a, int b) To help users to understand the use of the Library, we built an examples folder. And there’s a demo named cale_test, code folowing: -```c++ +```cpp // demo of calc library #include <Calc.h> @@ -82,7 +82,7 @@ void loop() When using the Arduino IDE, you will see some library functions will be displayed in red, while others do not. Obviously, let the function name and the header file names as well as some macro definitions displayed in red makes the code look more beautiful, and easy to check for errors. To help us create this library can be displayed on the IDE into the red; you need to add a keyboards.txt file in Calc folder, keyboards.txt as follows: -```c++ +```cpp ####################################### # Syntax Coloring Map For Calc ####################################### diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Eight-Thermostat.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Eight-Thermostat.md index b96e185fb03d..35fcc0ae43f1 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Eight-Thermostat.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Eight-Thermostat.md @@ -35,7 +35,7 @@ The final project in our series may seem complex, but is quite simple. We use th _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Eight - Thermostat // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Five-Relay_Control.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Five-Relay_Control.md index 1c11078fabe6..e88e430ae413 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Five-Relay_Control.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Five-Relay_Control.md @@ -34,7 +34,7 @@ The Arduino's D6 pin sends a signal to the Relay on the D1 connector. The Relay _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Five - Relay Control // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Four-Noise_Maker.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Four-Noise_Maker.md index 93fa5fdb3f23..36debdf95b86 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Four-Noise_Maker.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Four-Noise_Maker.md @@ -28,7 +28,7 @@ Connect the Buzzer to the D6/D7 Digital I/O Jack. The sketch uses Arduino Pin D _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Four - Noise maker // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Seven-Temperature.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Seven-Temperature.md index 73e52e12a144..89dd3df76fa6 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Seven-Temperature.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Seven-Temperature.md @@ -27,7 +27,7 @@ The Grove unit produces an analog voltage on its D1 output, which is connected t _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Seven - temperature // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Six-LCD_Demonstration.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Six-LCD_Demonstration.md index e93604e9e04c..92b47368d360 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Six-LCD_Demonstration.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Six-LCD_Demonstration.md @@ -29,7 +29,7 @@ Now it is time to demonstrate the LCD module and matching Grove units. With the _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Six - LCD demonstration // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Three-Analog_Input_v1b.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Three-Analog_Input_v1b.md index 545d02883d92..45d965c5817d 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Three-Analog_Input_v1b.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Three-Analog_Input_v1b.md @@ -31,7 +31,7 @@ The Potentiometer module produces an analog voltage on its SIG output, which is _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Three - Analog Input // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input.md index cbd78721e6b0..df70145f67db 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input.md @@ -36,7 +36,7 @@ The purpose of this project is to demonstrate two forms of digital input – usi _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Two - Digital Inputs // diff --git a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input_v1.0b.md b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input_v1.0b.md index 66596148dba9..2eca748246a3 100644 --- a/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input_v1.0b.md +++ b/docs/Top_Brand/Arduino/Tutorials/Arduino_Boards_Projects/Project_Two-Digital_Input_v1.0b.md @@ -38,7 +38,7 @@ The purpose of this project is to demonstrate two forms of digital input – usi _**Now upload the following Arduino sketch:**_ -```c++ +```cpp // Project Two - Digital Inputs // diff --git a/docs/Top_Brand/Arduino/shield/2.7inch-Triple-Color-E-Ink-Shield-for-Arduino.md b/docs/Top_Brand/Arduino/shield/2.7inch-Triple-Color-E-Ink-Shield-for-Arduino.md index c606b1c339d6..51e89e40876a 100644 --- a/docs/Top_Brand/Arduino/shield/2.7inch-Triple-Color-E-Ink-Shield-for-Arduino.md +++ b/docs/Top_Brand/Arduino/shield/2.7inch-Triple-Color-E-Ink-Shield-for-Arduino.md @@ -114,7 +114,7 @@ It will be a lot fun to display your own image, now, let's show you how to DIY y Before the start, please check the **E_ink154_factoryCode.ino** again. You can find the two array easily. -```c++ +```cpp const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, @@ -129,7 +129,7 @@ const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, and -```c++ +```cpp const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, diff --git a/docs/Top_Brand/Arduino/shield/Energy_Monitor_Shield_V0.9b.md b/docs/Top_Brand/Arduino/shield/Energy_Monitor_Shield_V0.9b.md index 17c2b04dd1ec..07466408b7ea 100644 --- a/docs/Top_Brand/Arduino/shield/Energy_Monitor_Shield_V0.9b.md +++ b/docs/Top_Brand/Arduino/shield/Energy_Monitor_Shield_V0.9b.md @@ -146,7 +146,7 @@ LCD5110 myGLCD(5,6,3); ## Simple demonstration -```C++ +```cpp #include <SPI.h> #include <LCD5110_Graph_SPI.h> @@ -227,7 +227,7 @@ void loop(void) ## Simple demonstration with wireless technology -```C++ +```cpp /* This example code is in the public domain. */ diff --git a/docs/Top_Brand/Arduino/shield/GPRS_Shield_V2.0.md b/docs/Top_Brand/Arduino/shield/GPRS_Shield_V2.0.md index 1ffe65270cc6..b4993be7d9d8 100644 --- a/docs/Top_Brand/Arduino/shield/GPRS_Shield_V2.0.md +++ b/docs/Top_Brand/Arduino/shield/GPRS_Shield_V2.0.md @@ -226,7 +226,7 @@ To do experiment with AT commands, you would require a way to power up and commu For developing such a program, we need to use the SoftwareSerial library. Here is the demo code. -```c++ +```cpp //Serial Relay - Arduino will patch a //serial link between the computer and the GPRS Shield //at 19200 bps 8-N-1 @@ -368,7 +368,7 @@ The Arduino code to send a simple text message or dial a voice call is shown bel ###### Arduino Code -```c++ +```cpp #include diff --git a/docs/Top_Brand/Arduino/shield/GPRS_Shield_V3.0.md b/docs/Top_Brand/Arduino/shield/GPRS_Shield_V3.0.md index 7796b4f4c740..16b1615cbfef 100644 --- a/docs/Top_Brand/Arduino/shield/GPRS_Shield_V3.0.md +++ b/docs/Top_Brand/Arduino/shield/GPRS_Shield_V3.0.md @@ -62,7 +62,7 @@ Please link to the documentation of [GPRS Shield V2.0](https://wiki.seeedstudio. A1: Here is the code. -```c++ +```cpp #include unsigned char buffer[64]; // buffer array for data recieve over serial port diff --git a/docs/Top_Brand/Arduino/shield/GPRS_Shield_v1.0.md b/docs/Top_Brand/Arduino/shield/GPRS_Shield_v1.0.md index 2427e7dbdc0f..bb1eb95ddbb2 100644 --- a/docs/Top_Brand/Arduino/shield/GPRS_Shield_v1.0.md +++ b/docs/Top_Brand/Arduino/shield/GPRS_Shield_v1.0.md @@ -389,7 +389,7 @@ The below demo code is for the Xduino to send SMS message, dial a voice call, su 8. If the program returns error in the terminal after you typing the command, don't worry, just try input the command again. -```c++ +```cpp /*Note: this code is a demo for how to using gprs shield to send sms message, dial a voice call and send a http request to the website, upload data to pachube.com by TCP connection, diff --git a/docs/Top_Brand/Arduino/shield/Motor_Shield_V2.0.md b/docs/Top_Brand/Arduino/shield/Motor_Shield_V2.0.md index f2525cddda0d..d396497fd833 100644 --- a/docs/Top_Brand/Arduino/shield/Motor_Shield_V2.0.md +++ b/docs/Top_Brand/Arduino/shield/Motor_Shield_V2.0.md @@ -378,7 +378,7 @@ Here we will show you how this Motor Shield works via a simple demo. First of a Copy below code to Arduino IDE and upload it to Seeeduino V4, then you will find your stepper move. -```CPP +```cpp /* * Stepper test for Seeed Motor Shield V2 * loovee @ 15 Mar, 2016 @@ -493,7 +493,7 @@ A2: There is a pin conflict between Motor shield and SD card shield in digital p - Step 1.Stack the SD card shield to the Arduino. - Step 2.Modify the library of Motordriver.h as follows. -```CPP +```cpp /******Pins definitions*************/ #define MOTORSHIELD_IN1 8 #define MOTORSHIELD_IN2 7 diff --git a/docs/Top_Brand/Arduino/shield/NFC_Shield_V1.0.md b/docs/Top_Brand/Arduino/shield/NFC_Shield_V1.0.md index 55bd1ec42c34..22fe036665e1 100644 --- a/docs/Top_Brand/Arduino/shield/NFC_Shield_V1.0.md +++ b/docs/Top_Brand/Arduino/shield/NFC_Shield_V1.0.md @@ -106,7 +106,7 @@ Donwload the [PN532_SPI Library For NFC Shield](https://files.seeedstudio.com/wi 1.Open and upload the example readAllMemoryBlocks example as show below. -```c++ +```cpp //This example reads all MIFARE memory block from 0x00 to 0x63. //It is tested with a new MIFARE 1K cards. Uses default keys for authenication. //Contributed by Seeed Technology Inc (www.seeedstudio.com) diff --git a/docs/Top_Brand/Arduino/shield/NFC_Shield_V2.0.md b/docs/Top_Brand/Arduino/shield/NFC_Shield_V2.0.md index 71dea6613eb4..6fb23ae94547 100644 --- a/docs/Top_Brand/Arduino/shield/NFC_Shield_V2.0.md +++ b/docs/Top_Brand/Arduino/shield/NFC_Shield_V2.0.md @@ -207,7 +207,7 @@ This example will show you how to use an NFC tag as a key to unlock a door or a 4. In the Arduino IDE create a new sketch and copy, paste, and upload the code below to your Arduino board replacing the myUID string constant with your tag’s UID obtained from Example \#1. #### Code -```CPP +```cpp #if 1 // use SPI #include #include diff --git a/docs/Top_Brand/Arduino/shield/RS232_Shield.md b/docs/Top_Brand/Arduino/shield/RS232_Shield.md index 577a440aa6ea..aaac058f418c 100644 --- a/docs/Top_Brand/Arduino/shield/RS232_Shield.md +++ b/docs/Top_Brand/Arduino/shield/RS232_Shield.md @@ -47,7 +47,7 @@ First,we can test it by computer. - 1) Open Arduino IDE, and paste the code below. -```CPP +```cpp   #include   diff --git a/docs/Top_Brand/Arduino/shield/Relay_Shield_V2.md b/docs/Top_Brand/Arduino/shield/Relay_Shield_V2.md index 385c38143363..5087a6e73ec6 100644 --- a/docs/Top_Brand/Arduino/shield/Relay_Shield_V2.md +++ b/docs/Top_Brand/Arduino/shield/Relay_Shield_V2.md @@ -133,7 +133,7 @@ Arduino board with Relay Shield, and a motor connected to the Relay Shield 4.Start the Arduino IDE and upload the following code to the Arduino board: -```c++ +```cpp int MotorControl = 5; // Digital Arduino Pin used to control the motor // the setup routine runs once when you press reset: diff --git a/docs/Top_Brand/Arduino/shield/Relay_Shield_v3.md b/docs/Top_Brand/Arduino/shield/Relay_Shield_v3.md index d86115d02292..30078d349bb8 100644 --- a/docs/Top_Brand/Arduino/shield/Relay_Shield_v3.md +++ b/docs/Top_Brand/Arduino/shield/Relay_Shield_v3.md @@ -191,7 +191,7 @@ The external power supply in the figure above can be a battery or power supply. 4.Start the Arduino IDE and upload the following code to the Arduino board: -```CPP +```cpp int MotorControl = 5; // Digital Arduino Pin used to control the motor // the setup routine runs once when you press reset: @@ -227,7 +227,7 @@ Because the Relay Shield uses digital pins on the Arduino to control each the re 3.Now you can control relays 1, 2, 3, and 4 in Relay Shield #2 using the Arduino’s 8, 9, 10, and 11 digital I/O pins. See sample code below for controlling RELAY1 in Relay Shield #2: -```CPP +```cpp int relay1inShield2 = 8; // Digital Arduino Pin 8 is used to control relay 1 in Relay Shield #2 // the setup routine runs once when you press reset: diff --git a/docs/Top_Brand/Arduino/shield/Starter_Shield_EN.md b/docs/Top_Brand/Arduino/shield/Starter_Shield_EN.md index f5c487523f62..94958fc86660 100644 --- a/docs/Top_Brand/Arduino/shield/Starter_Shield_EN.md +++ b/docs/Top_Brand/Arduino/shield/Starter_Shield_EN.md @@ -326,7 +326,7 @@ This function is used to read data from a specified address of EEPROM. Example: -```C++ +```cpp temp_data[i] = EEPROM.read(i); ``` @@ -338,7 +338,7 @@ temp_data[i] = EEPROM.read(i); Example: -```C++ +```cpp if(temp_data[i] != mark[i]) { EEPROM.write(0,mark[0]); @@ -362,7 +362,7 @@ if(temp_data[i] != mark[i]) Example: -```C++ +```cpp if(flag_clockpoint) { tm1636.point(POINT_ON); @@ -377,7 +377,7 @@ Create a character flow with the content of DispData[]. Example: -```C++ +```cpp tm1636.display(disp); ``` @@ -398,7 +398,7 @@ This function sweep 4 LEDs in the direction you choose. Example: -```C++ +```cpp /*Run the 4 LEDs from left to right*/ ticktockshield.runLED(1,LEFT_TO_RIGHT); ``` @@ -417,7 +417,7 @@ The Function is used to turn on or off an individual LED. Example: -```C++ +```cpp void TickTockShield::turnOffLED() { setLed(LOW,LED_CLOCK_ADJUST); @@ -431,7 +431,7 @@ void TickTockShield::turnOffLED() Let the buzzer buzz. Example: -```C++ +```cpp /*It will sound alarm for a minute untill the "MENU" key is pressed*/ if(ticktockshield.isAlarmEnable()) { @@ -451,7 +451,7 @@ Set the alarm time. Example: -```C++ +```cpp ticktockshield.setAlarm(12,0);//Yes,the alarm clock is initialized to 12:00 and the data in the EEPROM. ``` @@ -459,7 +459,7 @@ ticktockshield.setAlarm(12,0);//Yes,the alarm clock is initialized to 12:00 and Read the preset alarm value from EEPROM and store them into given variables, including the enable flag of the alarm. Example: -```C++ +```cpp if(isFirstLoad())//if it is the first time to load the firmware? { ticktockshield.setAlarm(12,0); @@ -471,7 +471,7 @@ if(isFirstLoad())//if it is the first time to load the firmware? Get the reading from temperature sensor. Example: -```C++ +```cpp /*Read the ambient temperature and display on the digital tube.*/ ticktockshield.displayTemperature(ticktockshield.getTemperature()); ``` @@ -480,14 +480,14 @@ Example: Display temperature value(negative value supported) on the 7 segment display. The character C represents celsius degrees. Example: -```C++ +```cpp ticktockshield.displayTemperature(ticktockshield.getTemperature()); ``` **12. ticktockshield.scanKey();** Find out which key gets pressed. Return the pin number of the key pressed. And return "-1" if no keys is pressed. -```C++ +```cpp if((flag_scan_again)&&(KEY_MENU == ticktockshield.scanKey())) { ticktockshield.writeToAdjustArea(); @@ -519,7 +519,7 @@ Display time on 7 segment Display. Example: -```C++ +```cpp if(ticktockshield.isAlarmEnable()) { tm1636.point(POINT_ON); diff --git a/docs/Top_Brand/Arduino/shield/TFT_Touch_Shield_V1.0.md b/docs/Top_Brand/Arduino/shield/TFT_Touch_Shield_V1.0.md index cb4aa84ded3b..0606f989d845 100644 --- a/docs/Top_Brand/Arduino/shield/TFT_Touch_Shield_V1.0.md +++ b/docs/Top_Brand/Arduino/shield/TFT_Touch_Shield_V1.0.md @@ -219,7 +219,7 @@ p.y = map(p.y, TS_MINY, TS_MAXY, 320, 0); #### Touch Screen Demo Sketch #### -```c++ +```cpp // Paint application - Demonstate both TFT and Touch Screen // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/docs/Top_Brand/Arduino/shield/Wifi_Shield_Fi250_V1.1.md b/docs/Top_Brand/Arduino/shield/Wifi_Shield_Fi250_V1.1.md index ad753d7cde86..1a71be732a00 100644 --- a/docs/Top_Brand/Arduino/shield/Wifi_Shield_Fi250_V1.1.md +++ b/docs/Top_Brand/Arduino/shield/Wifi_Shield_Fi250_V1.1.md @@ -88,7 +88,7 @@ The demo we use a Arduino Leonardo, we suggest you use a hardware serial port, s Install Wifi Shield (Fi250) library, download demo code Wizfi250_Client. -```c++ +```cpp /* //This demo use Arduino Leonardo or Seeeduino Lite. The jumper connect D0-WIFI_TX, D1_WIFI_RX; Let the boot pin not connect */ @@ -158,7 +158,7 @@ void loop() { Install Wifi Shield (Fi250) library, download demo code Wizfi250_http. -```c++ +```cpp /* //This demo use Arduino Leonardo or Seeeduino Lite. The jumper connect D0-WIFI_TX, D1_WIFI_RX; Let the boot pin not connect */ diff --git a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.0.md b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.0.md index e30a03cd09bf..68bb1f3aa1f7 100644 --- a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.0.md +++ b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.0.md @@ -146,7 +146,7 @@ First you have to make sure that Arduino1.0 has already been installed on your c Download the wifishield library here [Wifi Shield Library](https://github.com/Seeed-Studio/WiFi_Shield) and unzip it into the libraries file of Arduino via this path: ..\arduino-1.0\libraries Open a new sketch in Arduino-1.0, then copy the following code to your sketch. -```c++ +```cpp #include "Wifly.h" #include WiflyClass Wifly(2,3); diff --git a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.1.md b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.1.md index 2db22d9c3e13..d92ddf25a0fc 100644 --- a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.1.md +++ b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.1.md @@ -67,7 +67,7 @@ This Wifi Shield utilizes a RN171 wifi module to provide your Arduino/Seeeduino Download the [Wifi Shield Library](https://github.com/Seeed-Studio/WiFi_Shield) on github, unzip it into the libraries folder of Arduino. -```c++ +```cpp #include #include diff --git a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.2.md b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.2.md index 4021df651c42..6ffcdc06dde5 100644 --- a/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.2.md +++ b/docs/Top_Brand/Arduino/shield/Wifi_Shield_V1.2.md @@ -141,7 +141,7 @@ These are the most important/useful function in the library, we invite you to lo * **boolean:** true if the connection to the access point was successful, false otherwise. * **Example:** -```C++ +```cpp #include #include "WiFly.h" @@ -203,7 +203,7 @@ void loop() * **boolean:** true if the WiFi shield responded with the ack string, false otherwise. * **Example:** -```C++ +```cpp // our join() function is wrapper for the join command, as seen below. //The string "Associated" is what the user manual says the RN171 will return on success. if(sendCommand("join\r", "Associated",DEFAULT_WAIT_RESPONSE_TIME*10)) @@ -238,7 +238,7 @@ In the sketch below we have created a UART object to allow us to send and receiv Upload the following code to your Arduino board: -```C++ +```cpp #include #include @@ -363,7 +363,7 @@ Now that you know how to connect to an access point by typing each command it's To see code required to connect to an access point go to “File -> Examples -> Wifi_Shield -> wifi_test”. Change the code to use your own SSID (access point name), and KEY (your access point's password), then upload the sketch to your Arduino IDE. -```C++ +```cpp #define SSID " SEEED-MKT " #define KEY " seeed-mkt " ``` @@ -419,7 +419,7 @@ This example will show you how a device such as your PC and/or phone may talk to 7.Your Arduino's serial monitor window will display an HTTP response similar to the one below. This is the information that your browser sent to the shield to request data. -```C++ +```cpp *OPEN*GET / HTTP/1.1 Host: 192.168.0.10 Connection: keep-alive @@ -439,7 +439,7 @@ As you saw in Example 3, an internet/web browser is able to connect to the WiFi Upload the following code to your Arduino board replacing "myssid" and "mypassword" with your accesspoint's values respectively: -```C++ +```cpp #include #include "WiFly.h" @@ -571,7 +571,7 @@ Connect three LEDs and resistor to digital pins 11, 12, and 13 as shown in the s Upload the following code to your Arduino board but replace "mySSID" and "myPassword" with your access point's SSID name and password: -```C++ +```cpp #include #include "WiFly.h" @@ -797,7 +797,7 @@ The RN-171 module in the WiFi shield has the ability to act as an HTML client (a The name of the API we'll use is [OpenWeatherMap](http://openweathermap.org/api), when you send the name of a city and country to this website it returns a JSON string with weather information. If you want to display the weather for London UK for example you would visit the following URL [http://api.openweathermap.org/data/2.5/weather?q=London,uk](http://api.openweathermap.org/data/2.5/weather?q=London,uk) which would return a JSON string like the following, where the weather data and other information is embedded. -```C++ +```cpp { "coord":{"lon":-0.13,"lat":51.51}, "sys":{"type":3,"id":60992,"message":0.0079,"country":"GB","sunrise":1421395087,"sunset":1421425352}, @@ -826,7 +826,7 @@ Section 13 of the [WiFly manual](https://files.seeedstudio.com/wiki/Wifi_shield_ The commands we need to send to the WiFi shield to receive the JSON string from the OpenWeatherMap server are the following: -```C++ +```cpp #include #include "WiFly.h" @@ -918,7 +918,7 @@ In this example we'll show you how to send information from the WiFi shield to a Upload the code below to your Arduino board replacing "mySSID", "myPassword", and authentication code with your own access point's information: -```C++ +```cpp #include #include "WiFly.h" @@ -1155,7 +1155,7 @@ To use the shield in Adhoc mode, as an access point, simply connect pin IO9 from To obtain the shield's SSID upload the code in Example 1 to your Arduino and open the serial monitor, the shield will respond with it's SSID as in the example below, where in this case **WiFly-EZX-1b** is the SSID. -```C++ +```cpp AP mode as WiFly-EZX-1b on chan 1 ``` diff --git a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/eight-Channel_12-Bit_ADC_for_Raspberry_Pi-STM32F030.md b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/eight-Channel_12-Bit_ADC_for_Raspberry_Pi-STM32F030.md index 923b0a2796c7..ea15c68ae200 100644 --- a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/eight-Channel_12-Bit_ADC_for_Raspberry_Pi-STM32F030.md +++ b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/eight-Channel_12-Bit_ADC_for_Raspberry_Pi-STM32F030.md @@ -283,7 +283,7 @@ Hardware connection diagram Tap the following command ++python grove_sound_sensor.py 0++ in the command line interface. -```C++ +```cpp pi@raspberrypi:~/grove.py/grove $ python3 grove_sound_sensor.py 0 Detecting sound... diff --git a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/four-Channel_16-Bit_ADC_for_Raspberry_Pi-ADS1115.md b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/four-Channel_16-Bit_ADC_for_Raspberry_Pi-ADS1115.md index 77c4bec2d3d6..338b75cfad5b 100644 --- a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/four-Channel_16-Bit_ADC_for_Raspberry_Pi-ADS1115.md +++ b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/four-Channel_16-Bit_ADC_for_Raspberry_Pi-ADS1115.md @@ -102,7 +102,7 @@ As I2C is not turned on by default, we need to configure I2C by hand. - **Step 1**. Power up the Raspberry Pi. - **Step 2**. Open raspi-config by typing following command in terminal. -```C++ +```cpp sudo raspi-config diff --git a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/two-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi.md b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/two-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi.md index 9ca1c658f923..536e9c248307 100644 --- a/docs/Top_Brand/Raspberry_Pi/Pi_HAT/two-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi.md +++ b/docs/Top_Brand/Raspberry_Pi/Pi_HAT/two-Channel-CAN-BUS-FD-Shield-for-Raspberry-Pi.md @@ -158,7 +158,7 @@ sudo reboot - **Step 5**. Check the kernel log to see if CAN-BUS HAT was initialized successfully. You will also see **can0** and **can1** appear in the list of ifconfig results -```C +```cpp pi@raspberrypi:~ $ dmesg | grep spi [ 6.178008] mcp25xxfd spi0.0 can0: MCP2517FD rev0.0 (-RX_INT +MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized. [ 6.218466] mcp25xxfd spi0.1 (unnamed net_device) (uninitialized): Failed to detect MCP25xxFD (osc=0x00000000). @@ -242,7 +242,7 @@ For 2 channel pi hat, there are two ways to send & receive, you can use both **c Arduino Code for CAN BUS Shield: -```C +```cpp // demo: CAN-BUS Shield, send data // loovee@seeed.cc @@ -294,7 +294,7 @@ void loop() Respberry pi setting and and you can use **can-util** to receive -```C +```cpp #set 500k baudrate pi@raspberrypi:~ $ sudo ip link set can0 up type can bitrate 500000 pi@raspberrypi:~ $ ip -details link show can0 diff --git a/docs/template_file/_cn_template.md b/docs/template_file/_cn_template.md index 6fc79468733a..a09262cfdb01 100644 --- a/docs/template_file/_cn_template.md +++ b/docs/template_file/_cn_template.md @@ -220,7 +220,7 @@ Now that we have our library installed and we understand the basic functions, le -```c++ +```cpp //文件名 代码段 @@ -269,7 +269,7 @@ Opening your serial monitor to a baud rate of 9600 should show the distance betw -```c++ +```cpp //文件名 代码段 @@ -419,7 +419,7 @@ Now that we have our library installed and we understand the basic functions, le -```c++ +```cpp //文件名 代码段 @@ -465,7 +465,7 @@ Now that we have our library installed and we understand the basic functions, le -```c++ +```cpp //文件名 代码段 diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-16-Channel_PWM_Driver-PCA9685.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-16-Channel_PWM_Driver-PCA9685.md index 3ca87166e079..223a1ff4c8cb 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-16-Channel_PWM_Driver-PCA9685.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-16-Channel_PWM_Driver-PCA9685.md @@ -168,7 +168,7 @@ ___ ![](https://files.seeedstudio.com/wiki/Grove-16-Channel_PWM_Driver-PCA9685/img/ard2.jpg) 3. 或者,您也可以直接点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 图标,将以下代码复制到Arduino IDE中的新草图中。 -```C++ +```cpp #include "PCA9685.h" #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_SPDT_Relay.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_SPDT_Relay.md index e322eb26b2d9..a4d561151de1 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_SPDT_Relay.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_SPDT_Relay.md @@ -127,7 +127,7 @@ Grove - 2通道单刀双掷(SPDT)继电器具有两个单刀双掷开关。 - **步骤 1.** 打开Arduino IDE并创建一个新文件,然后将以下代码复制到新文件中。 -```c++ +```cpp #include uint8_t channel1 = 7; uint8_t channel2 = 8; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_Solid_State_Relay.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_Solid_State_Relay.md index 9e59addaa39f..218d98633305 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_Solid_State_Relay.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-2-Channel_Solid_State_Relay.md @@ -156,7 +156,7 @@ Grove - 2-通道固态继电器 - **步骤 1.** 打开Arduino IDE并创建一个新文件,您可以点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg)图标,将以下代码复制到Arduino IDE中的一个新草图中。 -```c++ +```cpp #include uint8_t channel1 = 2; uint8_t channel2 = 3; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_SPDT_Relay.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_SPDT_Relay.md index dbcbd1313634..d2ac1e0be23c 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_SPDT_Relay.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_SPDT_Relay.md @@ -147,7 +147,7 @@ last_update: 或者,您只需点击代码块右上角的图标 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) ,即可将以下代码复制到Arduino IDE中的新草图中。 -```c++ +```cpp #include Multi_Channel_Relay relay; @@ -318,7 +318,7 @@ Channel 2 on 如果您想要更改地址,您需要在使用之前设置地址。例如,我们想要将其更改为0x2f。我们可以使用以下代码。 -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_Solid_State_Relay.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_Solid_State_Relay.md index a58849877ec4..3e0bb724dfbf 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_Solid_State_Relay.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-4-Channel_Solid_State_Relay.md @@ -181,7 +181,7 @@ last_update: 或者,您也可以直接点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 图标,将以下代码复制到Arduino IDE中的新草图中。 -```c++ +```cpp #include Multi_Channel_Relay relay; @@ -275,7 +275,7 @@ void loop() 如果一切正常,您将看到结果。同时,您会看到板载LED灯交替亮起和熄灭。 ::: -```c++ +```cpp Scanning... I2C device found at address 0x12 ! Found 1 I2C devices @@ -345,7 +345,7 @@ Channel 2 on 如果您想要更改地址,您需要在使用前设置地址。例如,我们想要将其更改为0x2f。我们可以使用以下代码。 -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-8-Channel_Solid_State_Relay.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-8-Channel_Solid_State_Relay.md index bd734dc476f7..115675a3233e 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-8-Channel_Solid_State_Relay.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-8-Channel_Solid_State_Relay.md @@ -181,7 +181,7 @@ last_update: 或者,您可以直接点击代码块右上角的图标 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 将以下代码复制到Arduino IDE中的一个新草图中。 -```c++ +```cpp #include #define USE_8_CHANNELS (1) @@ -303,7 +303,7 @@ void loop() 如果一切顺利,您将看到结果。同时,您会看到板载LED灯交替亮起和熄灭。 ::: -```c++ +```cpp Scanning... I2C device found at address 0x11 ! Found 1 I2C devices @@ -378,7 +378,7 @@ Channel 2 on 如果您想更改地址,您需要在使用之前设置地址。例如,我们想要将其更改为0x2f。我们可以使用以下代码。 -```C++ +```cpp #include Multi_Channel_Relay relay; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Haptic_Motor.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Haptic_Motor.md index d1558951e59c..7d4d71678aa9 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Haptic_Motor.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Haptic_Motor.md @@ -109,7 +109,7 @@ Grove - 触觉马达是一个集成了[DRV2605L](http://www.ti.com/product/DRV26 - **步骤 2.** 参考[如何安装库](https://wiki.seeedstudio.com/How_to_install_Arduino_Library)为Arduino安装库。 - **步骤 3.** 将代码复制到Arduino IDE并上传。如果您不知道如何上传代码,请查看[如何上传代码](https://wiki.seeedstudio.com/Upload_Code/)。 -```c++ +```cpp #include DRV2605 haptic; diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-I2C-Motor-Driver-L298P.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-I2C-Motor-Driver-L298P.md index f7f048dbf83c..6cb837a09fc3 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-I2C-Motor-Driver-L298P.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-I2C-Motor-Driver-L298P.md @@ -66,7 +66,7 @@ Grove - I2C电机驱动器(L298P)是一种常用的步进电机和伺服电机 #### **软件代码 1 - 直流电机** -```C++ +```cpp #include "Grove_I2C_Motor_Driver.h" // default I2C address is 0x0f @@ -114,7 +114,7 @@ void loop() { #### **软件代码 2 - 步进电机** -```C++ +```cpp #include // default I2C address is 0x0f diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Infrared_Emitter.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Infrared_Emitter.md index d182b87c210e..669dbb771d12 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Infrared_Emitter.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Infrared_Emitter.md @@ -113,7 +113,7 @@ Grove - 红外线发射器可以发送数据,而Grove - 红外线接收器将 **发送示例代码:** -```c++ +```cpp /* send.ino Example sketch for IRLib2 * Illustrates how to send a code. */ diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3-v3.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3-v3.md index 373433b1e5fa..4f9dd48e952b 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3-v3.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3-v3.md @@ -94,7 +94,7 @@ Grove - MP3是一款基于WT2003S-20SS音频解码器的20x40mm超小型音乐 WT2003S_Terminal_Player示例代码如下: -```C++ +```cpp #include "WT2003S_Player.h" #ifdef __AVR__ diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3_v2.0.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3_v2.0.md index 0501d216c0c1..9ab7cc523033 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3_v2.0.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-MP3_v2.0.md @@ -143,7 +143,7 @@ Grove - MP3 v2.0 是一款小巧紧凑的音频模块。它支持对 MP3、WAV 有关串行的更多信息,请参考[Seeed Arduino串行](https://wiki.seeedstudio.com/Seeed_Arduino_Serial/)。 ::: -```c++ +```cpp #ifdef __AVR__ #include SoftwareSerial SSerial(2, 3); // RX, TX diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Optocoupler_Relay-M281.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Optocoupler_Relay-M281.md index 97a75b897363..de0ba548083f 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Optocoupler_Relay-M281.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Optocoupler_Relay-M281.md @@ -126,7 +126,7 @@ last_update: - **步骤 1.** 将以下代码复制到Arduino IDE中的一个新草图中 -```C++ +```cpp const int Pinout = 5; void setup() { diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Passive-Buzzer.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Passive-Buzzer.md index dd701699de9b..4a09121fd07f 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Passive-Buzzer.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Passive-Buzzer.md @@ -63,7 +63,7 @@ last_update: #### 代码示例1 - 简单获取蜂鸣声 -```c++ +```cpp int buzzer = 5; // Buzzer connect with Pin 5 int frequency = 2700; //reach the Resonant Frequency int cycle = 1000000/frequency; @@ -86,7 +86,7 @@ void loop() #### 代码示例2 - 使用蜂鸣器播放音乐 -```c++ +```cpp //set the corresponding notes with frequency #define NOTE_D0 0 #define NOTE_D1 294 diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Solid_State_Relay_V2.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Solid_State_Relay_V2.md index 6575b2142250..3292897fc048 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Solid_State_Relay_V2.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Solid_State_Relay_V2.md @@ -151,7 +151,7 @@ Grove - 固态继电器 V2 - **步骤 1.** 打开 Arduino IDE 并创建一个新文件,您可以直接点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 图标,将以下代码复制到 Arduino IDE 中的新草图中。 -```c++ +```cpp #include uint8_t pin = 7; void setup() { diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Speaker-Plus.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Speaker-Plus.md index 4ccadc87c702..272cb413cebd 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Speaker-Plus.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Actuator/cn-Grove-Speaker-Plus.md @@ -101,7 +101,7 @@ Grove Speaker Plus 由一个强大的放大驱动板和高品质扬声器组成 如果您是第一次使用 Arduino,我们强烈建议您在开始之前先阅读[Arduino 入门指南](https://wiki.seeedstudio.com/Getting_Started_with_Arduino/)。 ::: -```C++ +```cpp /*macro definition of Speaker pin*/ #define SPEAKER 3 diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-10A_DC_Current_Sensor-ACS725.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-10A_DC_Current_Sensor-ACS725.md index 630c58469bf5..116d0e600c7e 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-10A_DC_Current_Sensor-ACS725.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-10A_DC_Current_Sensor-ACS725.md @@ -133,7 +133,7 @@ Grove - 10A DC 电流传感器(ACS725)基于霍尔原理,差分霍尔传 - **步骤 2.** 在/example/文件夹中,您可以找到演示代码。这里我们以**Grove_10A_Current_Sensor**为例。只需点击[Grove_10A_Current_Sensor.ino](https://github.com/Seeed-Studio/Grove_Current_Sensor/blob/master/examples/Grove_10A_Current_Sensor/Grove_10A_Current_Sensor.ino)即可打开演示。或者您可以复制以下代码: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -226,14 +226,14 @@ void loop() 第19行: -```C++ +```cpp float Vref = 322; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` 在演示代码中,我们将Vref设置为322,但每块板的零偏移值可能不同。如您所知,我们在本次演示中使用的板的零偏移值为346.68。因此,我们修改第21行: -```C++ +```cpp float Vref = 346.68; ``` diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-2.5A-DC-Current-Sensor-ACS70331.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-2.5A-DC-Current-Sensor-ACS70331.md index 57fa3dbd1798..66731bcc1271 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-2.5A-DC-Current-Sensor-ACS70331.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-2.5A-DC-Current-Sensor-ACS70331.md @@ -154,7 +154,7 @@ ACS70331 QFN 封装的内部结构如图 2 所示。芯片位于初级电流路 - **步骤2.** 在/example/文件夹中,您可以找到演示代码。这里我们以[Grove_2_5A_Current_Sensor.ino](https://github.com/Seeed-Studio/Grove_Current_Sensor/tree/master/examples/Grove_2_5A_Current_Sensor)为例。只需点击Grove_2_5A_Current_Sensor.ino即可打开演示代码。或者您也可以复制以下代码: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -250,14 +250,14 @@ void loop() 第21行: -```C++ +```cpp float Vref = 265; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` 在演示代码中,我们将Vref设置为265,但是,零点偏移值因板而异。正如您所知,我们在这个演示中使用的板的零点偏移值是288.09。所以,让我们修改第21行: -```C++ +```cpp float Vref = 283.20; ``` diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-5A_DC_AC_Current_Sensor-ACS70331.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-5A_DC_AC_Current_Sensor-ACS70331.md index 56b671ab9a0b..395e68b14066 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-5A_DC_AC_Current_Sensor-ACS70331.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-5A_DC_AC_Current_Sensor-ACS70331.md @@ -160,7 +160,7 @@ ACS70331 QFN封装的内部结构如图2所示。芯片位于主电流路径之 - **步骤 2.** 在/example/文件夹中,您可以找到演示代码。这里我们以[Grove - ±5A DC/AC 电流传感器(ACS70331)](https://github.com/Seeed-Studio/Grove_Current_Sensor/blob/master/examples/Grove_5A_DC_Current_Sensor/Grove_5A_DC_Current_Sensor.ino)为例。只需点击**Grove_5A_DC_Current_Sensor.ino**打开演示代码。或者您也可以复制以下代码: -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB @@ -257,14 +257,14 @@ void loop() 第32行: -```C++ +```cpp float Vref = 1508; //Vref is zero drift value, you need to change this value to the value you actually measured before using it. ``` 在演示代码中,我们将Vref设置为1508,但是,每块板的零偏移值都不同。如您所知,我们在本次演示中使用的板的零偏移值为595.70。因此,让我们修改第21行: -```C++ +```cpp float Vref = 595.70; ``` @@ -292,7 +292,7 @@ float Vref = 595.70; 对于硬件连接和校准部分,请参考[DC 演示](https://yiyan.baidu.com/#dc-demo),唯一的区别是代码。请使用以下代码进行交流负载测试。 -```C++ +```cpp #ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE #define RefVal 3.3 #define SERIAL SerialUSB diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md index 35f70fc176a3..264edab7c732 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Current/cn-Grove-Coulomb_Counter_3.3V_to_5V-LTC2941.md @@ -188,7 +188,7 @@ ___ 3. 或者,您可以直接点击代码块右上角的![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg)图标,将以下代码复制到Arduino IDE中的新草图中。 -```C++ +```cpp #include "LTC2941.h" @@ -244,7 +244,7 @@ void loop(void) 如果一切顺利,当您打开串口监视器并按下任意键后点击发送按钮时,它可能会显示如下内容: ::: -```C++ +```cpp LTC2941 Raw Data 1439.96C,399.99mAh,100.00% 1439.96C,399.99mAh,100.00% @@ -257,7 +257,7 @@ LTC2941 Raw Data 在示例中,我们使用了一个400mAh的电池,因此您可以看到结果`1439.96mC,399.99mAh,100.00%`。剩余电池的百分比只有在您设置了电池容量之后才有效。您可以在代码的第21行更改电池容量, -```C +```cpp ltc2941.setBatteryFullMAh(400); // set the battery capacity here ``` diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-16x2_LCD_Series.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-16x2_LCD_Series.md index 2115e6a5151d..8d0e6e272edf 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-16x2_LCD_Series.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-16x2_LCD_Series.md @@ -156,7 +156,7 @@ Grove - 16 x 2 LCD系列的第一个版本没有内置上拉电阻,也没有 即可将以下代码复制到 Arduino IDE 中的一个新草图中。 -```C++ +```cpp #include #include "rgb_lcd.h" diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-LCD_RGB_Backlight.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-LCD_RGB_Backlight.md index 68a048b74fb1..df5ec32f37d8 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-LCD_RGB_Backlight.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-LCD_RGB_Backlight.md @@ -161,7 +161,7 @@ Grove-LCD RGB 背光已经从 V4.0 更新到 V5.0,代码也进行了升级以 以下是HelloWorld.ino的代码: -```c++ +```cpp #include #include "rgb_lcd.h" @@ -367,7 +367,7 @@ if __name__=="__main__": - Q2: 如何使用按钮来切换Grove RGB LCD以显示不同的页面? - A2: 以下是相关代码。 -```c++ +```cpp #include #include "rgb_lcd.h" diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.66-SSD1306_v1.0.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.66-SSD1306_v1.0.md index ba869510501a..059eb16974bc 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.66-SSD1306_v1.0.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.66-SSD1306_v1.0.md @@ -92,7 +92,7 @@ last_update: - **步骤 2.** 打开Arduino IDE并创建一个新文件,然后将以下代码复制到新文件中。 -```C++ +```cpp #include #include #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.96-SSD1315.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.96-SSD1315.md index fbf11279f53b..79e88e2dc98d 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.96-SSD1315.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-0.96-SSD1315.md @@ -92,7 +92,7 @@ Grove - OLED显示屏 0.96英寸(SSD1315)是一款具有Grove I2C接口的 - **步骤 2.** 打开Arduino IDE并创建一个新文件,然后将以下代码复制到新文件中。 -```C++ +```cpp #include #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-1.12-SH1107_V3.0.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-1.12-SH1107_V3.0.md index be8b4e8fcbd1..a5d733bd2ec0 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-1.12-SH1107_V3.0.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED-Display-1.12-SH1107_V3.0.md @@ -98,7 +98,7 @@ Grove - OLED Display 1.12 V3.0 (SH1107)是一款具有128*128分辨率的**单 - **步骤 4.** 将以下示例代码上传到你的Arduino IDE中。 -```C++ +```cpp #include #include #include @@ -177,7 +177,7 @@ void loop(void) { - **步骤 3.** 将以下示例代码上传到你的Arduino IDE中。 -```C++ +```cpp #include #include #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_0.96inch.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_0.96inch.md index 595eac4bbe19..6534e8c3658b 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_0.96inch.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_0.96inch.md @@ -120,7 +120,7 @@ OLED128*64使用SSD1308芯片的所有引脚,默认原点位于左上角。您 - **步骤 2.** 参考 [如何安装库](https://wiki.seeedstudio.com/How_to_install_Arduino_Library) 来为 Arduino 安装库。 - **步骤 3.** 将代码复制到 Arduino IDE 并上传。如果您不知道如何上传代码,请查看 [如何上传代码](https://wiki.seeedstudio.com/Upload_Code/)。 -```CPP +```cpp #include #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_1.12inch.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_1.12inch.md index 4e6660562a17..7f79c82647ca 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_1.12inch.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-OLED_Display_1.12inch.md @@ -115,7 +115,7 @@ last_update: - **步骤 4.** 在您的Arduino IDE中上传以下示例代码。 -```C++ +```cpp #include #include #include diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_1_54.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_1_54.md index 2be992cb9570..3ab14b15a6ad 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_1_54.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_1_54.md @@ -169,7 +169,7 @@ Grove - Triple Color E-Ink Display 1.54'' 是一款断电后仍可显示的屏 在开始之前,请再次检查**E_ink154_factoryCode.ino**。您很容易就能找到这两个数组。 -```c++ +```cpp const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, @@ -185,7 +185,7 @@ const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, 和 -```c++ +```cpp const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_2_13.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_2_13.md index cf92ef945ca1..9827cb27726c 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_2_13.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Display/cn-Grove-Triple_Color_E-Ink_Display_2_13.md @@ -167,7 +167,7 @@ Grove - 三色电子墨水显示屏 2.13'' 是一款断电后仍能显示的屏 在开始之前,请再次查看 **Eink_factory_code_213.ino** 文件。您会很容易找到两个数组。 -```c++ +```cpp const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, @@ -183,7 +183,7 @@ const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, 和 -```c++ +```cpp const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */ 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md index 4580542a144e..573aa0a15311 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-8-Channel-I2C-Multiplexer-I2C-Hub-TCA9548A.md @@ -54,7 +54,7 @@ last_update: #### 软件代码 -```C++ +```cpp #include "TCA9548A.h" // if you use the software I2C to drive, you can uncommnet the define SOFTWAREWIRE which in TCA9548A.h. diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-Differential_Amplifier_v1.0.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-Differential_Amplifier_v1.0.md index 6ec429b62671..2d04fceac6a4 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-Differential_Amplifier_v1.0.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-Differential_Amplifier_v1.0.md @@ -154,7 +154,7 @@ sku: 103020016 将下面的示例代码复制到Arduino IDE中并上传。 -```c++ +```cpp void setup() { Serial.begin(9600); diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-RS485.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-RS485.md index 823ee704ee25..1740f6db6853 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-RS485.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Input_Output/cn-Grove-RS485.md @@ -90,7 +90,7 @@ Grove - NFC支持I2C和UART,[Seeed Arduino NFC库](https://github.com/Seeed-St - **步骤1.** 打开两个Arduino IDE窗口,并分别复制以下代码。其中一个设备作为主设备,另一个设备作为从设备。 -```c++ +```cpp /* Slave */ #include SoftwareSerial Slave(6, 7); @@ -115,7 +115,7 @@ void loop() { } ``` -```c++ +```cpp /* Master */ #include SoftwareSerial Master(6, 7); diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-5-Way_Switch.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-5-Way_Switch.md index c1a83dc64618..a12a2327c20a 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-5-Way_Switch.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-5-Way_Switch.md @@ -128,7 +128,7 @@ Grove - 5向开关可用于检测开关位置以及诸如单击/双击/长按等 或者,您只需点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 图标,即可将以下代码复制到Arduino IDE中的新草图里。 -```C++ +```cpp #include "Grove_Multi_Switch.h" GroveMultiSwitch mswitch[1]; @@ -260,7 +260,7 @@ void loop() 如果一切顺利,您将得到相应的结果。当您按下**KEY E**时,它会触发**KEY E: RAW - LOW PRESSED**。 ::: -```C++ +```cpp Grove Multi Switch ***** Device probe Device BN-5E-0.1 Grove Multi Switch diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-6-Position_DIP_Switch.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-6-Position_DIP_Switch.md index 7d6f1ab18b4e..36c2daef820d 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-6-Position_DIP_Switch.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-6-Position_DIP_Switch.md @@ -116,7 +116,7 @@ Grove - 6位DIP开关有6个单独的开关位置,使用I2C传输数据。它 或者,您只需点击代码块右上角的 ![](https://files.seeedstudio.com/wiki/wiki_english/docs/images/copy.jpg) 图标,即可将以下代码复制到Arduino IDE中的新草图中。 -```C++ +```cpp #include "Grove_Multi_Switch.h" GroveMultiSwitch mswitch[1]; @@ -248,7 +248,7 @@ void loop() 如果一切顺利,您将得到结果。例如,默认开关是关闭-高电平,当您将**Switch6**切换到**ON**时,输出将是**POS 6: RAW - LOW ON**。 ::: -```C++ +```cpp Grove Multi Switch ***** Device probe OK ***** Grove 6-Position DIP Switch Inserted! diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Dual-Button.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Dual-Button.md index 5187c87bdd2f..47c7d3289bf8 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Dual-Button.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Dual-Button.md @@ -69,7 +69,7 @@ Grove双按钮与Grove Shield上的“D2”接口连接,Grove无源蜂鸣器 - **步骤1** 将以下代码复制到Arduino IDE并上传。如果您不知道如何更新代码,请查看[如何上传代码](https://wiki.seeedstudio.com/Upload_Code/)。 -```c++ +```cpp //set the corresponding notes with frequency #define NOTE_D0 0 #define NOTE_D1 294 diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-LED_Button.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-LED_Button.md index b3b9a9b20342..d605bbc70b9b 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-LED_Button.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-LED_Button.md @@ -121,7 +121,7 @@ Grove - LED 按钮由 Grove - 黄色按钮、Grove - 蓝色 LED 按钮和 Grove - **步骤 1.** 打开Arduino IDE并创建一个新文件,然后将以下代码复制到新文件中。 -```C++ +```cpp #include "Arduino.h" //1: toggle mode, 2: follow mode diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Mech_Keycap.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Mech_Keycap.md index ce59828f025a..40773951d8cf 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Mech_Keycap.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Switch&Button/cn-Grove-Mech_Keycap.md @@ -131,7 +131,7 @@ K1连接到按钮上,当按键打开时,**SIG1**会被R2下拉,因此**SIG - **步骤 2.** 参考[如何安装库](https://wiki.seeedstudio.com/How_to_install_Arduino_Library)来为Arduino安装库。 - **步骤 3.** 打开Arduino IDE并创建一个新文件,然后将以下代码复制到新文件中。 -```c++ +```cpp /** * This is an exmaple of the Grove - Mech Keycap. * Every press of the key will change the color the SK6805 RGB LED. The SK6805 is a NeoPixel compatible chip. diff --git a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Time/cn-Grove-RTC.md b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Time/cn-Grove-RTC.md index 0c05fa830a41..aaef92fa7abb 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Accessories/Time/cn-Grove-RTC.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Accessories/Time/cn-Grove-RTC.md @@ -95,7 +95,7 @@ RTC模块基于DS1307时钟芯片,支持I2C协议。它使用锂电池(CR122
-```c++ +```cpp #include #include "DS1307.h" diff --git a/docs/zh-CN/Sensor/Grove/Grove_Sensors/AI-powered/cn-Grove-Vision-AI-Module.md b/docs/zh-CN/Sensor/Grove/Grove_Sensors/AI-powered/cn-Grove-Vision-AI-Module.md index b7664eee54e8..99c85d3ee30d 100644 --- a/docs/zh-CN/Sensor/Grove/Grove_Sensors/AI-powered/cn-Grove-Vision-AI-Module.md +++ b/docs/zh-CN/Sensor/Grove/Grove_Sensors/AI-powered/cn-Grove-Vision-AI-Module.md @@ -187,7 +187,7 @@ Grove Vision AI Module Sensor 代表拇指大小的 AI 摄像头、已安装用 5. `Serial.print(data.confidence)` - **struct**格式不能直接用于打印,它应该指向头文件中定义的特定类型。 -```C +```cpp typedef struct { uint16_t x; diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/CN_XIAO_ESP32C3_Getting_Started.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/CN_XIAO_ESP32C3_Getting_Started.md index 91e996b41016..7b1178aac1a5 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/CN_XIAO_ESP32C3_Getting_Started.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_ESP32C3/CN_XIAO_ESP32C3_Getting_Started.md @@ -201,7 +201,7 @@ AD转换结果与万用表测得的电压一致,误差在5 mV左右,在实 以下是测试电池电压的程序。 -```c++ +```cpp void setup() { Serial.begin(115200); pinMode(A0, INPUT); // ADC diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Grove-Shield-for-Seeeduino-XIAO-embedded-battery-management-chip.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Grove-Shield-for-Seeeduino-XIAO-embedded-battery-management-chip.md index 1e0b958141ca..735e8ed9e88a 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Grove-Shield-for-Seeeduino-XIAO-embedded-battery-management-chip.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Grove-Shield-for-Seeeduino-XIAO-embedded-battery-management-chip.md @@ -138,7 +138,7 @@ Seeed Studio Grove Base for XIAO是适用于 **[Seeed Studio XIAO](https://wiki. #### 软件代码 -```C++ +```cpp #include "GBT24LTR11.h" #ifdef __AVR__ diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Seeeduino-XIAO-Expansion-Board.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Seeeduino-XIAO-Expansion-Board.md index 1970742e4468..dccca93aecfc 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Seeeduino-XIAO-Expansion-Board.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_Expansion_board/CN_Seeeduino-XIAO-Expansion-Board.md @@ -159,7 +159,7 @@ Seeed Studio XIAO的扩展底板可以通过电池供电,因此如果您进行 **OLED代码** -```CPP +```cpp #include #include #include @@ -190,7 +190,7 @@ void loop(void) { **代码** -```CPP +```cpp const int buttonPin = 1; // the number of the pushbutton pin int buttonState = 0; // variable for reading the pushbutton status @@ -234,7 +234,7 @@ void loop() { **代码** -```CPP +```cpp int speakerPin = A3; int length = 28; // the number of notes char notes[] = "GGAGcB GGAGdc GGxecBA yyecdc"; @@ -299,7 +299,7 @@ void loop() { **第三步**. 打开Arduino IDE,将代码复制并粘贴到Arduino IDE中,然后上传它。 -```CPP +```cpp #include #include #include @@ -347,7 +347,7 @@ void loop() { -```CPP +```cpp #include #include #include @@ -637,7 +637,7 @@ MicroSD卡的系统格式可以是FAT或exFAT。如果您使用其他MicroSD卡 ** `main.py` 代码** -```CPP +```cpp import sd f = open("/sd/hello.txt", "r") ## read the file from SD card print(f.read()) @@ -647,7 +647,7 @@ print(f.read()) ** `sd.py` 代码** -```CPP +```cpp import os import adafruit_sdcard import board @@ -729,7 +729,7 @@ sys.path.append("/sd/lib") ## switch to the path to SD card **代码** -```CPP +```cpp #include #include @@ -847,7 +847,7 @@ void loop() { **代码** -```CPP +```cpp #include #include #include @@ -993,7 +993,7 @@ void delayUntil(unsigned long elapsedTime) { **代码** -```C +```cpp #include #include #include @@ -1181,7 +1181,7 @@ void colorWipe(uint32_t c, uint8_t wait) { **代码** -```C +```cpp #include #include "ATSerial.h" #include "Protocol.h" @@ -1308,7 +1308,7 @@ void setup() { **代码** -```C +```cpp #include #include #include @@ -1533,7 +1533,7 @@ void loop() { **代码** -```C +```cpp #include #include diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-Arduino.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-Arduino.md index ca89d568d842..667d3aca2b53 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-Arduino.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-Arduino.md @@ -105,7 +105,7 @@ Seeed Studio XIAO RP2040板上有11个数字引脚,4个模拟引脚,11个PWM 请注意,Seeed Studio XIAO RP2040的工作电压是3.3V,如果将传感器错误地连接到5V上,主板可能无法正常工作。 ::: -```c++ +```cpp const int buttonPin = D0; // the number of the pushbutton pin const int ledPin = 25; // the number of the LED pin @@ -137,7 +137,7 @@ void loop() { 将一个电位计连接到引脚A0,并将一个LED连接到引脚25。然后上传以下代码,通过旋转电位计旋钮来控制LED的闪烁间隔。 -```c++ +```cpp const int sensorPin = A0; const int ledPin = 25; void setup() { @@ -164,7 +164,7 @@ int sensorValue = analogRead(sensorPin); 使用引脚D6作为UART的TX引脚,引脚D7作为UART的RX引脚,发送消息 "Hello World!"。 -```c++ +```cpp void setup() { Serial.begin(115200); while (!Serial); @@ -190,7 +190,7 @@ void loop() { - **步骤二.** 将代码复制到Arduino并点击 **上传** 按钮进行上传。RGB LED将显示彩虹色。 -```c++ +```cpp #include int Power = 11; @@ -254,7 +254,7 @@ RGB LED将显示彩虹颜色。 - **步骤二.** 将代码复制到Arduino并点击 **Upload** 按钮进行上传。 -```c++ +```cpp #include #include @@ -311,7 +311,7 @@ void loop(void) { - **步骤二.** 将代码复制到Arduino并点击 **上传** 按钮进行上传。 -```c++ +```cpp #include #include #include diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-CircuitPython.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-CircuitPython.md index 9f60bf780ec0..274e05b17ae3 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-CircuitPython.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-CircuitPython.md @@ -57,7 +57,7 @@ CircuitPython是一种专为低成本微控制器板实验和学习编程而设 **步骤三** 复制并上传以下代码: -```c++ +```cpp """Example for Pico. Blinks the built-in LED.""" import time import board diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-MicroPython.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-MicroPython.md index 8760b8e5d09b..5d1b4e648545 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-MicroPython.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/CN_XIAO-RP2040-with-MicroPython.md @@ -64,7 +64,7 @@ last_update: - **步骤三**. 将以下代码复制到Thonny中。 -```c++ +```cpp from machine import Pin, Timer led = Pin(25, Pin.OUT) diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/CN_XIAO-RP2040-EI.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/CN_XIAO-RP2040-EI.md index 8a55a7c5a59c..6ba6a004e58c 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/CN_XIAO-RP2040-EI.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_RP2040/Embedded ML/CN_XIAO-RP2040-EI.md @@ -48,7 +48,7 @@ last_update: 安装完成后,复制以下代码并运行它。 -```c++ +```cpp #include #include "MMA7660.h" MMA7660 accelemeter; diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/CN_How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/CN_How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md index e2803a0d1d5e..718280b7aae3 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/CN_How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_SAMD21/TuTorial/CN_How-to-use-Seeeduino-XIAO-to-log-in-to-your-Raspberry-PI.md @@ -55,7 +55,7 @@ enable_uart=1 - **第二步.** 将以下代码复制到Arduino IDE中,并将代码上传到Seeed Studio XIAO SAMD21。 -```c++ +```cpp uint32_t baud; uint32_t old_baud; void setup() { diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/CN_XIAO-BLE-Sense-Bluetooth-Usage.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/CN_XIAO-BLE-Sense-Bluetooth-Usage.md index c9e667d7b6fa..b1a6c97033e8 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/CN_XIAO-BLE-Sense-Bluetooth-Usage.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Bluetooth Libraries/CN_XIAO-BLE-Sense-Bluetooth-Usage.md @@ -88,7 +88,7 @@ last_update: 请将下面的代码粘贴到Arduino IDE中,并将其上传到Seeed Studio XIAO nRF52840。 -```c++ +```cpp #include BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service @@ -163,7 +163,7 @@ void loop() { 这个例子实现的关键是下面的段落。 -```c++ +```cpp while (central.connected()) { if (switchCharacteristic.written()) { if (switchCharacteristic.value()) { @@ -229,7 +229,7 @@ void loop() {
-```c++ +```cpp //Radar_with_XIAOBLE_example #include @@ -308,7 +308,7 @@ void loop() { 在这个例子中,向移动设备发送数据的函数是`setValue()`。如果你想实时显示数据,你需要将`BLENotify`添加到下面的代码中。最后一个参数20表示可以发送的数据的最大长度。 -```c++ +```cpp BLEStringCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify, 20); ``` @@ -363,7 +363,7 @@ BLEStringCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A12 请选择一个不需要连接任何设备的XIAO nRF52840,直接上传下面的程序。 -```c++ +```cpp #include BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service @@ -450,7 +450,7 @@ void loop() { 为此目的,与扩展板连接的XIAO上传以下程序。 -```c++ +```cpp #include #include #include diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE-Sense-Pin-Multiplexing.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE-Sense-Pin-Multiplexing.md index 3539a96c2588..1e3fd55bd51b 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE-Sense-Pin-Multiplexing.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE-Sense-Pin-Multiplexing.md @@ -20,7 +20,7 @@ Seeed Studio XIAO nRF52840 (Sense) 具有丰富的接口。 有 **11 个数字 I 将按钮连接到引脚 D6,将 LED 连接到引脚 D10。然后上传以下代码以使用按钮控制 LED 的开/关。 -```c++ +```cpp const int buttonPin = 6; // pushbutton connected to digital pin 6 const int ledPin = 10; // LED connected to digital pin 10 @@ -82,7 +82,7 @@ void loop() { 将电位计连接到引脚 A5,将 LED 连接到引脚 D10。然后上传以下代码,通过旋转电位器旋钮来控制LED的闪烁间隔。 -```c++ +```cpp const int sensorPin = 5; const int ledPin = 10; void setup() { @@ -108,7 +108,7 @@ void loop() { ## 串行 使用 Serial1 通过 GPIO 而不是 USB 使用 UART。您也可以同时使用两者。 使用引脚 D6 作为 UART 的 TX 引脚,使用引脚 D7 作为 UART 的 RX 引脚来发送“Hello World!”消息。 -```c++ +```cpp void setup() { Serial1.begin(115200); while (!Serial1); diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE_CircutPython.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE_CircutPython.md index f6f1a0e334e0..0f4e274133a6 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE_CircutPython.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/CN_XIAO-BLE_CircutPython.md @@ -55,7 +55,7 @@ CircuitPython 是一种编程语言,旨在简化在低成本微控制器板上 **步骤 3** 复制并上传以下代码: -```c++ +```cpp """Example for Seeed Studio XIAO nRF52840. Blinks the built-in LED.""" import time import board diff --git a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/CN_XIAO-BLE-PDM-EI.md b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/CN_XIAO-BLE-PDM-EI.md index 6fd64b7aed6e..f51f5d551f97 100644 --- a/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/CN_XIAO-BLE-PDM-EI.md +++ b/docs/zh-CN/Sensor/SeeedStudio_XIAO/SeeedStudio_XIAO_nRF52840-Sense/Embedded ML/CN_XIAO-BLE-PDM-EI.md @@ -293,7 +293,7 @@ XIAO nRF52840 Sense内置LED,有3种颜色: 先定义一些变量。我在包含的库之后定义了这些库: -```C +```cpp /* threshold for predictions */ float threshold = 0.7; @@ -319,7 +319,7 @@ int oldLED; int LED 是我们将要打开的电流LED。 接下来,在loop( )函数中,在for循环指令内部,我们循环使用CLASSIFIER_LABEL_COUNT(大约在第129行左右——上面的行已经有了): -```C +```cpp for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { ``` @@ -327,7 +327,7 @@ for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { 完整的for循环加上新增的代码如下所示: -```C +```cpp for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { ei_printf(" %s: %.5f\n", result.classification[ix].label, result.classification[ix].value); //lets light up some LEDS