{"id":19282253,"url":"https://github.com/accso/learning-iot","last_synced_at":"2025-10-03T17:48:11.832Z","repository":{"id":155403324,"uuid":"629849825","full_name":"accso/learning-iot","owner":"accso","description":"Learning IoT HAT for D1 Mini ESP8266 based boards","archived":false,"fork":false,"pushed_at":"2023-04-26T04:38:10.000Z","size":38236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-05T17:12:00.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/accso.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-19T06:43:58.000Z","updated_at":"2023-04-25T19:52:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"bca6f8cb-1379-4d20-92c8-c4c256ddc84a","html_url":"https://github.com/accso/learning-iot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accso%2Flearning-iot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accso%2Flearning-iot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accso%2Flearning-iot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accso%2Flearning-iot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/accso","download_url":"https://codeload.github.com/accso/learning-iot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240386530,"owners_count":19793193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T21:25:56.593Z","updated_at":"2025-10-03T17:48:06.779Z","avatar_url":"https://github.com/accso.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE html\u003e\r\n\u003chtml\u003e\r\n\u003chead\u003e\r\n\u003ctitle\u003eREADME.md\u003c/title\u003e\r\n\u003cmeta http-equiv=\"Content-type\" content=\"text/html;charset=UTF-8\"\u003e\r\n\n\u003cstyle\u003e\n/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */\r\n/*---------------------------------------------------------------------------------------------\r\n *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nbody {\r\n\tfont-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"Ubuntu\", \"Droid Sans\", sans-serif);\r\n\tfont-size: var(--vscode-markdown-font-size, 14px);\r\n\tpadding: 0 26px;\r\n\tline-height: var(--vscode-markdown-line-height, 22px);\r\n\tword-wrap: break-word;\r\n}\r\n\r\n#code-csp-warning {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tcolor: white;\r\n\tmargin: 16px;\r\n\ttext-align: center;\r\n\tfont-size: 12px;\r\n\tfont-family: sans-serif;\r\n\tbackground-color:#444444;\r\n\tcursor: pointer;\r\n\tpadding: 6px;\r\n\tbox-shadow: 1px 1px 1px rgba(0,0,0,.25);\r\n}\r\n\r\n#code-csp-warning:hover {\r\n\ttext-decoration: none;\r\n\tbackground-color:#007acc;\r\n\tbox-shadow: 2px 2px 2px rgba(0,0,0,.25);\r\n}\r\n\r\nbody.scrollBeyondLastLine {\r\n\tmargin-bottom: calc(100vh - 22px);\r\n}\r\n\r\nbody.showEditorSelection .code-line {\r\n\tposition: relative;\r\n}\r\n\r\nbody.showEditorSelection .code-active-line:before,\r\nbody.showEditorSelection .code-line:hover:before {\r\n\tcontent: \"\";\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: -12px;\r\n\theight: 100%;\r\n}\r\n\r\nbody.showEditorSelection li.code-active-line:before,\r\nbody.showEditorSelection li.code-line:hover:before {\r\n\tleft: -30px;\r\n}\r\n\r\n.vscode-light.showEditorSelection .code-active-line:before {\r\n\tborder-left: 3px solid rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.vscode-light.showEditorSelection .code-line:hover:before {\r\n\tborder-left: 3px solid rgba(0, 0, 0, 0.40);\r\n}\r\n\r\n.vscode-light.showEditorSelection .code-line .code-line:hover:before {\r\n\tborder-left: none;\r\n}\r\n\r\n.vscode-dark.showEditorSelection .code-active-line:before {\r\n\tborder-left: 3px solid rgba(255, 255, 255, 0.4);\r\n}\r\n\r\n.vscode-dark.showEditorSelection .code-line:hover:before {\r\n\tborder-left: 3px solid rgba(255, 255, 255, 0.60);\r\n}\r\n\r\n.vscode-dark.showEditorSelection .code-line .code-line:hover:before {\r\n\tborder-left: none;\r\n}\r\n\r\n.vscode-high-contrast.showEditorSelection .code-active-line:before {\r\n\tborder-left: 3px solid rgba(255, 160, 0, 0.7);\r\n}\r\n\r\n.vscode-high-contrast.showEditorSelection .code-line:hover:before {\r\n\tborder-left: 3px solid rgba(255, 160, 0, 1);\r\n}\r\n\r\n.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {\r\n\tborder-left: none;\r\n}\r\n\r\nimg {\r\n\tmax-width: 100%;\r\n\tmax-height: 100%;\r\n}\r\n\r\na {\r\n\ttext-decoration: none;\r\n}\r\n\r\na:hover {\r\n\ttext-decoration: underline;\r\n}\r\n\r\na:focus,\r\ninput:focus,\r\nselect:focus,\r\ntextarea:focus {\r\n\toutline: 1px solid -webkit-focus-ring-color;\r\n\toutline-offset: -1px;\r\n}\r\n\r\nhr {\r\n\tborder: 0;\r\n\theight: 2px;\r\n\tborder-bottom: 2px solid;\r\n}\r\n\r\nh1 {\r\n\tpadding-bottom: 0.3em;\r\n\tline-height: 1.2;\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n}\r\n\r\nh1, h2, h3 {\r\n\tfont-weight: normal;\r\n}\r\n\r\ntable {\r\n\tborder-collapse: collapse;\r\n}\r\n\r\ntable \u003e thead \u003e tr \u003e th {\r\n\ttext-align: left;\r\n\tborder-bottom: 1px solid;\r\n}\r\n\r\ntable \u003e thead \u003e tr \u003e th,\r\ntable \u003e thead \u003e tr \u003e td,\r\ntable \u003e tbody \u003e tr \u003e th,\r\ntable \u003e tbody \u003e tr \u003e td {\r\n\tpadding: 5px 10px;\r\n}\r\n\r\ntable \u003e tbody \u003e tr + tr \u003e td {\r\n\tborder-top: 1px solid;\r\n}\r\n\r\nblockquote {\r\n\tmargin: 0 7px 0 5px;\r\n\tpadding: 0 16px 0 10px;\r\n\tborder-left-width: 5px;\r\n\tborder-left-style: solid;\r\n}\r\n\r\ncode {\r\n\tfont-family: Menlo, Monaco, Consolas, \"Droid Sans Mono\", \"Courier New\", monospace, \"Droid Sans Fallback\";\r\n\tfont-size: 1em;\r\n\tline-height: 1.357em;\r\n}\r\n\r\nbody.wordWrap pre {\r\n\twhite-space: pre-wrap;\r\n}\r\n\r\npre:not(.hljs),\r\npre.hljs code \u003e div {\r\n\tpadding: 16px;\r\n\tborder-radius: 3px;\r\n\toverflow: auto;\r\n}\r\n\r\npre code {\r\n\tcolor: var(--vscode-editor-foreground);\r\n\ttab-size: 4;\r\n}\r\n\r\n/** Theming */\r\n\r\n.vscode-light pre {\r\n\tbackground-color: rgba(220, 220, 220, 0.4);\r\n}\r\n\r\n.vscode-dark pre {\r\n\tbackground-color: rgba(10, 10, 10, 0.4);\r\n}\r\n\r\n.vscode-high-contrast pre {\r\n\tbackground-color: rgb(0, 0, 0);\r\n}\r\n\r\n.vscode-high-contrast h1 {\r\n\tborder-color: rgb(0, 0, 0);\r\n}\r\n\r\n.vscode-light table \u003e thead \u003e tr \u003e th {\r\n\tborder-color: rgba(0, 0, 0, 0.69);\r\n}\r\n\r\n.vscode-dark table \u003e thead \u003e tr \u003e th {\r\n\tborder-color: rgba(255, 255, 255, 0.69);\r\n}\r\n\r\n.vscode-light h1,\r\n.vscode-light hr,\r\n.vscode-light table \u003e tbody \u003e tr + tr \u003e td {\r\n\tborder-color: rgba(0, 0, 0, 0.18);\r\n}\r\n\r\n.vscode-dark h1,\r\n.vscode-dark hr,\r\n.vscode-dark table \u003e tbody \u003e tr + tr \u003e td {\r\n\tborder-color: rgba(255, 255, 255, 0.18);\r\n}\r\n\n\u003c/style\u003e\n\n\u003cstyle\u003e\n/* Tomorrow Theme */\r\n/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */\r\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\r\n\r\n/* Tomorrow Comment */\r\n.hljs-comment,\r\n.hljs-quote {\r\n\tcolor: #8e908c;\r\n}\r\n\r\n/* Tomorrow Red */\r\n.hljs-variable,\r\n.hljs-template-variable,\r\n.hljs-tag,\r\n.hljs-name,\r\n.hljs-selector-id,\r\n.hljs-selector-class,\r\n.hljs-regexp,\r\n.hljs-deletion {\r\n\tcolor: #c82829;\r\n}\r\n\r\n/* Tomorrow Orange */\r\n.hljs-number,\r\n.hljs-built_in,\r\n.hljs-builtin-name,\r\n.hljs-literal,\r\n.hljs-type,\r\n.hljs-params,\r\n.hljs-meta,\r\n.hljs-link {\r\n\tcolor: #f5871f;\r\n}\r\n\r\n/* Tomorrow Yellow */\r\n.hljs-attribute {\r\n\tcolor: #eab700;\r\n}\r\n\r\n/* Tomorrow Green */\r\n.hljs-string,\r\n.hljs-symbol,\r\n.hljs-bullet,\r\n.hljs-addition {\r\n\tcolor: #718c00;\r\n}\r\n\r\n/* Tomorrow Blue */\r\n.hljs-title,\r\n.hljs-section {\r\n\tcolor: #4271ae;\r\n}\r\n\r\n/* Tomorrow Purple */\r\n.hljs-keyword,\r\n.hljs-selector-tag {\r\n\tcolor: #8959a8;\r\n}\r\n\r\n.hljs {\r\n\tdisplay: block;\r\n\toverflow-x: auto;\r\n\tcolor: #4d4d4c;\r\n\tpadding: 0.5em;\r\n}\r\n\r\n.hljs-emphasis {\r\n\tfont-style: italic;\r\n}\r\n\r\n.hljs-strong {\r\n\tfont-weight: bold;\r\n}\n\u003c/style\u003e\n\n\u003cstyle\u003e\n/*\r\n * Markdown PDF CSS\r\n */\r\n\r\n body {\r\n\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe WPC\", \"Segoe UI\", \"Ubuntu\", \"Droid Sans\", sans-serif, \"Meiryo\";\r\n\tpadding: 0 12px;\r\n}\r\n\r\npre {\r\n\tbackground-color: #f8f8f8;\r\n\tborder: 1px solid #cccccc;\r\n\tborder-radius: 3px;\r\n\toverflow-x: auto;\r\n\twhite-space: pre-wrap;\r\n\toverflow-wrap: break-word;\r\n}\r\n\r\npre:not(.hljs) {\r\n\tpadding: 23px;\r\n\tline-height: 19px;\r\n}\r\n\r\nblockquote {\r\n\tbackground: rgba(127, 127, 127, 0.1);\r\n\tborder-color: rgba(0, 122, 204, 0.5);\r\n}\r\n\r\n.emoji {\r\n\theight: 1.4em;\r\n}\r\n\r\ncode {\r\n\tfont-size: 14px;\r\n\tline-height: 19px;\r\n}\r\n\r\n/* for inline code */\r\n:not(pre):not(.hljs) \u003e code {\r\n\tcolor: #C9AE75; /* Change the old color so it seems less like an error */\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* Page Break : use \u003cdiv class=\"page\"/\u003e to insert page break\r\n-------------------------------------------------------- */\r\n.page {\r\n\tpage-break-after: always;\r\n}\r\n\n\u003c/style\u003e\n\r\n\u003cscript src=\"https://unpkg.com/mermaid/dist/mermaid.min.js\"\u003e\u003c/script\u003e\r\n\u003c/head\u003e\r\n\u003cbody\u003e\r\n  \u003cscript\u003e\r\n    mermaid.initialize({\r\n      startOnLoad: true,\r\n      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')\r\n          ? 'dark'\r\n          : 'default'\r\n    });\r\n  \u003c/script\u003e\r\n\u003ch1 id=\"learning-iot\"\u003eLearning IoT\u003c/h1\u003e\n\u003cp\u003eGoody for Building IoT in Munich 25. - 27. April 2023.\u003c/p\u003e\n\u003ch2 id=\"images-pcb\"\u003eImages PCB\u003c/h2\u003e\n\u003cimg src=\"images/pcb-learning-iot-top.png\" height=\"250\"\u003e\n\u003cimg src=\"images/pcb-learning-iot-back.png\" height=\"250\"\u003e\n\u003ch2 id=\"pin-list\"\u003ePin List\u003c/h2\u003e\n\u003cimg src=\"images/pin-list.jpg\" width=\"250\"\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eGPIO\u003c/th\u003e\n\u003cth\u003ePin\u003c/th\u003e\n\u003cth\u003eFunction\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eGPIO0\u003c/td\u003e\n\u003ctd\u003eD3\u003c/td\u003e\n\u003ctd\u003eButton / SW1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGPIO2\u003c/td\u003e\n\u003ctd\u003eD4\u003c/td\u003e\n\u003ctd\u003eLED Green\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGPIO15\u003c/td\u003e\n\u003ctd\u003eD8\u003c/td\u003e\n\u003ctd\u003eLED Blue\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eGPIO16\u003c/td\u003e\n\u003ctd\u003eD0\u003c/td\u003e\n\u003ctd\u003eLED Red\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2 id=\"bill-of-materials-bom\"\u003eBill of Materials (BOM)\u003c/h2\u003e\n\u003cimg src=\"images/bom.jpg\" width=\"250\"\u003e\n\u003cp\u003eAll components can be ordered at http://reichelt.de\u003c/p\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003c/th\u003e\n\u003cth\u003e\u003c/th\u003e\n\u003cth\u003eOrder Number\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eD1\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003eLED LL 5-8000RGBRGB-LED\u003c/td\u003e\n\u003ctd\u003e5 mm, bedrahtet, 4-Pin, rt/gn/bl, 8000 mcd, 25°\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSW1\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003eTASTER 3301\u003c/td\u003e\n\u003ctd\u003eKurzhubtaster 6x6mm, Höhe: 4,3mm, 12V, vertikal\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eU1\u003c/td\u003e\n\u003ctd\u003e2\u003c/td\u003e\n\u003ctd\u003eMPE 087-1-008\u003c/td\u003e\n\u003ctd\u003eStiftleisten 2,54 mm, 1X08, gerade\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eR4\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003e1/4W 10K\u003c/td\u003e\n\u003ctd\u003eWiderstand, Kohleschicht, 10 kOhm, 0207, 250 mW, 5\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eR1-3\u003c/td\u003e\n\u003ctd\u003e3\u003c/td\u003e\n\u003ctd\u003e1/4W 300\u003c/td\u003e\n\u003ctd\u003eWiderstand, Kohleschicht, 300 Ohm, 0207, 250 mW, 5%\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003eESD BEUTEL-S 127\u003c/td\u003e\n\u003ctd\u003eESD PE-Abschirmbeutel, wiederverschließbar, 76 x 127 mm\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2 id=\"schematic\"\u003eSchematic\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"schematic-accso-learning-iot-v1.0.pdf\"\u003e\u003cimg src=\"images/schematic.png\" width=\"250\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"assembly\"\u003eAssembly\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eBend the wires of the resistors by 90° \u003cbr\u003e\u003cimg src=\"images/resistor-90-bending.jpg\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003ePut the resistors through the holes (R4 is 10k while R1-3 is 330 Ohms)  \u003cbr\u003e\u003cimg src=\"images/resistor-values.jpg\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003eBend the wires by 30° and cut the pins, so 1mm wire is still visible from the bottom \u003cbr\u003e\u003cimg src=\"images/resistor-30-bending.jpg\" height=\"250\"\u003e \u003cimg src=\"images/resistor-cut.jpg\" height=\"250\"\u003e \u003cimg src=\"images/resistor-cut2.jpg\" height=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003ePut the tactile button through the holes as described in following picture \u003cbr\u003e\u003cimg src=\"images/button-assembly.png\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003ePut the LEDs through the holes with the flatted side pointed in direction of the push button\u003c/li\u003e\n\u003cli\u003eBend the outer wires by 30° and cut all wires, so 1mm wire is still visible from the bottom \u003cbr\u003e\u003cimg src=\"images/led.jpg\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003eSolder all components \u003cbr\u003e\u003cimg src=\"images/solder.jpg\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003eSolder the pin headers (male) downwards \u003cbr\u003e\u003cimg src=\"images/pins.jpg\" width=\"250\"\u003e\u003c/li\u003e\n\u003cli\u003eSolder the pin headers (female) on top of D1 mini, so the shield can be put on top. \u003cbr\u003e\u003cimg src=\"images/d1mini-pins.jpg\" width=\"250\"\u003e\u003cbr\u003e\u003cimg src=\"images/assembly.png\" width=\"250\"\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"flashing-firmware\"\u003eFlashing firmware\u003c/h2\u003e\n\u003cp\u003eSee the latest release at the release page of Github!\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eInstall Firmware:\u003c/strong\u003e\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003epip3 install esptool\npython3 -m esptool --port /dev/tty.usbserial-1440 --baud 115200 erase_flash \npython3 -m esptool --port /dev/tty.SLAB_USBtoUART --baud 115200 write_flash 0x0 firmware-v1.0-esp8266_learning-iot.bin\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003cstrong\u003eWiFi-AP:\u003c/strong\u003e\u003cbr\u003e\nSSID: Accso Learning IoT\u003cbr\u003e\nKey: Accso Learning IoT\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eURL\u003c/strong\u003e\u003cbr\u003e\nhttp://192.168.4.1\u003cbr\u003e\nhttp://accso-learning-iot.local\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConfig-Area:\u003c/strong\u003e\u003cbr\u003e\nUser: admin\u003cbr\u003e\nPassword: admin\u003c/p\u003e\n\u003ch2 id=\"sw-api\"\u003eSW API\u003c/h2\u003e\n\u003ch3 id=\"initialize-board\"\u003eInitialize Board\u003c/h3\u003e\n\u003cp\u003eTo initialize the Learning IoT Board requires as parameter the pointer to the web server handling REST-API calls.\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003eLIoTBoard.begin(\u0026amp;webServer);\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003ch3 id=\"setting-leds\"\u003eSetting LEDs\u003c/h3\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003evoid LIoTBoard.setLed(String color);\n\ncolor: Color as string. Can be:\n - \u0026quot;black\u0026quot;\n - \u0026quot;red\u0026quot;\n - \u0026quot;green\u0026quot;\n - \u0026quot;yellow\u0026quot;\n - \u0026quot;blue\u0026quot;\n - \u0026quot;purple\u0026quot;\n - \u0026quot;cyan\u0026quot;\n - \u0026quot;white\u0026quot;\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003evoid LIoTBoard.setLed(bool bRed, bool bGreen, bool bBlue);\n\nbRed: LED red true = on, false = off\n\nbGreen: LED green true = on, false = off\n\nbBlue: LED blue true = on, false = off\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003ch3 id=\"read-button\"\u003eRead button\u003c/h3\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003ebool LIoTBoard.getButtonPressed(void);\n\nreturns: true if button pressed and false if button is released\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"getting-started\"\u003eGetting started\u003c/h2\u003e\n\u003ch3 id=\"driving-led-without-board-support\"\u003eDriving LED without board support\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"firmware/examples/basic/basic.ino\"\u003ebasic.ino\u003c/a\u003e\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003e#define LED_RED    16 // D0\n#define LED_GREEN   2 // D4\n#define LED_BLUE   15 // D8\n#define BUTTON      0 // D3\n\nvoid setup(void)\n{\n    pinMode(LED_RED,OUTPUT);\n    pinMode(LED_GREEN,OUTPUT);\n    pinMode(LED_BLUE,OUTPUT);\n    pinMode(BUTTON,INPUT);\n}\n\nvoid loop(void)\n{\n    // blink red LED\n    digitalWrite(LED_RED,HIGH);\n    delay(500);\n    digitalWrite(LED_RED,LOW);\n    delay(500);\n\n    // blink green LED\n    digitalWrite(LED_GREEN,HIGH);\n    delay(500);\n    digitalWrite(LED_GREEN,LOW);\n    delay(500);\n\n    // blink blue LED\n    digitalWrite(LED_BLUE,HIGH);\n    delay(500);\n    digitalWrite(LED_BLUE,LOW);\n    delay(500);\n\n    // wait for button pressed (blocking)\n    while(digitalRead(BUTTON))\n    {\n        delay(1);\n    }\n}\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003ch3 id=\"driving-led-with-board-support\"\u003eDriving LED with board support\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"firmware/examples/board-support/board-support.ino\"\u003eboard-support.ino\u003c/a\u003e\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003e# requires to add liotboard.h and liotboard.cpp to the project\n#include \u0026quot;liotboard.h\u0026quot;\n\nvoid setup(void)\n{\n    LIoTBoard.begin();\n\n    LIoTBoard.setLed(\u0026quot;red\u0026quot;);\n}\n\nvoid loop(void)\n{\n    LIoTBoard.update();\n    if (LIoTBoard.getButtonPressed())\n    {\n        LIoTBoard.setLed(\u0026quot;green\u0026quot;);\n    } else\n    {\n        LIoTBoard.setLed(\u0026quot;red\u0026quot;);\n    }\n}\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\u003ch3 id=\"rest-api-example\"\u003eREST API Example\u003c/h3\u003e\n\u003cp\u003ePOST data with JSON content /api/status:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u0026quot;red\u0026quot;: LED Red, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;green\u0026quot;: LED Green, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;blue\u0026quot;: LED Blue, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;button\u0026quot;: Button change overwrite, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eGET data as JSON format /api/status:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u0026quot;red\u0026quot;: LED Red, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;green\u0026quot;: LED Green, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;blue\u0026quot;: LED Blue, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003cli\u003e\u0026quot;button\u0026quot;: Button status, allowed values: \u0026quot;true\u0026quot; or \u0026quot;false\u0026quot;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003ca href=\"firmware/examples/restapi/restapi.ino\"\u003erestapi.ino\u003c/a\u003e\u003c/p\u003e\n\u003cpre class=\"hljs\"\u003e\u003ccode\u003e\u003cdiv\u003e#include \u0026lt;ESP8266WiFi.h\u0026gt;\n#include \u0026lt;WiFiClient.h\u0026gt;\n#include \u0026lt;ESP8266WebServer.h\u0026gt;\n#include \u0026lt;ESP8266mDNS.h\u0026gt;\n\n# requires to add liotboard.h and liotboard.cpp to the project\n#include \u0026quot;liotboard.h\u0026quot;\n\n#ifndef STASSID\n#define STASSID \u0026quot;your-ssid\u0026quot;\n#define STAPSK \u0026quot;your-password\u0026quot;\n#endif\n\nconst char* ssid = STASSID;\nconst char* password = STAPSK;\n\nESP8266WebServer server(80);\n\n\nvoid handleRoot() {\n  server.send(200, \u0026quot;text/plain\u0026quot;, \u0026quot;hello from esp8266!\\r\\n\u0026quot;);\n}\n\nvoid setup(void) {\n  Serial.begin(115200);\n  WiFi.mode(WIFI_STA);\n  WiFi.begin(ssid, password);\n  Serial.println(\u0026quot;\u0026quot;);\n\n  // Wait for connection\n  while (WiFi.status() != WL_CONNECTED) {\n    delay(500);\n    Serial.print(\u0026quot;.\u0026quot;);\n  }\n  Serial.println(\u0026quot;\u0026quot;);\n  Serial.print(\u0026quot;Connected to \u0026quot;);\n  Serial.println(ssid);\n  Serial.print(\u0026quot;IP address: \u0026quot;);\n  Serial.println(WiFi.localIP());\n\n  if (MDNS.begin(\u0026quot;esp8266\u0026quot;)) { Serial.println(\u0026quot;MDNS responder started\u0026quot;); }\n\n  LIoTBoard.begin(\u0026amp;server);\n  server.on(\u0026quot;/\u0026quot;, handleRoot);\n\n  server.begin();\n  Serial.println(\u0026quot;HTTP server started\u0026quot;);\n}\n\nvoid loop(void) {\n  server.handleClient();\n  MDNS.update();\n}\n\u003c/div\u003e\u003c/code\u003e\u003c/pre\u003e\n\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccso%2Flearning-iot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccso%2Flearning-iot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccso%2Flearning-iot/lists"}