You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
698 lines
34 KiB
698 lines
34 KiB
7 years ago
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
|
<svg
|
||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||
|
xmlns="http://www.w3.org/2000/svg"
|
||
|
id="svg8"
|
||
|
version="1.1"
|
||
|
viewBox="0 0 191.10721 454.36032"
|
||
|
height="454.36032mm"
|
||
|
width="191.10721mm">
|
||
|
<defs
|
||
|
id="defs2" />
|
||
|
<metadata
|
||
|
id="metadata5">
|
||
|
<rdf:RDF>
|
||
|
<cc:Work
|
||
|
rdf:about="">
|
||
|
<dc:format>image/svg+xml</dc:format>
|
||
|
<dc:type
|
||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||
|
<dc:title></dc:title>
|
||
|
</cc:Work>
|
||
|
</rdf:RDF>
|
||
|
</metadata>
|
||
|
<g
|
||
|
style="display:inline"
|
||
|
transform="translate(5.0000008,4.9999992)"
|
||
|
id="layer2">
|
||
|
<path
|
||
|
id="path4982"
|
||
|
style="fill:none;stroke:#000000;stroke-width:0.0264583px"
|
||
|
d="M -4.9867716,-4.9999882 V 449.36032 M 0.30489485,-4.9999882 V 449.36032 M 5.5965614,-4.9999882 V 449.36032 M 10.888228,-4.9999882 V 449.36032 M 16.179894,-4.9999882 V 449.36032 M 21.471561,-4.9999882 V 449.36032 M 26.763227,-4.9999882 V 449.36032 M 32.054894,-4.9999882 V 449.36032 M 37.34656,-4.9999882 V 449.36032 M 42.638227,-4.9999882 V 449.36032 M 47.929893,-4.9999882 V 449.36032 M 53.22156,-4.9999882 V 449.36032 M 58.513227,-4.9999882 V 449.36032 M 63.804893,-4.9999882 V 449.36032 M 69.09656,-4.9999882 V 449.36032 M 74.388226,-4.9999882 V 449.36032 M 79.679893,-4.9999882 V 449.36032 M 84.971559,-4.9999882 V 449.36032 M 90.263226,-4.9999882 V 449.36032 M 95.554888,-4.9999882 V 449.36032 M 100.84656,-4.9999882 V 449.36032 M 106.13823,-4.9999882 V 449.36032 M 111.42989,-4.9999882 V 449.36032 M 116.72156,-4.9999882 V 449.36032 M 122.01323,-4.9999882 V 449.36032 M 127.30489,-4.9999882 V 449.36032 M 132.59656,-4.9999882 V 449.36032 M 137.88823,-4.9999882 V 449.36032 M 143.17989,-4.9999882 V 449.36032 M 148.47156,-4.9999882 V 449.36032 M 153.76323,-4.9999882 V 449.36032 M 159.05489,-4.9999882 V 449.36032 M 164.34656,-4.9999882 V 449.36032 M 169.63823,-4.9999882 V 449.36032 M 174.92989,-4.9999882 V 449.36032 M 180.22156,-4.9999882 V 449.36032 M 185.51323,-4.9999882 V 449.36032 M -4.9867716,-4.9999882 H 186.12043 M -4.9867716,0.29167834 H 186.12043 M -4.9867716,5.5833448 H 186.12043 M -4.9867716,10.875012 H 186.12043 M -4.9867716,16.166678 H 186.12043 M -4.9867716,21.458345 H 186.12043 M -4.9867716,26.750011 H 186.12043 M -4.9867716,32.041678 H 186.12043 M -4.9867716,37.333344 H 186.12043 M -4.9867716,42.625011 H 186.12043 M -4.9867716,47.916677 H 186.12043 M -4.9867716,53.208344 H 186.12043 M -4.9867716,58.500011 H 186.12043 M -4.9867716,63.791677 H 186.12043 M -4.9867716,69.083344 H 186.12043 M -4.9867716,74.37501 H 186.12043 M -4.9867716,79.666677 H 186.12043 M -4.9867716,84.958343 H 186.12043 M -4.9867716,90.25001 H 186.12043 M -4.9867716,95.541672 H 186.12043 M -4.9867716,100.83334 H 186.12043 M -4.9867716,106.12501 H 186.12043 M -4.9867716,111.41667 H 186.12043 M -4.9867716,116.70834 H 186.12043 M -4.9867716,122.00001 H 186.12043 M -4.9867716,127.29167 H 186.12043 M -4.9867716,132.58334 H 186.12043 M -4.9867716,137.87501 H 186.12043 M -4.9867716,143.16667 H 186.12043 M -4.9867716,148.45834 H 186.12043 M -4.9867716,153.75001 H 186.12043 M -4.9867716,159.04167 H 186.12043 M -4.9867716,164.33334 H 186.12043 M -4.9867716,169.62501 H 186.12043 M -4.9867716,174.91667 H 186.12043 M -4.9867716,180.20834 H 186.12043 M -4.9867716,185.50001 H 186.12043 M -4.9867716,190.79167 H 186.12043 M -4.9867716,196.08334 H 186.12043 M -4.9867716,201.37501 H 186.12043 M -4.9867716,206.66667 H 186.12043 M -4.9867716,211.95834 H 186.12043 M -4.9867716,217.25001 H 186.12043 M -4.9867716,222.54167 H 186.12043 M -4.9867716,227.83334 H 186.12043 M -4.9867716,233.125 H 186.12043 M -4.9867716,238.41667 H 186.12043 M -4.9867716,243.70834 H 186.12043 M -4.9867716,249 H 186.12043 M -4.9867716,254.29167 H 186.12043 M -4.9867716,259.58334 H 186.12043 M -4.9867716,264.875 H 186.12043 M -4.9867716,270.16667 H 186.12043 M -4.9867716,275.45834 H 186.12043 M -4.9867716,280.75 H 186.12043 M -4.9867716,286.04167 H 186.12043 M -4.9867716,291.33334 H 186.12043 M -4.9867716,296.625 H 186.12043 M -4.9867716,301.91667 H 186.12043 M -4.9867716,307.20834 H 186.12043 M -4.9867716,312.5 H 186.12043 M -4.9867716,317.79167 H 186.12043 M -4.9867716,323.08334 H 186.12043 M -4.9867716,328.375 H 186.12043 M -4.9867716,333.66667 H 186.12043 M -4.9867716,338.95834 H 186.12043 M -4.9867716,344.25 H 186.12043 M -4.9867716,349.54167 H 186.12043 M -4.9867716,354.83334 H 186.12043 M -4.9867716,360.125 H 186.12043 M -4.9867716,365.41667 H 186.12043 M -4.9867716,370.70834 H 186.12043 M -4.9867716,376 H 186.12043 M -4.9867716,381.29167 H 186.12043 M -4.9867716,386.58333 H 186.12043 M -4.9867716,391.875 H 186.12043 M -4.9867716,397.16667 H 186.12043 M -4.9867716,402.45833 H 186.12043 M -4.9867716,407.75 H 186.12043 M -4.9867716,413.04167 H 186.12043 M -4.9867716,418.33333 H 186
|
||
|
</g>
|
||
|
<g
|
||
|
style="display:inline"
|
||
|
transform="translate(46.95536,63.837051)"
|
||
|
id="layer1">
|
||
|
<text
|
||
|
id="text4506"
|
||
|
y="-56.407742"
|
||
|
x="-41.95536"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88055563px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-56.407742"
|
||
|
x="-41.95536"
|
||
|
id="tspan4504"><tspan
|
||
|
id="tspan4776"
|
||
|
style="fill:#669900">#include</tspan> <<tspan
|
||
|
id="tspan4780"
|
||
|
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Italic'">ESP8266WiFi.h</tspan>></tspan><tspan
|
||
|
id="tspan4508"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-51.557049"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4778"
|
||
|
style="fill:#669900">#include</tspan> <<tspan
|
||
|
id="tspan4782"
|
||
|
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Italic'">ESP8266WebServer.h</tspan>></tspan><tspan
|
||
|
id="tspan4510"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-46.706352"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4786"
|
||
|
style="fill:#669900">#include</tspan> <<tspan
|
||
|
id="tspan4784"
|
||
|
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:'monospace Italic'">AutoConnect.h</tspan>></tspan><tspan
|
||
|
id="tspan4512"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-41.855659"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4516"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-37.004963"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4790"
|
||
|
style="fill:#ff6600">AutoConnect </tspan>portal;</tspan><tspan
|
||
|
id="tspan4518"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-32.15427"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4520"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-27.303574"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4792"
|
||
|
style="fill:#3366cc">void</tspan> handleRoot() {</tspan><tspan
|
||
|
id="tspan4522"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="-22.452879"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4794"
|
||
|
style="fill:#3366cc">String</tspan> page = PSTR(</tspan><tspan
|
||
|
id="tspan4524"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="-17.602184"
|
||
|
x="-41.95536">"<html>"</tspan><tspan
|
||
|
id="tspan4526"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="-12.751491"
|
||
|
x="-41.95536">"</head>"</tspan><tspan
|
||
|
id="tspan4528"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="-7.9007959"
|
||
|
x="-41.95536"> "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"</tspan><tspan
|
||
|
id="tspan4530"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="-3.0501018"
|
||
|
x="-41.95536"> "<style type=\"text/css\">"</tspan><tspan
|
||
|
id="tspan4532"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="1.8005929"
|
||
|
x="-41.95536"> "body {"</tspan><tspan
|
||
|
id="tspan4534"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="6.6512876"
|
||
|
x="-41.95536"> "-webkit-appearance:none;"</tspan><tspan
|
||
|
id="tspan4536"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="11.501982"
|
||
|
x="-41.95536"> "-moz-appearance:none;"</tspan><tspan
|
||
|
id="tspan4538"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="16.352676"
|
||
|
x="-41.95536"> "font-family:'Arial',sans-serif;"</tspan><tspan
|
||
|
id="tspan4540"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="21.203371"
|
||
|
x="-41.95536"> "text-align:center;"</tspan><tspan
|
||
|
id="tspan4542"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="26.054066"
|
||
|
x="-41.95536"> "}"</tspan><tspan
|
||
|
id="tspan4544"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="30.90476"
|
||
|
x="-41.95536"> ".menu {"</tspan><tspan
|
||
|
id="tspan4546"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="35.755455"
|
||
|
x="-41.95536"> "text-align:right;"</tspan><tspan
|
||
|
id="tspan4548"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="40.606148"
|
||
|
x="-41.95536"> "}"</tspan><tspan
|
||
|
id="tspan4550"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="45.456844"
|
||
|
x="-41.95536"> ".button {"</tspan><tspan
|
||
|
id="tspan4552"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="50.307537"
|
||
|
x="-41.95536"> "display:inline-block;"</tspan><tspan
|
||
|
id="tspan4554"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="55.158234"
|
||
|
x="-41.95536"> "border-radius:7px;"</tspan><tspan
|
||
|
id="tspan4556"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="60.008926"
|
||
|
x="-41.95536"> "background:#73ad21;"</tspan><tspan
|
||
|
id="tspan4558"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="64.859619"
|
||
|
x="-41.95536"> "margin:0 10px 0 10px;"</tspan><tspan
|
||
|
id="tspan4560"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="69.71032"
|
||
|
x="-41.95536"> "padding:10px 20px 10px 20px;"</tspan><tspan
|
||
|
id="tspan4562"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="74.561012"
|
||
|
x="-41.95536"> "text-decoration:none;"</tspan><tspan
|
||
|
id="tspan4564"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="79.411705"
|
||
|
x="-41.95536"> "color:#000000;"</tspan><tspan
|
||
|
id="tspan4566"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="84.262398"
|
||
|
x="-41.95536"> "}"</tspan><tspan
|
||
|
id="tspan4568"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="89.113098"
|
||
|
x="-41.95536"> "</style>"</tspan><tspan
|
||
|
id="tspan4570"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="93.963791"
|
||
|
x="-41.95536">"</head>"</tspan><tspan
|
||
|
id="tspan4572"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="98.814484"
|
||
|
x="-41.95536">"<body>"</tspan><tspan
|
||
|
id="tspan4574"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="103.66518"
|
||
|
x="-41.95536"> "<p class=\"menu\">" <tspan
|
||
|
id="tspan4798"
|
||
|
style="fill:#000000">AUTOCONNECT_LINK(BAR_32)</tspan> "</p>"</tspan><tspan
|
||
|
id="tspan4576"
|
||
|
style="font-size:3.17499995px;fill:#003399;stroke-width:0.26458332"
|
||
|
y="108.51587"
|
||
|
x="-41.95536"> "BUILT-IN LED<br>"</tspan><tspan
|
||
|
id="tspan4578"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="113.36657"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4796"
|
||
|
style="fill:#003399"> "GPIO("</tspan>);</tspan><tspan
|
||
|
id="tspan4580"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="118.21726"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4800"
|
||
|
style="fill:#3366cc">String</tspan>(BUILTIN_LED);</tspan><tspan
|
||
|
id="tspan4582"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="123.06796"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4802"
|
||
|
style="fill:#3366cc">String</tspan>(F(<tspan
|
||
|
id="tspan4804"
|
||
|
style="fill:#003399">") : <span style=\"font-weight:bold;color:"</tspan>));</tspan><tspan
|
||
|
id="tspan4584"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="127.91865"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4806"
|
||
|
style="fill:#ff6600">digitalRead</tspan>(BUILTIN_LED) ? <tspan
|
||
|
id="tspan4808"
|
||
|
style="fill:#3366cc">String</tspan>(<tspan
|
||
|
id="tspan4812"
|
||
|
style="fill:#003399">"Tomato\">HIGH"</tspan>) : <tspan
|
||
|
id="tspan4814"
|
||
|
style="fill:#3366cc">String</tspan>(<tspan
|
||
|
id="tspan4816"
|
||
|
style="fill:#003399">"SlateBlue\">LOW"</tspan>);</tspan><tspan
|
||
|
id="tspan4586"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="132.76935"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4818"
|
||
|
style="fill:#ff6600">String</tspan>(F(<tspan
|
||
|
id="tspan4820"
|
||
|
style="fill:#003399">"</span>"</tspan>));</tspan><tspan
|
||
|
id="tspan4588"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="137.62004"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4822"
|
||
|
style="fill:#ff6600">String</tspan>(F(<tspan
|
||
|
id="tspan4826"
|
||
|
style="fill:#003399">"<p><a class=\"button\" href=\"/io?v=low\">low</a></tspan></tspan><tspan
|
||
|
id="tspan4968"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="142.47073"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4970"
|
||
|
style="fill:#003399"> <a class=\"button\" href=\"/io?v=high\">high</a></p>"</tspan>));</tspan><tspan
|
||
|
id="tspan4590"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="147.32143"
|
||
|
x="-41.95536"> page += <tspan
|
||
|
id="tspan4824"
|
||
|
style="fill:#ff6600">String</tspan>(F(<tspan
|
||
|
id="tspan4828"
|
||
|
style="fill:#003399">"</body></html>"</tspan>));</tspan><tspan
|
||
|
id="tspan4592"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="152.17212"
|
||
|
x="-41.95536"> portal.<tspan
|
||
|
id="tspan5104"
|
||
|
style="fill:#ff6600">host</tspan>().<tspan
|
||
|
id="tspan4832"
|
||
|
style="fill:#ff6600">send</tspan>(200, <tspan
|
||
|
id="tspan4834"
|
||
|
style="fill:#003399">"text/html"</tspan>, page);</tspan><tspan
|
||
|
id="tspan4594"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="157.02281"
|
||
|
x="-41.95536">}</tspan><tspan
|
||
|
id="tspan4596"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="161.87352"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4598"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="166.72421"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4836"
|
||
|
style="fill:#3366cc">void</tspan> handleGPIO() {</tspan><tspan
|
||
|
id="tspan5040"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="171.57491"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan5088"
|
||
|
style="fill:#ff6600">ESP8266WebServer</tspan>& server = portal.<tspan
|
||
|
id="tspan5084"
|
||
|
style="fill:#ff6600">host</tspan>();</tspan><tspan
|
||
|
id="tspan4600"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="176.4256"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4838"
|
||
|
style="fill:#808080">if</tspan> (server.<tspan
|
||
|
id="tspan4842"
|
||
|
style="fill:#ff6600">arg</tspan>(<tspan
|
||
|
id="tspan4844"
|
||
|
style="fill:#003399">"v"</tspan>) == <tspan
|
||
|
id="tspan4846"
|
||
|
style="fill:#003399">"low"</tspan>)</tspan><tspan
|
||
|
id="tspan4602"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="181.27629"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4850"
|
||
|
style="fill:#ff6600">digitalWrite</tspan>(BUILTIN_LED, <tspan
|
||
|
id="tspan4852"
|
||
|
style="fill:#ff6600">LOW</tspan>);</tspan><tspan
|
||
|
id="tspan4604"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="186.12698"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4860"
|
||
|
style="fill:#808080">else</tspan> <tspan
|
||
|
id="tspan4862"
|
||
|
style="fill:#808080">if</tspan> (server.<tspan
|
||
|
id="tspan4858"
|
||
|
style="fill:#ff6600">arg</tspan>(<tspan
|
||
|
id="tspan4856"
|
||
|
style="fill:#003399">"v"</tspan>) == <tspan
|
||
|
id="tspan4854"
|
||
|
style="fill:#003399">"high"</tspan>)</tspan><tspan
|
||
|
id="tspan4606"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="190.97768"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4864"
|
||
|
style="fill:#ff6600">digitalWrite</tspan>(BUILTIN_LED, <tspan
|
||
|
id="tspan4866"
|
||
|
style="fill:#ff6600">HIGH</tspan>);</tspan><tspan
|
||
|
id="tspan4608"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="195.82837"
|
||
|
x="-41.95536"> sendRedirect("/");</tspan><tspan
|
||
|
id="tspan4610"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="200.67906"
|
||
|
x="-41.95536">}</tspan><tspan
|
||
|
id="tspan4612"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="205.52977"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4614"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="210.38046"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4868"
|
||
|
style="fill:#3366cc">void</tspan> sendRedirect(<tspan
|
||
|
id="tspan4870"
|
||
|
style="fill:#3366cc">String</tspan> uri) {</tspan><tspan
|
||
|
id="tspan5042"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="215.23116"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan5090"
|
||
|
style="fill:#ff6600">ESP8266WebServer</tspan>& server = portal.<tspan
|
||
|
id="tspan5086"
|
||
|
style="fill:#ff6600">host</tspan>();</tspan><tspan
|
||
|
id="tspan4616"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="220.08185"
|
||
|
x="-41.95536"> server.<tspan
|
||
|
id="tspan4872"
|
||
|
style="fill:#ff6600">sendHeader</tspan>(<tspan
|
||
|
id="tspan4874"
|
||
|
style="fill:#003399">"Location"</tspan>, uri, <tspan
|
||
|
id="tspan4876"
|
||
|
style="fill:#3366cc">true</tspan>);</tspan><tspan
|
||
|
id="tspan4618"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="224.93254"
|
||
|
x="-41.95536"> server.<tspan
|
||
|
id="tspan4880"
|
||
|
style="fill:#ff6600">send</tspan>(302, "text/plain", <tspan
|
||
|
id="tspan4878"
|
||
|
style="fill:#003399">""</tspan>);</tspan><tspan
|
||
|
id="tspan4620"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="229.78323"
|
||
|
x="-41.95536"> server.<tspan
|
||
|
id="tspan4884"
|
||
|
style="fill:#ff6600">client</tspan>().<tspan
|
||
|
id="tspan4886"
|
||
|
style="fill:#ff6600">stop</tspan>();</tspan><tspan
|
||
|
id="tspan4622"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="234.63393"
|
||
|
x="-41.95536">}</tspan><tspan
|
||
|
id="tspan4624"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="239.48462"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4626"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="244.33533"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4890"
|
||
|
style="fill:#3366cc">void</tspan> setup() {</tspan><tspan
|
||
|
id="tspan4628"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="249.18602"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4888"
|
||
|
style="fill:#ff6600">delay</tspan>(1000);</tspan><tspan
|
||
|
id="tspan4630"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="254.03671"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4892"
|
||
|
style="fill:#ff6600">Serial</tspan>.<tspan
|
||
|
id="tspan4894"
|
||
|
style="fill:#ff6600">begin</tspan>(115200);</tspan><tspan
|
||
|
id="tspan4632"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="258.88739"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4898"
|
||
|
style="fill:#ff6600">Serial</tspan>.<tspan
|
||
|
id="tspan4896"
|
||
|
style="fill:#ff6600">println</tspan>();</tspan><tspan
|
||
|
id="tspan4634"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="263.7381"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4900"
|
||
|
style="fill:#ff6600">pinMode</tspan>(BUILTIN_LED, <tspan
|
||
|
id="tspan4902"
|
||
|
style="fill:#ff6600">OUTPUT</tspan>);</tspan><tspan
|
||
|
id="tspan4636"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="268.58881"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4638"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="273.43948"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4904"
|
||
|
style="fill:#808080">// Put the home location of the web site.</tspan></tspan><tspan
|
||
|
id="tspan4640"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="278.29019"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4906"
|
||
|
style="fill:#808080">// But in usually, setting the home uri is not needed cause default location is "/".</tspan></tspan><tspan
|
||
|
id="tspan4642"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="283.14087"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4908"
|
||
|
style="fill:#808080">//portal.home("/");</tspan></tspan><tspan
|
||
|
id="tspan4644"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="287.99158"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4652"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="292.84225"
|
||
|
x="-41.95536"> // Starts user web site included the AutoConnect portal.</tspan><tspan
|
||
|
id="tspan4654"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="297.69296"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4934"
|
||
|
style="fill:#808080">if</tspan> (portal.<tspan
|
||
|
id="tspan4918"
|
||
|
style="fill:#ff6600">begin</tspan>()) {</tspan><tspan
|
||
|
id="tspan4656"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="302.54364"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan5092"
|
||
|
style="fill:#ff6600">ESP8266WebServer</tspan>& server = portal.<tspan
|
||
|
id="tspan5094"
|
||
|
style="fill:#ff6600">host</tspan>();</tspan><tspan
|
||
|
id="tspan5044"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="307.39435"
|
||
|
x="-41.95536"> server.<tspan
|
||
|
id="tspan5096"
|
||
|
style="fill:#ff6600">on</tspan>(<tspan
|
||
|
id="tspan5100"
|
||
|
style="fill:#003399">"/"</tspan>, handleRoot);</tspan><tspan
|
||
|
id="tspan5052"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="312.24506"
|
||
|
x="-41.95536"> server.<tspan
|
||
|
id="tspan5098"
|
||
|
style="fill:#ff6600">on</tspan>(<tspan
|
||
|
id="tspan5102"
|
||
|
style="fill:#003399">"/io"</tspan>, handleGPIO);</tspan><tspan
|
||
|
id="tspan5060"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="317.09573"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4920"
|
||
|
style="fill:#ff6600">Serial</tspan>.<tspan
|
||
|
id="tspan4922"
|
||
|
style="fill:#ff6600">println</tspan>(<tspan
|
||
|
id="tspan4924"
|
||
|
style="fill:#003399">"Started, IP:"</tspan> + <tspan
|
||
|
id="tspan4926"
|
||
|
style="fill:#ff6600">WiFi</tspan>.<tspan
|
||
|
id="tspan4928"
|
||
|
style="fill:#ff6600">localIP</tspan>().<tspan
|
||
|
id="tspan4930"
|
||
|
style="fill:#ff6600">toString</tspan>());</tspan><tspan
|
||
|
id="tspan4658"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="321.94644"
|
||
|
x="-41.95536"> }</tspan><tspan
|
||
|
id="tspan4660"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="326.79712"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4936"
|
||
|
style="fill:#808080">else</tspan> {</tspan><tspan
|
||
|
id="tspan4662"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="331.64783"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4938"
|
||
|
style="fill:#ff6600">Serial</tspan>.<tspan
|
||
|
id="tspan4940"
|
||
|
style="fill:#ff6600">println</tspan>(<tspan
|
||
|
id="tspan4942"
|
||
|
style="fill:#003399">"Connection failed."</tspan>);</tspan><tspan
|
||
|
id="tspan4664"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="336.4985"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4944"
|
||
|
style="fill:#808080">while</tspan> (<tspan
|
||
|
id="tspan4946"
|
||
|
style="fill:#3366cc">true</tspan>) { <tspan
|
||
|
id="tspan4948"
|
||
|
style="fill:#ff6600">yield</tspan>(); }</tspan><tspan
|
||
|
id="tspan4666"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="341.34921"
|
||
|
x="-41.95536"> }</tspan><tspan
|
||
|
id="tspan4668"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="346.19989"
|
||
|
x="-41.95536">}</tspan><tspan
|
||
|
id="tspan4670"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="351.0506"
|
||
|
x="-41.95536" /><tspan
|
||
|
id="tspan4672"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="355.90131"
|
||
|
x="-41.95536"><tspan
|
||
|
id="tspan4950"
|
||
|
style="fill:#3366cc">void</tspan> loop() {</tspan><tspan
|
||
|
id="tspan4676"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="360.75198"
|
||
|
x="-41.95536"> portal.<tspan
|
||
|
id="tspan4954"
|
||
|
style="fill:#ff6600">handleClient</tspan>(); // Need handleClient only.</tspan><tspan
|
||
|
id="tspan4678"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="365.60269"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4966"
|
||
|
style="fill:#808080">if</tspan> (<tspan
|
||
|
id="tspan4956"
|
||
|
style="fill:#ff6600">WiFi</tspan>.<tspan
|
||
|
id="tspan4958"
|
||
|
style="fill:#ff6600">status</tspan>() == <tspan
|
||
|
id="tspan4960"
|
||
|
style="fill:#3366cc">WL_IDLE_STATUS</tspan>) {</tspan><tspan
|
||
|
id="tspan4680"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="370.45337"
|
||
|
x="-41.95536"> ESP.<tspan
|
||
|
id="tspan4962"
|
||
|
style="fill:#ff6600">reset</tspan>();</tspan><tspan
|
||
|
id="tspan4682"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="375.30408"
|
||
|
x="-41.95536"> <tspan
|
||
|
id="tspan4964"
|
||
|
style="fill:#ff6600">delay</tspan>(1000);</tspan><tspan
|
||
|
id="tspan4684"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="380.15475"
|
||
|
x="-41.95536"> }</tspan><tspan
|
||
|
id="tspan4686"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="385.00546"
|
||
|
x="-41.95536">}</tspan><tspan
|
||
|
id="tspan4688"
|
||
|
style="font-size:3.17499995px;stroke-width:0.26458332"
|
||
|
y="389.85617"
|
||
|
x="-41.95536" /></text>
|
||
|
</g>
|
||
|
<g
|
||
|
style="display:inline"
|
||
|
id="layer3">
|
||
|
<path
|
||
|
d="m 119.94348,365.5661 -8.69884,-5.02228 8.69884,-5.02227 z"
|
||
|
id="path4984-8-8"
|
||
|
style="display:inline;opacity:1;vector-effect:none;fill:#558c3d;fill-opacity:0.71119133;stroke:none;stroke-width:2.26596642;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2.2659663, 2.2659663;stroke-dashoffset:0;stroke-opacity:0.74117647;paint-order:stroke markers fill" />
|
||
|
<text
|
||
|
id="text4702"
|
||
|
y="27.289909"
|
||
|
x="115.3639"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
id="tspan4972"
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="27.289909"
|
||
|
x="115.3639">1. Declare AutoConnect only</tspan></text>
|
||
|
<text
|
||
|
id="text4702-1"
|
||
|
y="373.71988"
|
||
|
x="115.7594"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="373.71988"
|
||
|
x="115.7594"
|
||
|
id="tspan4700-2">4. Register request handlers</tspan><tspan
|
||
|
id="tspan4974"
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="379.89349"
|
||
|
x="115.7594"> to ESP8266WebServer</tspan></text>
|
||
|
<text
|
||
|
id="text4702-1-3"
|
||
|
y="358.74286"
|
||
|
x="122.43944"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="358.74286"
|
||
|
x="122.43944"
|
||
|
id="tspan4700-2-3">3. Start AutoConnect,</tspan><tspan
|
||
|
id="tspan4976"
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="364.91647"
|
||
|
x="122.43944"> no need server.begin()</tspan></text>
|
||
|
<text
|
||
|
id="text4702-1-3-9-5"
|
||
|
y="422.84482"
|
||
|
x="127.32045"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="422.84482"
|
||
|
x="127.32045"
|
||
|
id="tspan4700-2-3-5-1">4. Perform handleClient</tspan><tspan
|
||
|
id="tspan4980"
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="429.01843"
|
||
|
x="127.32045"> for AutoConnect</tspan></text>
|
||
|
<path
|
||
|
d="m 113.53278,30.932772 -8.69884,-5.022277 8.69884,-5.022275 z"
|
||
|
id="path4984"
|
||
|
style="opacity:1;vector-effect:none;fill:#558c3d;fill-opacity:0.71119133;stroke:none;stroke-width:2.26596642;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2.26596625, 2.26596625;stroke-dashoffset:0;stroke-opacity:0.74117647;paint-order:stroke markers fill" />
|
||
|
<path
|
||
|
d="m 113.91916,379.99377 -8.69884,-5.02227 8.69884,-5.02228 z"
|
||
|
id="path4984-8"
|
||
|
style="display:inline;opacity:1;vector-effect:none;fill:#558c3d;fill-opacity:0.71119133;stroke:none;stroke-width:2.26596642;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2.26596627, 2.26596627;stroke-dashoffset:0;stroke-opacity:0.74117647;paint-order:stroke markers fill" />
|
||
|
<path
|
||
|
d="m 124.96248,429.10303 -8.69884,-5.02228 8.69884,-5.02228 z"
|
||
|
id="path4984-8-8-6"
|
||
|
style="display:inline;opacity:1;vector-effect:none;fill:#558c3d;fill-opacity:0.71119133;stroke:none;stroke-width:2.26596642;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2.26596632, 2.26596632;stroke-dashoffset:0;stroke-opacity:0.74117647;paint-order:stroke markers fill" />
|
||
|
<text
|
||
|
id="text4702-2"
|
||
|
y="235.34866"
|
||
|
x="108.45959"
|
||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||
|
xml:space="preserve"><tspan
|
||
|
id="tspan4972-5"
|
||
|
style="fill:#558c3d;fill-opacity:1;stroke-width:0.26458332"
|
||
|
y="235.34866"
|
||
|
x="108.45959">2. Refer to ESP8266WebServer</tspan></text>
|
||
|
<path
|
||
|
d="m 105.91244,238.99179 -8.698832,-5.02228 8.698842,-5.02227 z"
|
||
|
id="path4984-6"
|
||
|
style="display:inline;opacity:1;vector-effect:none;fill:#558c3d;fill-opacity:0.71119133;stroke:none;stroke-width:2.26596642;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:2.26596627, 2.26596627;stroke-dashoffset:0;stroke-opacity:0.74117647;paint-order:stroke markers fill" />
|
||
|
</g>
|
||
|
</svg>
|