Files
Kevin Thomas f62db776e1 Initial commit
2026-07-06 14:32:12 -04:00

72 lines
3.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
<style>
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
.dim{font:20px 'Courier New',monospace;fill:#888}
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
.badge{stroke:#00ff41;rx:14}
</style>
<rect class="bg" width="1200" height="800"/>
<rect class="hdr" x="0" y="0" width="1200" height="100" rx="0"/>
<text class="title" x="600" y="52" text-anchor="middle">DHT11 Sensor</text>
<text class="dim" x="600" y="88" text-anchor="middle">Single-Wire Temperature and Humidity</text>
<!-- Left: Pinout and Specs -->
<rect class="pnl" x="30" y="110" width="555" height="260" rx="8"/>
<text class="sub" x="50" y="145">DHT11 Pinout</text>
<rect x="180" y="165" width="120" height="80" rx="4" fill="#0a0a0f" stroke="#00ff41" stroke-width="2"/>
<text class="grn" x="205" y="212">DHT11</text>
<text class="dim" x="180" y="265">1:VCC 2:DATA 3:NC 4:GND</text>
<text class="dim" x="50" y="300">Humidity: 20-90% RH (+/-5%)</text>
<text class="dim" x="50" y="325">Temp: 0-50C (+/-2C)</text>
<text class="dim" x="50" y="350">Protocol: custom one-wire</text>
<!-- Right: Wiring -->
<rect class="pnl" x="615" y="110" width="555" height="260" rx="8"/>
<text class="sub" x="635" y="145">Wiring to Pico 2</text>
<rect x="635" y="165" width="100" height="45" rx="4" fill="#0a0a0f" stroke="#00d4ff" stroke-width="1"/>
<text class="cyn" x="655" y="194">Pico</text>
<rect x="1040" y="165" width="100" height="45" rx="4" fill="#0a0a0f" stroke="#00ff41" stroke-width="1"/>
<text class="grn" x="1055" y="194">DHT11</text>
<line x1="735" y1="178" x2="1040" y2="178" stroke="#ffaa00" stroke-width="2"/>
<line x1="735" y1="198" x2="1040" y2="198" stroke="#888" stroke-width="2"/>
<text class="dim" x="635" y="230">GPIO 4 = DATA</text>
<text class="dim" x="635" y="255">3.3V = VCC</text>
<text class="dim" x="635" y="280">GND = GND</text>
<!-- Communication Protocol -->
<rect class="pnl" x="635" y="295" width="555" height="75" rx="6"/>
<text class="dim" x="655" y="320">1. Host pulls LOW 18ms</text>
<text class="dim" x="655" y="345">2. DHT11 responds, sends 40 bits</text>
<!-- Source Code -->
<rect class="pnl" x="30" y="385" width="1140" height="380" rx="8"/>
<text class="sub" x="50" y="420">Source Code: 0x001a_operators.c</text>
<rect x="50" y="435" width="1100" height="310" rx="6" fill="#0a0a0f" stroke="#1a1a2e"/>
<text class="cyn" x="70" y="465">int x = 5, y = 10;</text>
<text class="txt" x="70" y="495">int arithmetic = (x * y);</text>
<text class="dim" x="530" y="495">// 50</text>
<text class="txt" x="70" y="525">int increment = x++;</text>
<text class="dim" x="530" y="525">// 5 (post)</text>
<text class="txt" x="70" y="555">bool relational = (x &gt; y);</text>
<text class="dim" x="530" y="555">// false</text>
<text class="txt" x="70" y="585">bool logical = (x&gt;y)&amp;&amp;(y&gt;x);</text>
<text class="dim" x="530" y="585">// false</text>
<text class="txt" x="70" y="615">int bitwise = (x&lt;&lt;1);</text>
<text class="dim" x="530" y="615">// 12</text>
<text class="txt" x="70" y="645">int assignment = (x += 5);</text>
<text class="dim" x="530" y="645">// 11</text>
<text class="cyn" x="70" y="680">float hum, temp;</text>
<text class="txt" x="70" y="710">dht11_read(&amp;hum, &amp;temp);</text>
</svg>