






Started logging.

<<<
Content-Length: 3323

{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":22988,"clientInfo":{"name":"vscode","version":"1.50.0"},"rootPath":"e:\\晶彩\\开发资料\\ESP32模块\\ESP32-2432S028例子\\arduino\\Source code\\3_3_LED\\3_3_LED","rootUri":"file:///e%3A/%E6%99%B6%E5%BD%A9/%E5%BC%80%E5%8F%91%E8%B5%84%E6%96%99/ESP32%E6%A8%A1%E5%9D%97/ESP32-2432S028%E4%BE%8B%E5%AD%90/arduino/Source%20code/3_3_LED/3_3_LED","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/%E6%99%B6%E5%BD%A9/%E5%BC%80%E5%8F%91%E8%B5%84%E6%96%99/ESP32%E6%A8%A1%E5%9D%97/ESP32-2432S028%E4%BE%8B%E5%AD%90/arduino/Source%20code/3_3_LED/3_3_LED","name":"3_3_LED"}]}}
>>>
Content-Length: 598

{"id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"triggerCharacters":[".","\u003e",":"]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n"},"renameProvider":false,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]}}},"jsonrpc":"2.0"}
<<<
Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}}Content-Length: 1667

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///e%3A/%E6%99%B6%E5%BD%A9/%E5%BC%80%E5%8F%91%E8%B5%84%E6%96%99/ESP32%E6%A8%A1%E5%9D%97/ESP32-2432S028%E4%BE%8B%E5%AD%90/arduino/Source%20code/3_3_LED/3_3_LED/3_3_LED.ino","languageId":"cpp","version":1,"text":"#include <Arduino.h>\r\n\r\nint freq = 2000;    // frequency\r\nint channel = 0;    // aisle\r\nint resolution = 8;   // Resolution\r\n\r\nconst int led = 4;\r\nvoid setup()\r\n{\r\n  //Initialize GPIO, turn off tricolor light\r\n\r\n  pinMode(4, OUTPUT);\r\n  pinMode(17, OUTPUT);\r\n  pinMode(16, OUTPUT);\r\n  digitalWrite(4, 0);\r\n  digitalWrite(16, 0);\r\n  digitalWrite(17, 0);\r\n  ledcSetup(channel, freq, resolution); // set channel\r\n  //ledcAttachPin(led, channel);  // Connect the channel to the corresponding pin\r\n}\r\n\r\nvoid loop()\r\n{\r\n  digitalWrite(4, 0);\r\n  digitalWrite(16, 1);\r\n  digitalWrite(17, 1);\r\n  delay(500);\r\n  digitalWrite(4, 1);\r\n  digitalWrite(16, 0);\r\n  digitalWrite(17, 1);\r\n  delay(500);\r\n  digitalWrite(4, 1);\r\n  digitalWrite(16, 1);\r\n  digitalWrite(17, 0);\r\n  delay(500);\r\n  digitalWrite(4, 1);\r\n  digitalWrite(16, 1);\r\n  digitalWrite(17, 1);\r\n  delay(500);\r\n  ledcAttachPin(led, channel);\r\n  // gradually brighten\r\n   for (int dutyCycle = 255; dutyCycle >= 0; dutyCycle = dutyCycle - 5)\r\n  {\r\n    ledcWrite(channel, dutyCycle);  // output PWM\r\n    delay(100);\r\n  }\r\n  // gradually darken\r\n  for (int dutyCycle = 0; dutyCycle <= 255; dutyCycle = dutyCycle + 5)\r\n  {\r\n    ledcWrite(channel, dutyCycle);  // output PWM\r\n    delay(100);\r\n  }\r\n  delay(500);\r\n}\r\n"}}}