From 062771871c2446c7cca9a86034da568fddd93ffc Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <67171972+IoTManagerProject@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:37:43 +0100 Subject: [PATCH] esp32 --- data_svelte/items.json | 8 +++++--- myProfile.json | 2 +- platformio.ini | 3 +-- src/modules/API.cpp | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/data_svelte/items.json b/data_svelte/items.json index 4a94fc4d..fab6671d 100644 --- a/data_svelte/items.json +++ b/data_svelte/items.json @@ -627,16 +627,18 @@ }, { "global": 0, - "name": "43. PWM ESP8266", + "name": "43. PWM ESP32", "type": "Writing", - "subtype": "Pwm8266", + "subtype": "Pwm32", "id": "pwm", "widget": "range", "page": "Кнопки", "descr": "PWM", "int": 0, - "pin": 15, + "pin": 2, "freq": 5000, + "ledChannel": 2, + "PWM_resolution": 10, "val": 0, "apin": -1, "num": 43 diff --git a/myProfile.json b/myProfile.json index a7c149a4..3e6119d5 100644 --- a/myProfile.json +++ b/myProfile.json @@ -24,7 +24,7 @@ }, "projectProp": { "platformio": { - "default_envs": "esp8266_4mb", + "default_envs": "esp32_4mb", "comments_default_envs": "choose from: esp8266_4mb or esp32_4mb or esp8266_1mb or esp8266_1mb_ota or esp8285_1mb or esp8285_1mb_ota" } }, diff --git a/platformio.ini b/platformio.ini index 117bb9e5..7c933b08 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,5 +1,5 @@ [platformio] -default_envs = esp8266_4mb +default_envs = esp32_4mb data_dir = data_svelte [common_env_data] @@ -329,7 +329,6 @@ build_src_filter = + + + - + + + + diff --git a/src/modules/API.cpp b/src/modules/API.cpp index 12df2c22..2701a47c 100644 --- a/src/modules/API.cpp +++ b/src/modules/API.cpp @@ -25,7 +25,7 @@ void* getAPI_Mcp23017(String subtype, String params); void* getAPI_Mp3(String subtype, String params); void* getAPI_Multitouch(String subtype, String params); void* getAPI_Pcf8574(String subtype, String params); -void* getAPI_Pwm8266(String subtype, String params); +void* getAPI_Pwm32(String subtype, String params); void* getAPI_TelegramLT(String subtype, String params); void* getAPI_Lcd2004(String subtype, String params); @@ -56,7 +56,7 @@ if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Multitouch(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI; -if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI; +if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI; if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI; return nullptr;