






Started logging.

>>>
Content-Length: 3255

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":17616,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server2485183378\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch","initializationOptions":{},"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},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":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]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"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,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0068%E5%9B%9B%E5%BE%AA%E5%B0%8F%E8%BD%A6%E6%95%99%E7%A8%8B/%E6%96%B0%E5%86%99%E7%9A%84%E6%95%99%E7%A8%8B%E7%BB%BC%E5%90%88/3_%E4%BB%A3%E7%A0%81/HC-SR04","name":"HC-SR04"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}}}Content-Length: 208

{"jsonrpc":"2.0","id":"2","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 188

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/26","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/26","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/26","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/26","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/26","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/26","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/26","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/26","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/26","percentage":7}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/26","percentage":7}}}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":1}}Content-Length: 4639

{"id":"2","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/26","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/26","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/26","percentage":15}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/26","percentage":15}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/26","percentage":19}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/26","percentage":19}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/26","percentage":23}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/26","percentage":23}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/26","percentage":26}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/26","percentage":26}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/26","percentage":30}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/26","percentage":30}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/26","percentage":34}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/26","percentage":34}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/26","percentage":38}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/26","percentage":38}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/26","percentage":42}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/26","percentage":42}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"3","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":22,"character":41}}}
<<<
Content-Length: 269

{"id":"3","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `middleDistance`  \n\n---\nType: `int`  \nValue = `0`  \n\n---\n```cpp\nint middleDistance = 0\n```"},"range":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/26","percentage":46}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/26","percentage":46}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/26","percentage":50}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/26","percentage":50}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/26","percentage":53}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/26","percentage":53}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/26","percentage":57}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/26","percentage":57}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/26","percentage":61}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/26","percentage":61}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/26","percentage":65}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/26","percentage":65}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/26","percentage":69}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/26","percentage":69}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/26","percentage":73}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/26","percentage":73}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/26","percentage":76}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/26","percentage":76}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/26","percentage":80}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/26","percentage":84}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/26","percentage":88}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/26","percentage":92}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/26","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"4","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":59,"character":26},"end":{"line":59,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"4","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"5","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":47,"character":20}}}
<<<
Content-Length: 38

{"id":"5","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"6","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":47,"character":20},"end":{"line":47,"character":20}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"6","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"7","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":149,"character":44}}}
<<<
Content-Length: 40

{"id":"7","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"8","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":149,"character":38}}}
<<<
Content-Length: 40

{"id":"8","jsonrpc":"2.0","result":null}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":2},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":1,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":1,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/2","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/2","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/2","percentage":50}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"9","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":58,"character":25},"end":{"line":58,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"9","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"10","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":56,"character":25}}}
<<<
Content-Length: 222

{"id":"10","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `carSpeed`  \n\n---\n```cpp\n#define carSpeed 130\n```"},"range":{"end":{"character":27,"line":56},"start":{"character":19,"line":56}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"11","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":68,"character":25}}}
<<<
Content-Length: 41

{"id":"11","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"12","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":81,"character":29}}}
<<<
Content-Length: 41

{"id":"12","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"13","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":129,"character":62}}}
<<<
Content-Length: 41

{"id":"13","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"14","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":142,"character":24}}}
<<<
Content-Length: 251

{"id":"14","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `GetDistance`  \n\n---\n→ `float`  \n\n---\n```cpp\nfloat GetDistance()\n```"},"range":{"end":{"character":35,"line":142},"start":{"character":24,"line":142}}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"15","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":149,"character":33}}}
<<<
Content-Length: 251

{"id":"15","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `GetDistance`  \n\n---\n→ `float`  \n\n---\n```cpp\nfloat GetDistance()\n```"},"range":{"end":{"character":34,"line":149},"start":{"character":23,"line":149}}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"16","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":151,"character":19},"end":{"line":151,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"16","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"17","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":3}}}
<<<
Content-Length: 41

{"id":"17","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"18","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":3}}}
<<<
Content-Length: 41

{"id":"18","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"19","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":4}}}
<<<
Content-Length: 307

{"id":"19","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"kind":3,"range":{"end":{"character":18,"line":135},"start":{"character":4,"line":135}}},{"kind":2,"range":{"end":{"character":21,"line":136},"start":{"character":7,"line":136}}}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"20","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":135,"character":4},"end":{"line":135,"character":35}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"20","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"21","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":142,"character":33}}}
<<<
Content-Length: 251

{"id":"21","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `GetDistance`  \n\n---\n→ `float`  \n\n---\n```cpp\nfloat GetDistance()\n```"},"range":{"end":{"character":35,"line":142},"start":{"character":24,"line":142}}}}
>>>
Content-Length: 244

{"jsonrpc":"2.0","id":"22","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":142,"character":34}}}
<<<
Content-Length: 234

{"id":"22","jsonrpc":"2.0","result":[{"range":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}},"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"23","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":142,"character":33}}}
<<<
Content-Length: 251

{"id":"23","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `GetDistance`  \n\n---\n→ `float`  \n\n---\n```cpp\nfloat GetDistance()\n```"},"range":{"end":{"character":35,"line":142},"start":{"character":24,"line":142}}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"24","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":147,"character":27},"end":{"line":147,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"24","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"25","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":146,"character":19},"end":{"line":146,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"25","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"26","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":145,"character":27},"end":{"line":145,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"26","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"27","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":146,"character":19},"end":{"line":146,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"27","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 329

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":3},"contentChanges":[{"range":{"start":{"line":146,"character":19},"end":{"line":146,"character":19}},"text":"\r\n        "}]}}Content-Length: 209

{"jsonrpc":"2.0","id":"28","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"28","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":180},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":3}}
>>>
Content-Length: 209

{"jsonrpc":"2.0","id":"29","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"29","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":180},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 346

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":4},"contentChanges":[{"range":{"start":{"line":147,"character":8},"end":{"line":147,"character":8}},"text":"middleDistance = GetDistance();"}]}}Content-Length: 209

{"jsonrpc":"2.0","id":"30","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"30","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":180},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":4}}
>>>
Content-Length: 209

{"jsonrpc":"2.0","id":"31","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"31","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":180},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"32","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":147,"character":39},"end":{"line":147,"character":39}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"32","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"33","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":153,"character":26}}}
<<<
Content-Length: 304

{"id":"33","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### instance-method `write`  \n\n---\n→ `void`  \nParameters:  \n- `int value`\n\n---\n```cpp\n// In Servo\npublic: void write(int value)\n```"},"range":{"end":{"character":27,"line":153},"start":{"character":26,"line":153}}}}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5673

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":5},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        middleDistance = GetDistance();\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":5}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"34","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":150,"character":51}}}
<<<
Content-Length: 41

{"id":"34","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"35","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":8}}}
<<<
Content-Length: 326

{"id":"35","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### instance-method `println`  \n\n---\n→ `size_t`  \nParameters:  \n- `double`\n- `int = 2`\n\n---\n```cpp\n// In Print\npublic: size_t println(double, int = 2)\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"36","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":113,"character":9}}}
<<<
Content-Length: 263

{"id":"36","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `distance`  \n\n---\nType: `float`  \n\n---\n```cpp\n// In GetDistance\nfloat distance\n```"},"range":{"end":{"character":17,"line":113},"start":{"character":9,"line":113}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"37","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":113,"character":8}}}
<<<
Content-Length: 41

{"id":"37","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"38","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":7}}}
<<<
Content-Length: 270

{"id":"38","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"39","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":7}}}
<<<
Content-Length: 270

{"id":"39","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"40","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":3}}}
<<<
Content-Length: 270

{"id":"40","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"41","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":2}}}
<<<
Content-Length: 270

{"id":"41","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"42","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 270

{"id":"42","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}}}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"43","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 740

{"id":"43","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":51},"start":{"character":2,"line":51}}},{"kind":1,"range":{"end":{"character":8,"line":63},"start":{"character":2,"line":63}}},{"kind":1,"range":{"end":{"character":8,"line":76},"start":{"character":2,"line":76}}},{"kind":1,"range":{"end":{"character":8,"line":89},"start":{"character":2,"line":89}}},{"kind":1,"range":{"end":{"character":8,"line":95},"start":{"character":2,"line":95}}},{"kind":1,"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}},{"kind":1,"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}},{"kind":1,"range":{"end":{"character":8,"line":118},"start":{"character":2,"line":118}}}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"44","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":111,"character":29}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"44","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"45","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":112,"character":31}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"45","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":31,"line":112},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"46","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":113,"character":18}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"46","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":18,"line":113},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"47","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":112,"character":76}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"47","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":76,"line":112},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"48","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":122,"character":23},"end":{"line":122,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"48","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"49","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 270

{"id":"49","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"50","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":2}}}
<<<
Content-Length: 270

{"id":"50","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"51","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":1}}}
<<<
Content-Length: 41

{"id":"51","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"52","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":112,"character":2}}}
<<<
Content-Length: 740

{"id":"52","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":51},"start":{"character":2,"line":51}}},{"kind":1,"range":{"end":{"character":8,"line":63},"start":{"character":2,"line":63}}},{"kind":1,"range":{"end":{"character":8,"line":76},"start":{"character":2,"line":76}}},{"kind":1,"range":{"end":{"character":8,"line":89},"start":{"character":2,"line":89}}},{"kind":1,"range":{"end":{"character":8,"line":95},"start":{"character":2,"line":95}}},{"kind":1,"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}},{"kind":1,"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}},{"kind":1,"range":{"end":{"character":8,"line":118},"start":{"character":2,"line":118}}}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"53","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":112,"character":2},"end":{"line":112,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"53","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"54","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":1}}}
<<<
Content-Length: 41

{"id":"54","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"55","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 740

{"id":"55","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":51},"start":{"character":2,"line":51}}},{"kind":1,"range":{"end":{"character":8,"line":63},"start":{"character":2,"line":63}}},{"kind":1,"range":{"end":{"character":8,"line":76},"start":{"character":2,"line":76}}},{"kind":1,"range":{"end":{"character":8,"line":89},"start":{"character":2,"line":89}}},{"kind":1,"range":{"end":{"character":8,"line":95},"start":{"character":2,"line":95}}},{"kind":1,"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}},{"kind":1,"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}},{"kind":1,"range":{"end":{"character":8,"line":118},"start":{"character":2,"line":118}}}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"56","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":113,"character":18}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"56","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":18,"line":113},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"57","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":112,"character":76}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"57","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":76,"line":112},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"58","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":150,"character":50}}}
<<<
Content-Length: 41

{"id":"58","jsonrpc":"2.0","result":null}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"59","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":147,"character":39},"end":{"line":147,"character":39}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"59","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"60","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":163,"character":44}}}
<<<
Content-Length: 41

{"id":"60","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"61","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":163,"character":44}}}
<<<
Content-Length: 41

{"id":"61","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"62","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":163,"character":43}}}
<<<
Content-Length: 268

{"id":"62","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `leftDistance`  \n\n---\nType: `int`  \nValue = `0`  \n\n---\n```cpp\nint leftDistance = 0\n```"},"range":{"end":{"character":44,"line":163},"start":{"character":32,"line":163}}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"63","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":140,"character":23}}}
<<<
Content-Length: 41

{"id":"63","jsonrpc":"2.0","result":null}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5673

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":6},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        middleDistance = GetDistance();\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":2,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":2,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 316

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":7},"contentChanges":[{"range":{"start":{"line":147,"character":8},"end":{"line":147,"character":39}},"text":""}]}}Content-Length: 209

{"jsonrpc":"2.0","id":"64","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"64","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":180},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":7}}
>>>
Content-Length: 316

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":8},"contentChanges":[{"range":{"start":{"line":146,"character":19},"end":{"line":147,"character":8}},"text":""}]}}Content-Length: 209

{"jsonrpc":"2.0","id":"65","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"65","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":8}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"66","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":146,"character":19},"end":{"line":146,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"66","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"67","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":147,"character":27},"end":{"line":147,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"67","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":9},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}Content-Length: 314

{"jsonrpc":"2.0","id":"68","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":113,"character":18},"end":{"line":113,"character":18}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"68","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"69","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":117,"character":30}}}
<<<
Content-Length: 41

{"id":"69","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"70","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":100,"character":0}}}
<<<
Content-Length: 41

{"id":"70","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"71","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":100,"character":0}}}
<<<
Content-Length: 41

{"id":"71","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"72","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":100,"character":0}}}
<<<
Content-Length: 39

{"id":"72","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"73","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":100,"character":0},"end":{"line":114,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"73","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"74","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":117,"character":1}}}
<<<
Content-Length: 41

{"id":"74","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"75","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":117,"character":2}}}
<<<
Content-Length: 662

{"id":"75","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"kind":1,"range":{"end":{"character":9,"line":117},"start":{"character":2,"line":117}}},{"kind":1,"range":{"end":{"character":9,"line":129},"start":{"character":2,"line":129}}},{"kind":1,"range":{"end":{"character":15,"line":140},"start":{"character":8,"line":140}}},{"kind":1,"range":{"end":{"character":15,"line":145},"start":{"character":8,"line":145}}},{"kind":1,"range":{"end":{"character":15,"line":147},"start":{"character":8,"line":147}}},{"kind":1,"range":{"end":{"character":15,"line":152},"start":{"character":8,"line":152}}}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"76","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":117,"character":2},"end":{"line":117,"character":30}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"76","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"77","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":117,"character":30}}}
<<<
Content-Length: 41

{"id":"77","jsonrpc":"2.0","result":null}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"78","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":117,"character":2},"end":{"line":118,"character":21}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"78","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":21,"line":118},"start":{"character":2,"line":117}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"79","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":117,"character":2},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 403

{"id":"79","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":120},"start":{"character":2,"line":117}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"80","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":49,"character":20}}}
<<<
Content-Length: 212

{"id":"80","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":49},"start":{"character":20,"line":49}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"81","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":51,"character":11}}}
<<<
Content-Length: 315

{"id":"81","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### instance-method `println`  \n\n---\n→ `size_t`  \nParameters:  \n- `const char *`\n\n---\n```cpp\n// In Print\npublic: size_t println(const char[])\n```"},"range":{"end":{"character":16,"line":51},"start":{"character":9,"line":51}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"82","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":56,"character":16}}}
<<<
Content-Length: 210

{"id":"82","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `ENB`  \n\n---\n```cpp\n#define ENB 6\n```"},"range":{"end":{"character":17,"line":56},"start":{"character":14,"line":56}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"83","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":45,"character":22}}}
<<<
Content-Length: 214

{"id":"83","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":45},"start":{"character":20,"line":45}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"84","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":46,"character":20}}}
<<<
Content-Length: 212

{"id":"84","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":46},"start":{"character":20,"line":46}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"85","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":46,"character":18}}}
<<<
Content-Length: 210

{"id":"85","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `IN2`  \n\n---\n```cpp\n#define IN2 4\n```"},"range":{"end":{"character":18,"line":46},"start":{"character":15,"line":46}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"86","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":55,"character":18}}}
<<<
Content-Length: 312

{"id":"86","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `analogWrite`  \n\n---\n→ `void`  \nParameters:  \n- `uint8_t pin`\n- `int val`\n\n---\n```cpp\nvoid analogWrite(uint8_t pin, int val)\n```"},"range":{"end":{"character":18,"line":55},"start":{"character":17,"line":55}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"87","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":67,"character":18}}}
<<<
Content-Length: 312

{"id":"87","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `analogWrite`  \n\n---\n→ `void`  \nParameters:  \n- `uint8_t pin`\n- `int val`\n\n---\n```cpp\nvoid analogWrite(uint8_t pin, int val)\n```"},"range":{"end":{"character":18,"line":67},"start":{"character":17,"line":67}}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"88","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":76,"character":18}}}
<<<
Content-Length: 41

{"id":"88","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"89","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":93,"character":20}}}
<<<
Content-Length: 212

{"id":"89","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":93},"start":{"character":20,"line":93}}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"90","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"90","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"91","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"91","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"92","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"92","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"93","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"93","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"94","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":12}}}
<<<
Content-Length: 307

{"id":"94","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"kind":2,"range":{"end":{"character":25,"line":109},"start":{"character":21,"line":109}}},{"kind":2,"range":{"end":{"character":14,"line":119},"start":{"character":10,"line":119}}}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"95","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":10},"end":{"line":119,"character":14}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"95","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"96","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"96","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"97","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":118,"character":11}}}
<<<
Content-Length: 128

{"id":"97","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":14,"line":118},"start":{"character":9,"line":118}}}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"98","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":118,"character":11},"end":{"line":118,"character":11}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"98","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"99","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":12}}}
<<<
Content-Length: 314

{"id":"99","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Echo`  \n\n---\nType: `int`  \nValue = `13 (0xd)`  \nPassed as pin (converted to uint8_t)  \nPin to D13  \n\n---\n```cpp\nint Echo = 13\n```"},"range":{"end":{"character":14,"line":119},"start":{"character":10,"line":119}}}}
>>>
Content-Length: 252

{"jsonrpc":"2.0","id":"100","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":13}}}
<<<
Content-Length: 308

{"id":"100","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"kind":2,"range":{"end":{"character":25,"line":109},"start":{"character":21,"line":109}}},{"kind":2,"range":{"end":{"character":14,"line":119},"start":{"character":10,"line":119}}}]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"101","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":10},"end":{"line":119,"character":14}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"101","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"102","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":121,"character":23},"end":{"line":121,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"102","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"103","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"103","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"104","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"104","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"105","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"105","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"106","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"106","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"107","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"107","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"108","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":13}}}
<<<
Content-Length: 315

{"id":"108","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Echo`  \n\n---\nType: `int`  \nValue = `13 (0xd)`  \nPassed as pin (converted to uint8_t)  \nPin to D13  \n\n---\n```cpp\nint Echo = 13\n```"},"range":{"end":{"character":14,"line":119},"start":{"character":10,"line":119}}}}
>>>
Content-Length: 252

{"jsonrpc":"2.0","id":"109","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":13}}}
<<<
Content-Length: 308

{"id":"109","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"kind":2,"range":{"end":{"character":25,"line":109},"start":{"character":21,"line":109}}},{"kind":2,"range":{"end":{"character":14,"line":119},"start":{"character":10,"line":119}}}]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"110","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":10},"end":{"line":119,"character":14}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"110","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 245

{"jsonrpc":"2.0","id":"111","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":119,"character":13}}}
<<<
Content-Length: 232

{"id":"111","jsonrpc":"2.0","result":[{"range":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}},"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}]}
>>>
Content-Length: 245

{"jsonrpc":"2.0","id":"112","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":120,"character":16}}}
<<<
Content-Length: 241

{"id":"112","jsonrpc":"2.0","result":[{"range":{"end":{"character":14,"line":43},"start":{"character":8,"line":43}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 245

{"jsonrpc":"2.0","id":"113","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":121,"character":16}}}
<<<
Content-Length: 241

{"id":"113","jsonrpc":"2.0","result":[{"range":{"end":{"character":14,"line":43},"start":{"character":8,"line":43}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"114","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":121,"character":15}}}
<<<
Content-Length: 221

{"id":"114","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `OUTPUT`  \n\n---\n```cpp\n#define OUTPUT 0x1\n```"},"range":{"end":{"character":21,"line":121},"start":{"character":15,"line":121}}}}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5633

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":10},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":3,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":3,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"115","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":117,"character":46}}}
<<<
Content-Length: 42

{"id":"115","jsonrpc":"2.0","result":null}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"116","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"116","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"117","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"117","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"118","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"118","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"119","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":119,"character":23},"end":{"line":119,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"119","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 315

{"jsonrpc":"2.0","id":"120","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":120,"character":24},"end":{"line":120,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"120","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"121","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":123,"character":15}}}
<<<
Content-Length: 221

{"id":"121","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `OUTPUT`  \n\n---\n```cpp\n#define OUTPUT 0x1\n```"},"range":{"end":{"character":21,"line":123},"start":{"character":15,"line":123}}}}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"122","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":123,"character":12}}}
<<<
Content-Length: 213

{"id":"122","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `IN3`  \n\n---\n```cpp\n#define IN3 2\n```"},"range":{"end":{"character":13,"line":123},"start":{"character":10,"line":123}}}}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"123","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":145,"character":24}}}
<<<
Content-Length: 42

{"id":"123","jsonrpc":"2.0","result":null}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"124","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":12}}}
<<<
Content-Length: 272

{"id":"124","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `middleDistance`  \n\n---\nType: `int`  \nValue = `0`  \n\n---\n```cpp\nint middleDistance = 0\n```"},"range":{"end":{"character":18,"line":135},"start":{"character":4,"line":135}}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"125","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":1}}}
<<<
Content-Length: 42

{"id":"125","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"126","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":4}}}
<<<
Content-Length: 272

{"id":"126","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `middleDistance`  \n\n---\nType: `int`  \nValue = `0`  \n\n---\n```cpp\nint middleDistance = 0\n```"},"range":{"end":{"character":18,"line":135},"start":{"character":4,"line":135}}}}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"127","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":4}}}
<<<
Content-Length: 308

{"id":"127","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"kind":3,"range":{"end":{"character":18,"line":135},"start":{"character":4,"line":135}}},{"kind":2,"range":{"end":{"character":21,"line":136},"start":{"character":7,"line":136}}}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"128","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":135,"character":4},"end":{"line":135,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"128","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"129","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":135,"character":4},"end":{"line":135,"character":20}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"129","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"130","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":19}}}
<<<
Content-Length: 42

{"id":"130","jsonrpc":"2.0","result":null}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"131","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":135,"character":20}}}
<<<
Content-Length: 42

{"id":"131","jsonrpc":"2.0","result":null}
>>>
Content-Length: 245

{"jsonrpc":"2.0","id":"132","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":136,"character":20}}}
<<<
Content-Length: 234

{"id":"132","jsonrpc":"2.0","result":[{"range":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}},"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"133","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":131,"character":1},"end":{"line":131,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"133","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"134","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":152,"character":13}}}
<<<
Content-Length: 289

{"id":"134","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `myservo`  \n\n---\nType: `class Servo`  \ncreate servo object to control servo  \n\n---\n```cpp\nServo myservo\n```"},"range":{"end":{"character":15,"line":152},"start":{"character":8,"line":152}}}}
>>>
Content-Length: 240

{"jsonrpc":"2.0","id":"135","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":126,"character":19}}}
<<<
Content-Length: 221

{"id":"135","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `OUTPUT`  \n\n---\n```cpp\n#define OUTPUT 0x1\n```"},"range":{"end":{"character":21,"line":126},"start":{"character":15,"line":126}}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"136","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 271

{"id":"136","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `Serial`  \n\n---\nType: `class HardwareSerial`  \n\n---\n```cpp\nextern HardwareSerial Serial\n```"},"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}}}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"137","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":111,"character":2}}}
<<<
Content-Length: 741

{"id":"137","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":8,"line":51},"start":{"character":2,"line":51}}},{"kind":1,"range":{"end":{"character":8,"line":63},"start":{"character":2,"line":63}}},{"kind":1,"range":{"end":{"character":8,"line":76},"start":{"character":2,"line":76}}},{"kind":1,"range":{"end":{"character":8,"line":89},"start":{"character":2,"line":89}}},{"kind":1,"range":{"end":{"character":8,"line":95},"start":{"character":2,"line":95}}},{"kind":1,"range":{"end":{"character":8,"line":111},"start":{"character":2,"line":111}}},{"kind":1,"range":{"end":{"character":8,"line":112},"start":{"character":2,"line":112}}},{"kind":1,"range":{"end":{"character":8,"line":118},"start":{"character":2,"line":118}}}]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"138","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":111,"character":2},"end":{"line":112,"character":76}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 404

{"id":"138","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":76,"line":112},"start":{"character":2,"line":111}},"tweakID":"ExtractFunction"}],"command":"clangd.applyTweak","title":"Extract to function"},"kind":"refactor","title":"Extract to function"}]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"139","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":8,"character":14}}}
<<<
Content-Length: 42

{"id":"139","jsonrpc":"2.0","result":null}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"140","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":15}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"140","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"141","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":15}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"141","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"142","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":11,"character":26}}}
<<<
Content-Length: 40

{"id":"142","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"143","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":10,"character":0},"end":{"line":11,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"143","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"144","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":22,"character":60}}}
<<<
Content-Length: 42

{"id":"144","jsonrpc":"2.0","result":null}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"145","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":22,"character":0},"end":{"line":22,"character":60}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"145","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"146","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":71,"character":10}}}
<<<
Content-Length: 322

{"id":"146","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `digitalWrite`  \n\n---\n→ `void`  \nParameters:  \n- `uint8_t pin`\n- `uint8_t val`\n\n---\n```cpp\nvoid digitalWrite(uint8_t pin, uint8_t val)\n```"},"range":{"end":{"character":14,"line":71},"start":{"character":2,"line":71}}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"147","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":21,"character":27}}}
<<<
Content-Length: 42

{"id":"147","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"148","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":8,"character":18}}}
<<<
Content-Length: 42

{"id":"148","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"149","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":7,"character":18}}}
<<<
Content-Length: 158

{"id":"149","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### `Servo.h`  \n\n---\n```\nD:\\Arduino\\libraries\\Servo\\src\\Servo.h\n```"}}}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"150","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":18}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"150","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 192

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5633

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp","version":11},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":4,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":4,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"151","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":93,"character":54}}}
<<<
Content-Length: 42

{"id":"151","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"152","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":94,"character":52}}}
<<<
Content-Length: 42

{"id":"152","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"153","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":93,"character":51}}}
<<<
Content-Length: 42

{"id":"153","jsonrpc":"2.0","result":null}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"154","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":70,"character":26},"end":{"line":70,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"154","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"155","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":63,"character":25},"end":{"line":63,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"155","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"156","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":66,"character":0},"end":{"line":77,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"156","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"157","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":13,"character":0},"end":{"line":18,"character":17}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"157","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"158","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":55,"character":51}}}
<<<
Content-Length: 42

{"id":"158","jsonrpc":"2.0","result":null}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"159","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":55,"character":51}}}
<<<
Content-Length: 40

{"id":"159","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"160","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":55,"character":51},"end":{"line":55,"character":51}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"160","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"161","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":56,"character":51}}}
<<<
Content-Length: 40

{"id":"161","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"162","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":56,"character":51},"end":{"line":56,"character":51}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"162","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"163","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":81,"character":41}}}
<<<
Content-Length: 42

{"id":"163","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"164","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":81,"character":41}}}
<<<
Content-Length: 42

{"id":"164","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"165","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":56,"character":40}}}
<<<
Content-Length: 42

{"id":"165","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"166","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":56,"character":39}}}
<<<
Content-Length: 42

{"id":"166","jsonrpc":"2.0","result":null}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"167","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":74,"character":26},"end":{"line":74,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"167","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"168","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":26},"end":{"line":84,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"168","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"169","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":25},"end":{"line":83,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"169","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"170","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":26},"end":{"line":84,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"170","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"171","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"position":{"line":85,"character":21}}}
<<<
Content-Length: 40

{"id":"171","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"172","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":85,"character":21},"end":{"line":85,"character":21}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"172","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"173","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":86,"character":26},"end":{"line":86,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"173","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"174","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":25},"end":{"line":87,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"174","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"175","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":86,"character":26},"end":{"line":86,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"175","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"176","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":26},"end":{"line":84,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"176","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"177","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":25},"end":{"line":83,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"177","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"178","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":26},"end":{"line":84,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"178","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"179","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":86,"character":26},"end":{"line":86,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"179","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"180","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server2485183378/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":25},"end":{"line":87,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"180","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 62

{"jsonrpc":"2.0","id":"181","method":"shutdown","params":null}
<<<
Content-Length: 42

{"id":"181","jsonrpc":"2.0","result":null}
>>>
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}






Started logging.

>>>
Content-Length: 3253

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":12044,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server593460464\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch","initializationOptions":{},"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},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":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]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"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,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0068%E5%9B%9B%E5%BE%AA%E5%B0%8F%E8%BD%A6%E6%95%99%E7%A8%8B/%E6%96%B0%E5%86%99%E7%9A%84%E6%95%99%E7%A8%8B%E7%BB%BC%E5%90%88/3_%E4%BB%A3%E7%A0%81/HC-SR04","name":"HC-SR04"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}}}Content-Length: 310

{"jsonrpc":"2.0","id":"2","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":25},"end":{"line":87,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 187

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":1}}Content-Length: 38

{"id":"2","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 207

{"jsonrpc":"2.0","id":"3","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4639

{"id":"3","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/27","percentage":81}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/27","percentage":85}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/27","percentage":88}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/27","percentage":92}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"26/27","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"4","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":59,"character":26},"end":{"line":59,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"4","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"5","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":62,"character":26},"end":{"line":62,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"5","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"6","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":70,"character":26},"end":{"line":70,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"6","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"7","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":71,"character":25},"end":{"line":71,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"7","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"8","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":73,"character":25},"end":{"line":73,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"8","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"9","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":74,"character":26},"end":{"line":74,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"9","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"10","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":73,"character":25},"end":{"line":73,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"10","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"11","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":74,"character":26},"end":{"line":74,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"11","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"12","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":22}}}
<<<
Content-Length: 212

{"id":"12","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":83},"start":{"character":20,"line":83}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"13","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":23}}}
<<<
Content-Length: 1892

{"id":"13","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":14,"line":45},"start":{"character":2,"line":45}}},{"kind":1,"range":{"end":{"character":14,"line":46},"start":{"character":2,"line":46}}},{"kind":1,"range":{"end":{"character":14,"line":48},"start":{"character":2,"line":48}}},{"kind":1,"range":{"end":{"character":14,"line":49},"start":{"character":2,"line":49}}},{"kind":1,"range":{"end":{"character":14,"line":58},"start":{"character":2,"line":58}}},{"kind":1,"range":{"end":{"character":14,"line":59},"start":{"character":2,"line":59}}},{"kind":1,"range":{"end":{"character":14,"line":61},"start":{"character":2,"line":61}}},{"kind":1,"range":{"end":{"character":14,"line":62},"start":{"character":2,"line":62}}},{"kind":1,"range":{"end":{"character":14,"line":70},"start":{"character":2,"line":70}}},{"kind":1,"range":{"end":{"character":14,"line":71},"start":{"character":2,"line":71}}},{"kind":1,"range":{"end":{"character":14,"line":73},"start":{"character":2,"line":73}}},{"kind":1,"range":{"end":{"character":14,"line":74},"start":{"character":2,"line":74}}},{"kind":1,"range":{"end":{"character":14,"line":83},"start":{"character":2,"line":83}}},{"kind":1,"range":{"end":{"character":14,"line":84},"start":{"character":2,"line":84}}},{"kind":1,"range":{"end":{"character":14,"line":86},"start":{"character":2,"line":86}}},{"kind":1,"range":{"end":{"character":14,"line":87},"start":{"character":2,"line":87}}},{"kind":1,"range":{"end":{"character":14,"line":93},"start":{"character":2,"line":93}}},{"kind":1,"range":{"end":{"character":14,"line":94},"start":{"character":2,"line":94}}},{"kind":1,"range":{"end":{"character":14,"line":104},"start":{"character":2,"line":104}}},{"kind":1,"range":{"end":{"character":14,"line":106},"start":{"character":2,"line":106}}},{"kind":1,"range":{"end":{"character":14,"line":108},"start":{"character":2,"line":108}}}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"14","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":23},"end":{"line":83,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 395

{"id":"14","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":83},"start":{"character":23,"line":83}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"15","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":24}}}
<<<
Content-Length: 322

{"id":"15","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `digitalWrite`  \n\n---\n→ `void`  \nParameters:  \n- `uint8_t pin`\n- `uint8_t val`\n\n---\n```cpp\nvoid digitalWrite(uint8_t pin, uint8_t val)\n```"},"range":{"end":{"character":25,"line":83},"start":{"character":24,"line":83}}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"16","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":26}}}
<<<
Content-Length: 41

{"id":"16","jsonrpc":"2.0","result":null}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"17","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":26},"end":{"line":84,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"17","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"18","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":70,"character":23}}}
<<<
Content-Length: 214

{"id":"18","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":70},"start":{"character":20,"line":70}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"19","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":70,"character":23}}}
<<<
Content-Length: 39

{"id":"19","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"20","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":70,"character":20},"end":{"line":70,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 788

{"id":"20","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":70},"start":{"character":20,"line":70}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":70},"start":{"character":20,"line":70}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"21","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":71,"character":22}}}
<<<
Content-Length: 39

{"id":"21","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"22","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":71,"character":22}}}
<<<
Content-Length: 240

{"id":"22","jsonrpc":"2.0","result":[{"range":{"end":{"character":11,"line":40},"start":{"character":8,"line":40}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"23","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":71,"character":20},"end":{"line":71,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 786

{"id":"23","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":71},"start":{"character":20,"line":71}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":71},"start":{"character":20,"line":71}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"24","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"24","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 318

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":2},"contentChanges":[{"range":{"start":{"line":71,"character":20},"end":{"line":71,"character":23}},"text":"HIGH"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"25","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"25","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":2}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"26","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":71,"character":24},"end":{"line":71,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 397

{"id":"26","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":71},"start":{"character":24,"line":71}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"27","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":74,"character":23}}}
<<<
Content-Length: 214

{"id":"27","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":74},"start":{"character":20,"line":74}}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"28","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":73,"character":22}}}
<<<
Content-Length: 212

{"id":"28","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":73},"start":{"character":20,"line":73}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"29","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":73,"character":22}}}
<<<
Content-Length: 39

{"id":"29","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"30","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":73,"character":22}}}
<<<
Content-Length: 240

{"id":"30","jsonrpc":"2.0","result":[{"range":{"end":{"character":11,"line":40},"start":{"character":8,"line":40}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"31","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":73,"character":20},"end":{"line":73,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 786

{"id":"31","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":73},"start":{"character":20,"line":73}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":73},"start":{"character":20,"line":73}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"32","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":70,"character":23}}}
<<<
Content-Length: 214

{"id":"32","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":70},"start":{"character":20,"line":70}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"33","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":70,"character":23}}}
<<<
Content-Length: 39

{"id":"33","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"34","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":70,"character":23}}}
<<<
Content-Length: 240

{"id":"34","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"35","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"35","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 317

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":3},"contentChanges":[{"range":{"start":{"line":70,"character":20},"end":{"line":70,"character":24}},"text":"LOW"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"36","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"36","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":3}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"37","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":70,"character":23},"end":{"line":70,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 395

{"id":"37","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":70},"start":{"character":23,"line":70}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"38","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":74,"character":25}}}
<<<
Content-Length: 322

{"id":"38","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### function `digitalWrite`  \n\n---\n→ `void`  \nParameters:  \n- `uint8_t pin`\n- `uint8_t val`\n\n---\n```cpp\nvoid digitalWrite(uint8_t pin, uint8_t val)\n```"},"range":{"end":{"character":26,"line":74},"start":{"character":25,"line":74}}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"39","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":74,"character":22}}}
<<<
Content-Length: 214

{"id":"39","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":74},"start":{"character":20,"line":74}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"40","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":74,"character":22}}}
<<<
Content-Length: 39

{"id":"40","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"41","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":74,"character":22}}}
<<<
Content-Length: 240

{"id":"41","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"42","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"42","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 317

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":4},"contentChanges":[{"range":{"start":{"line":74,"character":20},"end":{"line":74,"character":24}},"text":"LOW"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"43","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"43","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":4}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"44","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":74,"character":23},"end":{"line":74,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 395

{"id":"44","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":74},"start":{"character":23,"line":74}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"}]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"45","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":71,"character":23}}}
<<<
Content-Length: 39

{"id":"45","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"46","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":71,"character":23}}}
<<<
Content-Length: 240

{"id":"46","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"47","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":71,"character":20},"end":{"line":71,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 788

{"id":"47","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":71},"start":{"character":20,"line":71}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":71},"start":{"character":20,"line":71}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"48","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":73,"character":22}}}
<<<
Content-Length: 39

{"id":"48","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"49","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":73,"character":22}}}
<<<
Content-Length: 240

{"id":"49","jsonrpc":"2.0","result":[{"range":{"end":{"character":11,"line":40},"start":{"character":8,"line":40}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"50","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"50","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 318

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":5},"contentChanges":[{"range":{"start":{"line":73,"character":20},"end":{"line":73,"character":23}},"text":"HIGH"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"51","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 111

{"id":1,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":1,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}Content-Length: 4640

{"id":"51","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":5}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"52","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":73,"character":24},"end":{"line":73,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 397

{"id":"52","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":73},"start":{"character":24,"line":73}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"53","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":73,"character":26},"end":{"line":73,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"53","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5631

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":6},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}Content-Length: 237

{"jsonrpc":"2.0","id":"54","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":22}}}
<<<
Content-Length: 214

{"id":"54","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"55","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":22}}}
<<<
Content-Length: 39

{"id":"55","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"56","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":20},"end":{"line":84,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 788

{"id":"56","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"57","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":21}}}
<<<
Content-Length: 39

{"id":"57","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"58","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"58","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 318

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":7},"contentChanges":[{"range":{"start":{"line":83,"character":20},"end":{"line":83,"character":23}},"text":"HIGH"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"59","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 111

{"id":2,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":2,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}Content-Length: 4640

{"id":"59","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 214

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":7}}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"60","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":22}}}
<<<
Content-Length: 240

{"id":"60","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"61","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":24},"end":{"line":83,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 397

{"id":"61","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":83},"start":{"character":24,"line":83}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"62","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":22}}}
<<<
Content-Length: 212

{"id":"62","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"63","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":22}}}
<<<
Content-Length: 214

{"id":"63","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":86},"start":{"character":20,"line":86}}}}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":8},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}Content-Length: 237

{"jsonrpc":"2.0","id":"64","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":22}}}
<<<
Content-Length: 212

{"id":"64","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"65","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":22}}}
<<<
Content-Length: 39

{"id":"65","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"66","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":22}}}
<<<
Content-Length: 240

{"id":"66","jsonrpc":"2.0","result":[{"range":{"end":{"character":11,"line":40},"start":{"character":8,"line":40}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"67","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":20},"end":{"line":87,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 786

{"id":"67","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":9},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, HIGH);\n   //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}Content-Length: 237

{"jsonrpc":"2.0","id":"68","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":23}}}
<<<
Content-Length: 111

{"id":3,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":3,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 214

{"id":"68","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"69","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":23}}}
<<<
Content-Length: 39

{"id":"69","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"70","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":23}}}
<<<
Content-Length: 240

{"id":"70","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"71","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":20},"end":{"line":84,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 788

{"id":"71","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":84},"start":{"character":20,"line":84}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"72","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":24}}}
<<<
Content-Length: 240

{"id":"72","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"73","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":23}}}
<<<
Content-Length: 214

{"id":"73","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `HIGH`  \n\n---\n```cpp\n#define HIGH 0x1\n```"},"range":{"end":{"character":24,"line":86},"start":{"character":20,"line":86}}}}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"74","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"74","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 318

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":10},"contentChanges":[{"range":{"start":{"line":84,"character":20},"end":{"line":84,"character":24}},"text":"LOW"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"75","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"75","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":10}}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"76","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":23}}}
<<<
Content-Length: 240

{"id":"76","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"77","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":84,"character":23},"end":{"line":84,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 395

{"id":"77","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":84},"start":{"character":23,"line":84}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"}]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"78","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":23}}}
<<<
Content-Length: 39

{"id":"78","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"79","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":86,"character":24}}}
<<<
Content-Length: 240

{"id":"79","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"80","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"80","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 318

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":11},"contentChanges":[{"range":{"start":{"line":86,"character":20},"end":{"line":86,"character":24}},"text":"LOW"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"81","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"81","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":11}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"82","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":86,"character":23},"end":{"line":86,"character":23}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 395

{"id":"82","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":23,"line":86},"start":{"character":23,"line":86}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'LOW'"},"kind":"refactor","title":"Expand macro 'LOW'"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"83","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":84,"character":22}}}
<<<
Content-Length: 212

{"id":"83","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":84},"start":{"character":20,"line":84}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"84","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":22}}}
<<<
Content-Length: 39

{"id":"84","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"85","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":83,"character":22}}}
<<<
Content-Length: 240

{"id":"85","jsonrpc":"2.0","result":[{"range":{"end":{"character":12,"line":39},"start":{"character":8,"line":39}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"86","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":20},"end":{"line":83,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 788

{"id":"86","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":83},"start":{"character":20,"line":83}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"},{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":83},"start":{"character":20,"line":83}},"tweakID":"ExtractVariable"}],"command":"clangd.applyTweak","title":"Extract subexpression to variable"},"kind":"refactor","title":"Extract subexpression to variable"}]}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"87","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":23}}}
<<<
Content-Length: 212

{"id":"87","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"88","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":22}}}
<<<
Content-Length: 212

{"id":"88","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `LOW`  \n\n---\n```cpp\n#define LOW 0x0\n```"},"range":{"end":{"character":23,"line":87},"start":{"character":20,"line":87}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"89","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":23}}}
<<<
Content-Length: 1892

{"id":"89","jsonrpc":"2.0","result":[{"kind":1,"range":{"end":{"character":14,"line":45},"start":{"character":2,"line":45}}},{"kind":1,"range":{"end":{"character":14,"line":46},"start":{"character":2,"line":46}}},{"kind":1,"range":{"end":{"character":14,"line":48},"start":{"character":2,"line":48}}},{"kind":1,"range":{"end":{"character":14,"line":49},"start":{"character":2,"line":49}}},{"kind":1,"range":{"end":{"character":14,"line":58},"start":{"character":2,"line":58}}},{"kind":1,"range":{"end":{"character":14,"line":59},"start":{"character":2,"line":59}}},{"kind":1,"range":{"end":{"character":14,"line":61},"start":{"character":2,"line":61}}},{"kind":1,"range":{"end":{"character":14,"line":62},"start":{"character":2,"line":62}}},{"kind":1,"range":{"end":{"character":14,"line":70},"start":{"character":2,"line":70}}},{"kind":1,"range":{"end":{"character":14,"line":71},"start":{"character":2,"line":71}}},{"kind":1,"range":{"end":{"character":14,"line":73},"start":{"character":2,"line":73}}},{"kind":1,"range":{"end":{"character":14,"line":74},"start":{"character":2,"line":74}}},{"kind":1,"range":{"end":{"character":14,"line":83},"start":{"character":2,"line":83}}},{"kind":1,"range":{"end":{"character":14,"line":84},"start":{"character":2,"line":84}}},{"kind":1,"range":{"end":{"character":14,"line":86},"start":{"character":2,"line":86}}},{"kind":1,"range":{"end":{"character":14,"line":87},"start":{"character":2,"line":87}}},{"kind":1,"range":{"end":{"character":14,"line":93},"start":{"character":2,"line":93}}},{"kind":1,"range":{"end":{"character":14,"line":94},"start":{"character":2,"line":94}}},{"kind":1,"range":{"end":{"character":14,"line":104},"start":{"character":2,"line":104}}},{"kind":1,"range":{"end":{"character":14,"line":106},"start":{"character":2,"line":106}}},{"kind":1,"range":{"end":{"character":14,"line":108},"start":{"character":2,"line":108}}}]}
>>>
Content-Length: 242

{"jsonrpc":"2.0","id":"90","method":"textDocument/definition","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":87,"character":23}}}
<<<
Content-Length: 240

{"id":"90","jsonrpc":"2.0","result":[{"range":{"end":{"character":11,"line":40},"start":{"character":8,"line":40}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino/Arduino.h"}]}
>>>
Content-Length: 208

{"jsonrpc":"2.0","id":"91","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"91","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}
>>>
Content-Length: 319

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":12},"contentChanges":[{"range":{"start":{"line":87,"character":20},"end":{"line":87,"character":23}},"text":"HIGH"}]}}Content-Length: 208

{"jsonrpc":"2.0","id":"92","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 4640

{"id":"92","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":12}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"93","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":24},"end":{"line":87,"character":24}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 397

{"id":"93","jsonrpc":"2.0","result":[{"command":{"arguments":[{"file":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","selection":{"end":{"character":24,"line":87},"start":{"character":24,"line":87}},"tweakID":"ExpandMacro"}],"command":"clangd.applyTweak","title":"Expand macro 'HIGH'"},"kind":"refactor","title":"Expand macro 'HIGH'"}]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"94","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":26},"end":{"line":87,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"94","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":13},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":4,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":4,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 237

{"jsonrpc":"2.0","id":"95","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":80,"character":34}}}
<<<
Content-Length: 41

{"id":"95","jsonrpc":"2.0","result":null}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":14},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":5,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":5,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":15},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":6,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":6,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"96","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":104,"character":37}}}
<<<
Content-Length: 41

{"id":"96","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"97","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":142,"character":42}}}
<<<
Content-Length: 41

{"id":"97","jsonrpc":"2.0","result":null}
>>>
Content-Length: 313

{"jsonrpc":"2.0","id":"98","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":152,"character":27},"end":{"line":152,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"98","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":16},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":7,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":7,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"99","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":149,"character":45}}}
<<<
Content-Length: 41

{"id":"99","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"100","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":147,"character":26}}}
<<<
Content-Length: 305

{"id":"100","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### instance-method `write`  \n\n---\n→ `void`  \nParameters:  \n- `int value`\n\n---\n```cpp\n// In Servo\npublic: void write(int value)\n```"},"range":{"end":{"character":27,"line":147},"start":{"character":26,"line":147}}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"101","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":147,"character":27},"end":{"line":147,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"101","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":17},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":8,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":8,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"102","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":148,"character":19},"end":{"line":148,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"102","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"103","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":146,"character":19},"end":{"line":146,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"103","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 191

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"}}}Content-Length: 5632

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp","version":18},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":9,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":9,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"104","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":145,"character":27},"end":{"line":145,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"104","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"105","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":145,"character":27},"end":{"line":145,"character":27}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"105","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 314

{"jsonrpc":"2.0","id":"106","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":144,"character":19},"end":{"line":144,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"106","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"107","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":149,"character":37}}}
<<<
Content-Length: 42

{"id":"107","jsonrpc":"2.0","result":null}
>>>
Content-Length: 239

{"jsonrpc":"2.0","id":"108","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":104,"character":31}}}
<<<
Content-Length: 42

{"id":"108","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"109","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":80,"character":34}}}
<<<
Content-Length: 42

{"id":"109","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"110","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":80,"character":34}}}
<<<
Content-Length: 42

{"id":"110","jsonrpc":"2.0","result":null}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"111","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":83,"character":26},"end":{"line":83,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"111","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"112","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":87,"character":26},"end":{"line":87,"character":26}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"112","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"113","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":81,"character":39}}}
<<<
Content-Length: 42

{"id":"113","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"114","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":81,"character":39}}}
<<<
Content-Length: 42

{"id":"114","jsonrpc":"2.0","result":null}
>>>
Content-Length: 238

{"jsonrpc":"2.0","id":"115","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"position":{"line":67,"character":17}}}
<<<
Content-Length: 211

{"id":"115","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### macro `ENA`  \n\n---\n```cpp\n#define ENA 5\n```"},"range":{"end":{"character":17,"line":67},"start":{"character":14,"line":67}}}}
>>>
Content-Length: 312

{"jsonrpc":"2.0","id":"116","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":61,"character":25},"end":{"line":61,"character":25}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"116","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 310

{"jsonrpc":"2.0","id":"117","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server593460464/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":2,"character":0},"end":{"line":180,"character":0}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 40

{"id":"117","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 62

{"jsonrpc":"2.0","id":"118","method":"shutdown","params":null}
<<<
Content-Length: 42

{"id":"118","jsonrpc":"2.0","result":null}
>>>
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}






Started logging.

>>>
Content-Length: 3254

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":8148,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server3462225707\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server3462225707/sketch","initializationOptions":{},"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},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":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]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"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,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0068%E5%9B%9B%E5%BE%AA%E5%B0%8F%E8%BD%A6%E6%95%99%E7%A8%8B/%E6%96%B0%E5%86%99%E7%9A%84%E6%95%99%E7%A8%8B%E7%BB%BC%E5%90%88/3_%E4%BB%A3%E7%A0%81/HC-SR04","name":"HC-SR04"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server3462225707/sketch/HC-SR04.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}}}Content-Length: 208

{"jsonrpc":"2.0","id":"2","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server3462225707/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 188

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server3462225707/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server3462225707/sketch/HC-SR04.ino.cpp","version":1}}Content-Length: 4639

{"id":"2","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}






Started logging.

>>>
Content-Length: 3255

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":23240,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server1459306113\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server1459306113/sketch","initializationOptions":{},"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},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":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]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"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,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0068%E5%9B%9B%E5%BE%AA%E5%B0%8F%E8%BD%A6%E6%95%99%E7%A8%8B/%E6%96%B0%E5%86%99%E7%9A%84%E6%95%99%E7%A8%8B%E7%BB%BC%E5%90%88/3_%E4%BB%A3%E7%A0%81/HC-SR04","name":"HC-SR04"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server1459306113/sketch/HC-SR04.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}}}Content-Length: 208

{"jsonrpc":"2.0","id":"2","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server1459306113/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 188

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server1459306113/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server1459306113/sketch/HC-SR04.ino.cpp","version":1}}Content-Length: 4639

{"id":"2","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/27","percentage":81}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/27","percentage":85}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/27","percentage":88}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/27","percentage":92}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"26/27","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/27","percentage":81}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/27","percentage":85}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/27","percentage":88}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/27","percentage":92}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"26/27","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 60

{"jsonrpc":"2.0","id":"3","method":"shutdown","params":null}
<<<
Content-Length: 40

{"id":"3","jsonrpc":"2.0","result":null}
>>>
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}
>>>
Content-Length: 60

{"jsonrpc":"2.0","id":"3","method":"shutdown","params":null}
<<<
Content-Length: 40

{"id":"3","jsonrpc":"2.0","result":null}
>>>
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}






Started logging.

>>>
Content-Length: 3255

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":15940,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server4081114564\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch","initializationOptions":{},"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},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":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]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"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,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0068%E5%9B%9B%E5%BE%AA%E5%B0%8F%E8%BD%A6%E6%95%99%E7%A8%8B/%E6%96%B0%E5%86%99%E7%9A%84%E6%95%99%E7%A8%8B%E7%BB%BC%E5%90%88/3_%E4%BB%A3%E7%A0%81/HC-SR04","name":"HC-SR04"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\n/*************************************\n *     TIME:2022.6.25\n *     Development Team: Zhiyi Technology Co., Ltd.\n * \n *  **************************************/\n#include \u003cServo.h\u003e  //servo library\nServo myservo;      // create servo object to control servo\n\nint Trig = 12;//Pin to D12  \nint Echo = 13;//Pin to D13\n\n#define ENA  5 \n#define ENB  6       \n#define IN1  3      \n#define IN2  4    \n#define IN3  2    \n#define IN4  7   \n\n\n#define carSpeed 130//Set the carSpeed to 160\nint rightDistance = 0, leftDistance = 0, middleDistance = 0;\n\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward();\n#line 36 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid back();\n#line 48 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid left();\n#line 61 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid right();\n#line 74 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid stop();\n#line 82 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nfloat GetDistance();\n#line 98 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid setup();\n#line 115 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid loop();\n#line 23 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0068四循小车教程\\\\新写的教程综合\\\\3_代码\\\\HC-SR04\\\\HC-SR04.ino\"\nvoid forward(){//forward function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The right forward\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n  //The left forward\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Forward\");\n}\n\nvoid back() {//back function\n  analogWrite(ENA, carSpeed);//Set the speed of ENA\n  analogWrite(ENB, carSpeed);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n  Serial.println(\"Back\");\n}\n\nvoid left() {//left function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n   //The right forward\n  digitalWrite(IN1, LOW);\n  digitalWrite(IN2, HIGH);\n  //The left back\n  digitalWrite(IN3, HIGH);\n  digitalWrite(IN4, LOW);\n\n  Serial.println(\"Left\");\n}\n\nvoid right() {//right function\n  analogWrite(ENA, 200);//Set the speed of ENA\n  analogWrite(ENB, 200);//Set the speed of ENB\n  //The rihgt back\n  digitalWrite(IN1, HIGH);\n  digitalWrite(IN2, LOW);\n   //The left forward\n  digitalWrite(IN3, LOW);\n  digitalWrite(IN4, HIGH);\n\n  Serial.println(\"Right\");\n}\n\nvoid stop() {//stop function\n  digitalWrite(ENA, LOW);//Set the speed of ENA to low \n  digitalWrite(ENB, LOW);//Set the speed of ENB to low\n  Serial.println(\"Stop!\");\n}\n\n\n\nfloat GetDistance()\n{\n  float distance;\n  // Send a low short pulse to Trig to trigger the ranging\n  digitalWrite(Trig, LOW); //Send a low level to Trig\n  delayMicroseconds(2); \n  digitalWrite(Trig, HIGH); \n  delayMicroseconds(10);\n  digitalWrite(Trig, LOW);\n  distance = pulseIn(Echo, HIGH) / 58.00;\n    \n  Serial.print(\"Distance = \");\n  Serial.println(distance);//The serial output distance is converted into cm\n  return distance;\n}\n\nvoid setup() {\n  myservo.attach(A0,700,2400);  // attach servo on pin 3 to servo object\n  Serial.begin(9600);\n  pinMode(Echo, INPUT);\n  pinMode(Trig, OUTPUT);\n  pinMode(IN1, OUTPUT);\n  pinMode(IN2, OUTPUT);\n  pinMode(IN3, OUTPUT);\n  pinMode(IN4, OUTPUT);\n  pinMode(ENA, OUTPUT);\n  pinMode(ENB, OUTPUT);\n\n  stop();\n  myservo.write(100);  //setservo position according to scaled value\n    delay(100);\n}\n\nvoid loop() \n{\n    middleDistance = GetDistance();//getDistance();\n    if(middleDistance \u003c= 18) \n    {\n        stop();\n        delay(500);\n        myservo.write(10);\n        delay(500);\n        rightDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n        myservo.write(180);\n        delay(500);\n        leftDistance = GetDistance();//getDistance();\n\n        delay(500);\n        myservo.write(100);\n        delay(500);\n     \n        if(rightDistance \u003e leftDistance) \n        {\n            back();\n            delay(300);\n            right(); \n            delay(300);\n        }\n        else if(rightDistance \u003c leftDistance) \n        {\n            back();\n            delay(300);\n            left(); \n            delay(300);\n        }\n        \n        else \n        {\n            forward();\n        }\n    }\n    else \n    {\n        forward();\n    }\n}\n\n"}}}Content-Length: 208

{"jsonrpc":"2.0","id":"2","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp"}}}
<<<
Content-Length: 188

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/27","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/27","percentage":3}}}Content-Length: 215

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp","version":1}}Content-Length: 4639

{"id":"2","jsonrpc":"2.0","result":[{"detail":"Servo","kind":13,"name":"myservo","range":{"end":{"character":13,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":13,"line":8},"start":{"character":6,"line":8}}},{"detail":"int","kind":13,"name":"Trig","range":{"end":{"character":13,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":8,"line":10},"start":{"character":4,"line":10}}},{"detail":"int","kind":13,"name":"Echo","range":{"end":{"character":13,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":8,"line":11},"start":{"character":4,"line":11}}},{"detail":"int","kind":13,"name":"rightDistance","range":{"end":{"character":21,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":17,"line":22},"start":{"character":4,"line":22}}},{"detail":"int","kind":13,"name":"leftDistance","range":{"end":{"character":39,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":35,"line":22},"start":{"character":23,"line":22}}},{"detail":"int","kind":13,"name":"middleDistance","range":{"end":{"character":59,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":55,"line":22},"start":{"character":41,"line":22}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":14,"line":25},"start":{"character":0,"line":25}},"selectionRange":{"end":{"character":12,"line":25},"start":{"character":5,"line":25}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":11,"line":27},"start":{"character":0,"line":27}},"selectionRange":{"end":{"character":9,"line":27},"start":{"character":5,"line":27}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":11,"line":29},"start":{"character":0,"line":29}},"selectionRange":{"end":{"character":9,"line":29},"start":{"character":5,"line":29}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":12,"line":31},"start":{"character":0,"line":31}},"selectionRange":{"end":{"character":10,"line":31},"start":{"character":5,"line":31}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":11,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":9,"line":33},"start":{"character":5,"line":33}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":19,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":17,"line":35},"start":{"character":6,"line":35}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":37},"start":{"character":0,"line":37}},"selectionRange":{"end":{"character":10,"line":37},"start":{"character":5,"line":37}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":39},"start":{"character":0,"line":39}},"selectionRange":{"end":{"character":9,"line":39},"start":{"character":5,"line":39}}},{"detail":"void ()","kind":12,"name":"forward","range":{"end":{"character":1,"line":52},"start":{"character":0,"line":41}},"selectionRange":{"end":{"character":12,"line":41},"start":{"character":5,"line":41}}},{"detail":"void ()","kind":12,"name":"back","range":{"end":{"character":1,"line":64},"start":{"character":0,"line":54}},"selectionRange":{"end":{"character":9,"line":54},"start":{"character":5,"line":54}}},{"detail":"void ()","kind":12,"name":"left","range":{"end":{"character":1,"line":77},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"right","range":{"end":{"character":1,"line":90},"start":{"character":0,"line":79}},"selectionRange":{"end":{"character":10,"line":79},"start":{"character":5,"line":79}}},{"detail":"void ()","kind":12,"name":"stop","range":{"end":{"character":1,"line":96},"start":{"character":0,"line":92}},"selectionRange":{"end":{"character":9,"line":92},"start":{"character":5,"line":92}}},{"detail":"float ()","kind":12,"name":"GetDistance","range":{"end":{"character":1,"line":114},"start":{"character":0,"line":100}},"selectionRange":{"end":{"character":17,"line":100},"start":{"character":6,"line":100}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":131},"start":{"character":0,"line":116}},"selectionRange":{"end":{"character":10,"line":116},"start":{"character":5,"line":116}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":179},"start":{"character":0,"line":133}},"selectionRange":{"end":{"character":9,"line":133},"start":{"character":5,"line":133}}}]}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/27","percentage":7}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/27","percentage":11}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/27","percentage":14}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/27","percentage":18}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/27","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/27","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/27","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/27","percentage":33}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/27","percentage":37}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/27","percentage":40}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/27","percentage":44}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/27","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/27","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/27","percentage":55}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/27","percentage":59}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/27","percentage":62}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/27","percentage":66}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/27","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/27","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/27","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/27","percentage":81}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/27","percentage":85}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/27","percentage":88}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/27","percentage":92}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"26/27","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"3","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":114,"character":1},"end":{"line":114,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"3","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"4","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":114,"character":1},"end":{"line":114,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"4","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 311

{"jsonrpc":"2.0","id":"5","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server4081114564/sketch/HC-SR04.ino.cpp"},"range":{"start":{"line":114,"character":1},"end":{"line":114,"character":1}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"5","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 60

{"jsonrpc":"2.0","id":"6","method":"shutdown","params":null}
<<<
Content-Length: 40

{"id":"6","jsonrpc":"2.0","result":null}
>>>
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}