{"product_id":"tenstar-robot-esp32-c3-development-board-esp32-c3-supermini-wifi-bluetooth","title":"TENSTAR ROBOT ESP32-C3 Development Board ESP32 C3 SuperMini WiFi Bluetooth","description":"\u003ch1\u003eSPECIFICATIONS\u003c\/h1\u003e\u003cp\u003e\u003cspan\u003eBrand Name\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eTENSTAR ROBOT\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eChoice\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eyes\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eCondition\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eNew\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eDissipation Power\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eSuperMini Development Board\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eHigh-concerned chemical\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003enone\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eOperating Temperature\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e1\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eOrigin\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eMainland China\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003ePackage\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eSOP\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eSupply Voltage\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e1\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eType\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eVoltage Regulator\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003eis_customized\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eYes\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003ckse:widget data-widget-type=\"customText\" id=\"1005000006502814\" type=\"relation\"\u003e\u003c\/kse:widget\u003e\u003c\/p\u003e\u003cdiv class=\"detailmodule_html\"\u003e\u003cdiv class=\"detail-desc-decorate-richtext\"\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S9ba6e7c62e9f47d58eb8d6f2048f44197.jpg\" slate-data-type=\"image\"\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S1e7781a22105441b95aee17157d134fd0.jpg\" slate-data-type=\"image\"\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S82a442b28a384cd780880998c58fb077q.jpg\" slate-data-type=\"image\"\u003e\n\u003c\/div\u003e\n\u003cdiv\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S1033917e5c1b4d7eb4f42068203b9e8ct.jpg\" slate-data-type=\"image\"\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \"WiFi.h\"\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid setup()\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.begin(115200);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ Set WiFi to station mode and disconnect from an AP if it was previously connected\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eWiFi.mode(WIFI_STA);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eWiFi.disconnect();\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(100);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"Setup done\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid loop()\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"scan start\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ WiFi.scanNetworks will return the number of networks found\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eint n = WiFi.scanNetworks();\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"scan done\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eif (n == 0) {\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"no networks found\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e} else {\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(n);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\" networks found\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003efor (int i = 0; i \u0026lt; n; ++i) {\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ Print SSID and RSSI for each network found\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(i + 1);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\": \");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(WiFi.SSID(i));\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\" (\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(WiFi.RSSI(i));\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\")\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?\" \":\"*\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(10);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ Wait a bit before scanning again\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(5000);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\n\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003cbr\u003e\n\u003c\/div\u003e\n\u003cdiv style='font-family:\"font-size:14px;font-weight:400;letter-spacing:normal;text-align:start;white-space:normal;color:rgb(34, 34, 34);margin:0px;padding:0px;box-sizing:border-box;padding:0px;margin:0px;text-align:start;\";text-align:start' align=\"start\"\u003e\u003cdiv style=\"margin:0px;margin-bottom:0px;margin-top:0px;margin-left:0px;margin-right:0px;padding:0px;padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;overflow:hidden;position:relative;box-sizing:border-box\" class=\"extend--content--DlnAngg\"\u003e\u003cdiv style=\"margin:0px;margin-bottom:0px;margin-top:0px;margin-left:0px;margin-right:0px;padding:0px;padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;box-sizing:border-box\"\u003e\u003cdiv id=\"product-description\" style=\"margin:0px;margin-bottom:0px;margin-top:0px;margin-left:0px;margin-right:0px;padding:0px;padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;max-width:944px;overflow:hidden;position:relative;box-sizing:border-box\" class=\"description--product-description--nxRv0lW\"\u003e\u003cdiv style=\"margin:0px;margin-bottom:0px;margin-top:0px;margin-left:0px;margin-right:0px;padding:0px;padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;box-sizing:border-box\" class=\"description--origin-part--SsZJoGC\"\u003e\u003cdiv style=\"margin:0px;margin-bottom:0px;margin-top:0px;margin-left:0px;margin-right:0px;padding:0px;padding-bottom:0px;padding-top:0px;padding-left:0px;padding-right:0px;box-sizing:content-box\" class=\"detailmodule_html\"\u003e\u003cdiv class=\"detail-desc-decorate-richtext\"\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/Sfbc318f4722043babd547f5a3de12a8bB.jpg\" slate-data-type=\"image\"\u003e\u003cbr\u003e\n\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;WiFi.h\u0026gt;\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003econst char* ssid     = \"your-ssid\"; \/\/your WiFi Name\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003econst char* password = \"your-password\";   \/\/your WiFi password\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid setup()\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.begin(115200);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(10);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ We start by connecting to a WiFi network\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println();\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println();\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Connecting to \");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(ssid);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eWiFi.begin(ssid, password);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003ewhile (WiFi.status() != WL_CONNECTED) {\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(500);\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\".\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e \u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"WiFi connected\");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"IP address: \");\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.localIP());\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid loop()\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/div\u003e\n\u003cdiv\u003e\n\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003cbr\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S1de17568173e44b0bfa4db0063e73b3ee.jpg\" slate-data-type=\"image\"\u003e\u003cbr\u003e\u003c\/p\u003e\n\u003c\/div\u003e\u003c\/div\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \"WiFi.h\"\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid setup()\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.begin(115200);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eWiFi.softAP(\"ESP_AP\", \"123456789\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid loop()\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e{\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host Name:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPgetHostname());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host IP:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPIP());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host IPV6:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPIPv6());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host SSID:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.SSID());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host Broadcast IP:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPBroadcastIP());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host mac Address:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPmacAddress());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Number of Host Connections:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPgetStationNum());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host Network ID:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.softAPNetworkID());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Host Status:\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(WiFi.status());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(1000);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/Se1fcd1a070224cdbac3b4a6c719f8a58u.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S9e96c7ffd79840efb86abdfb151de8c52.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEDevice.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEUtils.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEScan.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEAdvertisedDevice.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eint scanTime = 5; \/\/In seconds\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEScan* pBLEScan;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eclass MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid onResult(BLEAdvertisedDevice advertisedDevice) {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.printf(\"Advertised Device: %s \\n\", advertisedDevice.toString().c_str());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e};\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid setup() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.begin(115200);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"Scanning...\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEDevice::init(\"\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan = BLEDevice::getScan(); \/\/create new scan\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan-\u0026gt;setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan-\u0026gt;setActiveScan(true); \/\/active scan uses more power, but get results faster\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan-\u0026gt;setInterval(100);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan-\u0026gt;setWindow(99);  \/\/ less or equal setInterval value\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid loop() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ put your main code here, to run repeatedly:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEScanResults foundDevices = pBLEScan-\u0026gt;start(scanTime, false);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"Devices found: \");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(foundDevices.getCount());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"Scan done!\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epBLEScan-\u0026gt;clearResults();   \/\/ delete results fromBLEScan buffer to release memory\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(2000);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S871efc7389414c92b5824b5dbfc12145O.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEDevice.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEUtils.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#include \u0026lt;BLEServer.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ See the following for generating UUIDs:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ https:\/\/www.uuidgenerator.net\/\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#define SERVICE_UUID        \"4fafc201-1fb5-459e-8fcc-c5c9c331914b\"\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e#define CHARACTERISTIC_UUID \"beb5483e-36e1-4688-b7f5-ea07361b26a8\"\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eclass MyCallbacks: public BLECharacteristicCallbacks {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid onWrite(BLECharacteristic *pCharacteristic) {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003estd::string value = pCharacteristic-\u0026gt;getValue();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eif (value.length() \u0026gt; 0) {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"*********\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(\"New value: \");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003efor (int i = 0; i \u0026lt; value.length(); i++)\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.print(value[i]);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.println(\"*********\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e};\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid setup() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eSerial.begin(115200);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEDevice::init(\"MyESP32\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEServer *pServer = BLEDevice::createServer();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEService *pService = pServer-\u0026gt;createService(SERVICE_UUID);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLECharacteristic *pCharacteristic = pService-\u0026gt;createCharacteristic(\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eCHARACTERISTIC_UUID,\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLECharacteristic::PROPERTY_READ |\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLECharacteristic::PROPERTY_WRITE\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epCharacteristic-\u0026gt;setCallbacks(new MyCallbacks());\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epCharacteristic-\u0026gt;setValue(\"Hello World\");\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epService-\u0026gt;start();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003eBLEAdvertising *pAdvertising = pServer-\u0026gt;getAdvertising();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003epAdvertising-\u0026gt;start();\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003evoid loop() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e\/\/ put your main code here, to run repeatedly:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003edelay(2000);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21);font-size:14px\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S296535f96de14f038eda025d6cb64b80B.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/S2b5d401f3595462b83be4b5f54735f4bY.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(250, 40, 255);font-size:24px\"\u003e\u003cstrong\u003eDigital pin\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"font-size:16px\"\u003eUpload the code to the board, and the on-board LED will light up every second.\u003c\/span\u003e\u003c\/strong\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ define led according to pin diagram\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003eint led = 8;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid setup() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ initialize digital pin led as an output\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003epinMode(led, OUTPUT);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid loop() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edigitalWrite(led, HIGH);   \/\/ turn the LED on\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(1000);               \/\/ wait for a second\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edigitalWrite(led, LOW);    \/\/ turn the LED off\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(1000);               \/\/ wait for a second\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(250, 40, 255);font-size:24px\"\u003e\u003cstrong\u003eDigital PWM\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"font-size:16px\"\u003eUpload the following code to see the on-board LED gradually dim.\u003c\/span\u003e\u003c\/strong\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003eint ledPin = 8;    \/\/ LED connected to digital pin 10\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid setup() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ declaring LED pin as output\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003epinMode(ledPin, OUTPUT);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid loop() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ fade in from min to max in increments of 5 points:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003efor (int fadeValue = 0 ; fadeValue \u0026lt;= 255; fadeValue += 5) {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ sets the value (range from 0 to 255):\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003eanalogWrite(ledPin, fadeValue);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ wait for 30 milliseconds to see the dimming effect\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(30);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ fade out from max to min in increments of 5 points:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003efor (int fadeValue = 255 ; fadeValue \u0026gt;= 0; fadeValue -= 5) {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ sets the value (range from 0 to 255):\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003eanalogWrite(ledPin, fadeValue);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ wait for 30 milliseconds to see the dimming effect\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(30);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(250, 40, 255);font-size:24px\"\u003e\u003cstrong\u003eAnalog pin\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cstrong\u003e\u003cspan style=\"font-size:16px\"\u003eConnect the potentiometer to pin A5 and upload the following code to control the flashing interval of the LED by turning the potentiometer knob.\u003c\/span\u003e\u003c\/strong\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003econst int sensorPin = A5;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003econst int ledPin =  8;\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid setup() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003epinMode(sensorPin, INPUT);  \/\/ declare the sensorPin as an INPUT\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003epinMode(ledPin, OUTPUT);   \/\/ declare the ledPin as an OUTPUT\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003evoid loop() {\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ read the value from the sensor:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003eint sensorValue = analogRead(sensorPin);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ turn the ledPin on\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edigitalWrite(ledPin, HIGH);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ stop the program for \u0026lt;sensorValue\u0026gt; milliseconds:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(sensorValue);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ turn the ledPin off:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edigitalWrite(ledPin, LOW);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e\/\/ stop the program for for \u0026lt;sensorValue\u0026gt; milliseconds:\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003edelay(sensorValue);\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan style=\"color:rgb(211, 49, 21)\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/Se2c06cae4f0b4a5e838cd7ab95b935e0r.jpg\" slate-data-type=\"image\"\u003e\u003c\/p\u003e\u003cp\u003e\u003cbr\u003e\u003c\/p\u003e","brand":"My Store","offers":[{"title":"Default Title","offer_id":56147644940610,"sku":"\u003cnone\u003e","price":17.8,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1033\/3175\/8402\/files\/S0bbcea32412a4a30b9faafc07821259dv.webp?v=1789046087","url":"https:\/\/efretails.com\/products\/tenstar-robot-esp32-c3-development-board-esp32-c3-supermini-wifi-bluetooth","provider":"Ef Retails","version":"1.0","type":"link"}