{"id":2129,"date":"2024-10-22T22:39:20","date_gmt":"2024-10-22T14:39:20","guid":{"rendered":"https:\/\/saludpcb.com\/zh\/?p=2129"},"modified":"2024-12-03T09:59:20","modified_gmt":"2024-12-03T01:59:20","slug":"learn-c-with-esp32-led-control","status":"publish","type":"post","link":"https:\/\/saludpcb.com\/zh\/learn-c-with-esp32-led-control\/","title":{"rendered":"\u8f15\u9b06\u5b78\u7fd2 C++ \u8207 ESP32\uff1aLED \u63a7\u5236"},"content":{"rendered":"\n<hr class=\"wp-block-separator alignwide has-text-color has-palette-color-1-color has-alpha-channel-opacity has-palette-color-1-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7c21\u4ecb\">\u7c21\u4ecb<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\u5728\u5d4c\u5165\u5f0f\u7cfb\u7d71\u958b\u767c\u4e2d\uff0cESP32 \u662f\u4e00\u6b3e\u5ee3\u53d7\u6b61\u8fce\u7684\u958b\u767c\u677f\uff0c\u5b83\u5177\u5099\u5f37\u5927\u7684\u8655\u7406\u80fd\u529b\u548c\u7121\u7dda\u901a\u8a0a\u529f\u80fd\u3002\u5728\u9019\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u5c07\u4f7f\u7528 C++ \u7684\u7269\u4ef6\u5c0e\u5411\u7279\u6027\uff0c\u901a\u904e\u5efa\u7acb\u4e00\u500b LED \u63a7\u5236\u7684\u985e\u5225\uff0c\u4f86\u5b78\u7fd2\u5982\u4f55\u5728 ESP32 \u4e0a\u9032\u884c\u958b\u767c\u3002\u6211\u5011\u5c07\u4f7f\u7528 <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/stable\/esp32\/get-started\/index.html\\\" target=\"_blank\" rel=\"noopener\">ESP-IDF<\/a> (Espressif IoT Development Framework) \u548c Visual Studio Code \u4f86\u9032\u884c\u5be6\u4f5c\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>\u5167\u5bb9<\/h2><nav><ul><li class=\"\"><a href=\"#\u7c21\u4ecb\">\u7c21\u4ecb<\/a><\/li><li class=\"\"><a href=\"#\u901a\u9053\u6578\u91cf\">\u958b\u767c\u74b0\u5883\u8a2d\u7f6e<\/a><\/li><li class=\"\"><a href=\"#\u89e3\u6790\u5ea6\">\u5275\u5efa\u4e00\u500b\u65b0\u9805\u76ee<\/a><\/li><li class=\"\"><a href=\"#\u8f38\u5165\u7bc4\u570d\">\u6a94\u6848\u7d50\u69cb<\/a><\/li><li class=\"\"><a href=\"#\u66f4\u63db\u5176\u5b83-esp-idf-\u7248\u672c\">\u4f7f\u7528 C++ \u985e\u5225\u4f86\u63a7\u5236 LED<\/a><\/li><li class=\"\"><a href=\"#\u7d50\u8ad6\">\u7a0b\u5f0f\u78bc\u8a73\u7d30\u89e3\u91cb<\/a><\/li><li class=\"\"><a href=\"#\u7d50\u8ad6-1\">\u7de8\u8b6f\u8207\u71d2\u9304<\/a><\/li><li class=\"\"><a href=\"#\u7d50\u8ad6-1-1\">\u7a0b\u5f0f\u904b\u884c\u6548\u679c<\/a><\/li><li class=\"\"><a href=\"#\u7d50\u8ad6-1-1-1\">\u7d50\u8ad6<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u901a\u9053\u6578\u91cf\">\u958b\u767c\u74b0\u5883\u8a2d\u7f6e<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">1. \u5b89\u88dd <a href=\"https:\/\/code.visualstudio.com\" target=\"_blank\" rel=\"noopener\">Visual Studio Code<\/a>\uff0c\u53ef\u5f9e\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u4e26\u4e14\u5b89\u88dd\u3002\n2. \u5b89\u88dd <a href=\"https:\/\/saludpcb.com\/zh\/esp32-tutorial-esp-idf-with-vscode\/\">ESP-IDF \u63d2\u4ef6<\/a>\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u89e3\u6790\u5ea6\">\u5275\u5efa\u4e00\u500b\u65b0\u9805\u76ee<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">1. \u5728 VS Code \u4e2d\uff0c\u6309\u4e0b Ctrl (Cmd) + Shift + P\uff0c\u7136\u5f8c\u8f38\u5165 ESP-IDF: New Project\u3002<br><br>2. \u9078\u64c7\u4e00\u500b\u6a23\u677f\u5c08\u6848\uff08\u5982 blink example\uff09\uff0c\u8a2d\u5b9a\u5c08\u6848\u540d\u7a31\uff08\u4f8b\u5982 LED_Control\uff09\uff0c\u4e26\u9078\u64c7\u5b58\u5132\u8def\u5f91\u3002<br><br>3. \u6b64\u6642\uff0c\u7cfb\u7d71\u6703\u81ea\u52d5\u70ba\u60a8\u751f\u6210\u4e00\u500b\u65b0\u7684 ESP-IDF \u9805\u76ee\uff0c\u5176\u4e2d\u5305\u542b\u57fa\u672c\u7684 CMake \u6587\u4ef6\u548c\u4e00\u500b\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u8f38\u5165\u7bc4\u570d\">\u6a94\u6848\u7d50\u69cb<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">my_project\/<br>\u251c\u2500\u2500 CMakeLists.txt<br>\u251c\u2500\u2500 main\/<br>\u2502   \u251c\u2500\u2500 CMakeLists.txt<br>\u2502   \u2514\u2500\u2500 main.cpp<br>\u2514\u2500\u2500 ...<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2026\" height=\"1478\" src=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2024\/10\/Learn-C-with-ESP32-LED-Control-1-1.png\" alt=\"\u7528 ESP32 \u5b78\u7fd2 C++\uff1aLED \u63a7\u5236\" class=\"wp-image-2673\" title=\"\" srcset=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2024\/10\/Learn-C-with-ESP32-LED-Control-1-1.png 2026w, https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2024\/10\/Learn-C-with-ESP32-LED-Control-1-1-768x560.png 768w, https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2024\/10\/Learn-C-with-ESP32-LED-Control-1-1-1536x1121.png 1536w\" sizes=\"auto, (max-width: 2026px) 100vw, 2026px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u66f4\u63db\u5176\u5b83-esp-idf-\u7248\u672c\">\u4f7f\u7528 C++ \u985e\u5225\u4f86\u63a7\u5236 LED<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\u6253\u958b main\/main.cpp \u6587\u4ef6\uff0c\u5c07\u5176\u4fee\u6539\u70ba\u4ee5\u4e0b\u5167\u5bb9<\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code has-black-color has-text-color has-link-color wp-elements-9c8cc6df0689254fff67d19c89e43f87\"><code lang=\"cpp\" class=\"language-cpp\">#include &lt;stdio.h&gt;\n#include \"freertos\/FreeRTOS.h\"\n#include \"freertos\/task.h\"\n#include \"driver\/gpio.h\"\n#include \"esp_log.h\"  \/\/ Include ESP logging header\n\n\/\/ Define the GPIO pin for the LED\n#define LED_GPIO_PIN GPIO_NUM_2\n\n\/\/ Define a log tag for this module\nstatic const char *TAG = \"LED_CONTROLLER\";\n\n\/\/ LED Control Class\nclass LEDController {\npublic:\n    \/\/ Constructor: Initialize the LED GPIO pin\n    LEDController(gpio_num_t gpio_pin) : _gpio_pin(gpio_pin) {\n        \/\/ Configure the GPIO pin as output\n        gpio_pad_select_gpio(_gpio_pin);\n        gpio_set_direction(_gpio_pin, GPIO_MODE_OUTPUT);\n        ESP_LOGI(TAG, \"LED initialized on GPIO %d\", _gpio_pin);\n    }\n\n    \/\/ Turn the LED on\n    void turnOn() {\n        gpio_set_level(_gpio_pin, 1);\n        ESP_LOGI(TAG, \"LED turned ON\");\n    }\n\n    \/\/ Turn the LED off\n    void turnOff() {\n        gpio_set_level(_gpio_pin, 0);\n        ESP_LOGI(TAG, \"LED turned OFF\");\n    }\n\n    \/\/ Make the LED blink with a specified interval (in milliseconds)\n    void blink(int interval_ms) {\n        turnOn();  \/\/ Turn the LED on\n        ESP_LOGI(TAG, \"LED is blinking ON\");\n        vTaskDelay(interval_ms \/ portTICK_PERIOD_MS);  \/\/ Delay for the specified interval\n        turnOff();  \/\/ Turn the LED off\n        ESP_LOGI(TAG, \"LED is blinking OFF\");\n        vTaskDelay(interval_ms \/ portTICK_PERIOD_MS);  \/\/ Delay again\n    }\n\nprivate:\n    gpio_num_t _gpio_pin;  \/\/ Store the GPIO pin number for the LED\n};\n\n\/\/ Main program\nextern \"C\" void app_main(void) {\n    \/\/ Create an LED controller object for GPIO 2\n    LEDController led(LED_GPIO_PIN);\n\n    \/\/ Turn the LED on for 2 seconds\n    ESP_LOGI(TAG, \"Turning LED on for 2 seconds...\");\n    led.turnOn();  \/\/ Turn on the LED\n    vTaskDelay(2000 \/ portTICK_PERIOD_MS);  \/\/ Wait for 2 seconds\n\n    \/\/ Turn the LED off for 2 seconds\n    ESP_LOGI(TAG, \"Turning LED off for 2 seconds...\");\n    led.turnOff();  \/\/ Turn off the LED\n    vTaskDelay(2000 \/ portTICK_PERIOD_MS);  \/\/ Wait for 2 seconds\n\n    \/\/ Blink the LED 5 times with a 500ms interval\n    ESP_LOGI(TAG, \"Blinking LED 5 times with 500ms interval...\");\n    for (int i = 0; i &lt; 5; ++i) {\n        led.blink(500);  \/\/ Blink every 500 milliseconds\n    }\n\n    \/\/ Turn the LED on again for 3 seconds\n    ESP_LOGI(TAG, \"Turning LED on again for 3 seconds...\");\n    led.turnOn();  \/\/ Turn on the LED\n    vTaskDelay(3000 \/ portTICK_PERIOD_MS);  \/\/ Keep it on for 3 seconds\n\n    \/\/ Finally, turn the LED off\n    ESP_LOGI(TAG, \"Turning LED off finally...\");\n    led.turnOff();  \/\/ Turn off the LED\n}<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7d50\u8ad6\">\u7a0b\u5f0f\u78bc\u8a73\u7d30\u89e3\u91cb<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">LEDController \u985e\u5225\uff1a<br>\u63d0\u4f9b\u4e09\u500b\u4e3b\u8981\u65b9\u6cd5\uff1a<br>1. turnOn()\uff1a\u6253\u958b LED\u3002<br>2. turnOff()\uff1a\u95dc\u9589 LED\u3002<br>3. blink()\uff1a\u8b93 LED \u9583\u720d\u4e00\u6b21\uff0c\u50b3\u5165\u7684\u53c3\u6578\u6307\u5b9a\u9583\u720d\u6642\u9593\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">app_main() \u51fd\u6578\uff1a<br>\u6211\u5011\u5728 app_main() \u4e2d\u57f7\u884c\u4e86\u4ee5\u4e0b\u64cd\u4f5c\uff1a<br>1. \u6253\u958b LED (turnOn())\uff0c\u4e26\u4fdd\u6301 LED \u4eae 2 \u79d2\u3002<br>2. \u95dc\u9589 LED (turnOff())\uff0c\u4e26\u4fdd\u6301 LED \u95dc\u9589 2 \u79d2\u3002<br>3. \u8b93 LED \u9583\u720d 5 \u6b21\uff0c\u9593\u9694 500 \u6beb\u79d2\u3002<br>4. \u518d\u6b21 \u6253\u958b LED \u4e26\u4fdd\u6301\u4eae 3 \u79d2\u3002<br>5. \u6700\u7d42\u95dc\u9589 LED\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7d50\u8ad6-1\">\u7de8\u8b6f\u8207\u71d2\u9304<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\u5728 VSCode \u8996\u7a97\u6700\u4e0b\u65b9\u4e2d\u627e\u5230 \"ESP32-IDF : Build, Flash and Monitor\" ICON \u57f7\u884c\u548c\u71d2\u9304\u3002<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7d50\u8ad6-1-1\">\u7a0b\u5f0f\u904b\u884c\u6548\u679c<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\u904b\u884c\u7a0b\u5f0f\u5f8c\uff0c\u60a8\u5c07\u5728\u7d42\u7aef\u6a5f\u4e2d\u770b\u5230\u4ee5\u4e0b\u8f38\u51fa\uff1a<\/pre>\n\n\n\n<pre class=\"wp-block-code has-black-color has-text-color has-link-color wp-elements-9b7ad9a646572018120bdd1ede957a19\"><code lang=\"bash\" class=\"language-bash\">I (0) LED_CONTROLLER: Turning LED on for 2 seconds...\nI (2000) LED_CONTROLLER: Turning LED off for 2 seconds...\nI (4000) LED_CONTROLLER: Blinking LED 5 times with 500ms interval...\nI (4500) LED_CONTROLLER: LED is blinking ON\nI (5000) LED_CONTROLLER: LED is blinking OFF\n...\nI (7000) LED_CONTROLLER: Turning LED on again for 3 seconds...\nI (10000) LED_CONTROLLER: Turning LED off finally...<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7d50\u8ad6-1-1-1\">\u7d50\u8ad6<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:0px\"><\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center has-medium-font-size is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-preformatted\">\u5728\u9019\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u5b78\u7fd2\u4e86\u5982\u4f55\u4f7f\u7528 ESP-IDF \u7684 esplog \u4f86\u7ba1\u7406\u65e5\u8a8c\u8f38\u51fa\uff0c\u4e26\u5c55\u793a\u4e86\u5982\u4f55\u5728 ESP32 \u4e0a\u9032\u884c LED \u63a7\u5236\u7684\u540c\u6642\u8a18\u9304\u76f8\u95dc\u64cd\u4f5c\u8a0a\u606f\u3002\u901a\u904e\u4f7f\u7528 ESP_LOGI()\uff0c\u6211\u5011\u53ef\u4ee5\u65b9\u4fbf\u5730\u8ffd\u8e64\u7a0b\u5f0f\u7684\u57f7\u884c\u72c0\u614b\uff0c\u9019\u5c0d\u65bc\u9664\u932f\u548c\u6027\u80fd\u8abf\u8a66\u975e\u5e38\u6709\u5e6b\u52a9\u3002<br><br>\u5229\u7528\u65e5\u8a8c\u7cfb\u7d71\uff0c\u60a8\u9084\u53ef\u4ee5\u66f4\u9748\u6d3b\u5730\u8a2d\u7f6e\u4e0d\u540c\u7d1a\u5225\u7684\u65e5\u8a8c\u8f38\u51fa\uff0c\u4ee5\u4fbf\u5728\u4e0d\u540c\u968e\u6bb5\u638c\u63e1\u7a0b\u5f0f\u904b\u884c\u7684\u7d30\u7bc0\u3002\u5e0c\u671b\u9019\u80fd\u5e6b\u52a9\u60a8\u66f4\u597d\u5730\u638c\u63e1 ESP32 \u958b\u767c\u4e2d\u7684\u65e5\u8a8c\u529f\u80fd\uff01<\/pre>\n<\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator alignwide has-text-color has-palette-color-1-color has-alpha-channel-opacity has-palette-color-1-background-color has-background is-style-wide\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\u7c21\u4ecb \u5728\u5d4c\u5165\u5f0f\u7cfb\u7d71\u958b\u767c\u4e2d\uff0cESP32 \u662f\u4e00\u6b3e\u5ee3\u53d7\u6b61\u8fce\u7684\u958b\u767c\u677f\uff0c\u5b83\u5177\u5099\u5f37\u5927\u7684\u8655\u7406\u80fd\u529b\u548c\u7121\u7dda\u901a\u8a0a\u529f\u80fd\u3002\u5728\u9019\u7bc7\u6587\u7ae0\u4e2d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,53,83],"tags":[61,27,63,20,60,10,64,11,62],"class_list":["post-2129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-module","category-esp32","category-featured","tag-bluetooth","tag-c","tag-firmware","tag-hardware","tag-iot","tag-mcu","tag-module","tag-tutorial","tag-wifi"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6},"content_style_source":"inherit","vertical_spacing_source":"inherit"},"_links":{"self":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/2129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/comments?post=2129"}],"version-history":[{"count":16,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/2129\/revisions"}],"predecessor-version":[{"id":2984,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/2129\/revisions\/2984"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/media\/2674"}],"wp:attachment":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/media?parent=2129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/categories?post=2129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/tags?post=2129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}