text:
2.3766" y1="-3.121" x2="-2.1734" y2="-2.2828" layer="51"/>
<rectangle x1="-1.7266" y1="-3.121" x2="-1.5234" y2="-2.2828" layer="51"/>
<rectangle x1="-1.0766" y1="-3.121" x2="-0.8734" y2="-2.2828" layer="51"/>
<rectangle x1="-0.4266" y1="-3.121" x2="-0.2234" y2="-2.2828" layer="51"/>
<rectangle x1="0.2234" y1="-3.121" x2="0.4266" y2="-2.2828" layer="51"/>
<rectangle x1="0.8734" y1="-3.121" x2="1.0766" y2="-2.2828" layer="51"/>
<rectangle x1="1.5234" y1="-3.121" x2="1.7266" y2="-2.2828" layer="51"/>
<rectangle x1="1.5234" y1="2.2828" x2="1.7266" y2="3.121" layer="51"/>
<rectangle x1="0.8734" y1="2.2828" x2="1.0766" y2="3.121" layer="51"/>
<rectangle x1="0.2234" y1="2.2828" x2="0.4266" y2="3.121" layer="51"/>
<rectangle x1="-0.4266" y1="2.2828" x2="-0.2234" y2="3.121" layer="51"/>
<rectangle x1="-1.0766" y1="2.2828" x2="-0.8734" y2="3.121" layer="51"/>
<rectangle x1="-1.7266" y1="2.2828" x2="-1.5234" y2="3.121" layer="51"/>
<rectangle x1="-2.3766" y1="2.2828" x2="-2.1734" y2="3.121" layer="51"/>
<rectangle x1="-3.0266" y1="2.2828" x2="-2.8234" y2="3.121" layer="51"/>
<rectangle x1="2.1734" y1="-3.121" x2="2.3766" y2="-2.2828" layer="51"/>
<rectangle x1="2.8234" y1="-3.121" x2="3.0266" y2="-2.2828" layer="51"/>
<rectangle x1="2.1734" y1="2.2828" x2="2.3766" y2="3.121" layer="51"/>
<rectangle x1="2.8234" y1="2.2828" x2="3.0266" y2="3.121" layer="51"/>
</package>
</packages>
<symbols>
<symbol name="TXB0108PWR" library_version="1">
<wire x1="-12.7" y1="17.78" x2="12.7" y2="17.78" width="0.254" layer="94"/>
<wire x1="12.7" y1="17.78" x2="12.7" y2="-20.32" width="0.254" layer="94"/>
<wire x1="12.7" y1="-20.32" x2="-12.7" y2="-20.32" width="0.254" layer="94"/>
<wire x1="-12.7" y1="-20.32" x2="-12.7" y2="17.78" width="0.254" layer="94"/>
<wire x1="-12.7" y1="-17.78" x2="-2.54" y2="-17.78" width="0.127" layer="97" style="shortdash"/>
<wire x1="2.54" y1="-17.78" x2="12.7" y2="-17.78" width="0.127" layer="97" style="shortdash"/>
<wire x1="-12.7" y1="7.62" x2="-2.54" y2="7.62" width="0.127" layer="97" style="shortdash"/>
<wire x1="-2.54" y1="-17.78" x2="-2.54" y2="7.62" width="0.127" layer="97" style="shortdash"/>
<wire x1="12.7" y1="7.62" x2="2.54" y2="7.62" width="0.127" layer="97" style="shortdash"/>
<wire x1="2.54" y1="7.62" x2="2.54" y2="-17.78" width="0.127" layer="97" style="shortdash"/>
<text x="-12.7" y="20.32" size="1.27" layer="95">>NAME</text>
<text x="-12.7" y="-22.86" size="1.27" layer="96">>VALUE</text>
<text x="-11.43" y="-16.51" size="1.27" layer="97">1.2-3.6V</text>
<text x="3.175" y="-16.51" size="1.27" layer="97">1.65-5.5V</text>
<pin name="VCCA" x="-2.54" y="20.32" length="short" rot="R270"/>
<pin name="A1" x="-15.24" y="5.08" length="short"/>
<pin name="A2" x="-15.24" y="2.54" length="short"/>
<pin name="A3" x="-15.24" y="0" length="short"/>
<pin name="A4" x="-15.24" y="-2.54" length="short"/>
<pin name="A5" x="-15.24" y="-5.08" length="short"/>
<pin name="A6" x="-15.24" y="-7.62" length="short"/>
<pin name="A7" x="-15.24" y="-10.16" length="short"/>
<pin name="A8" x="-15.24" y="-12.7" length="short"/>
<pin name="GND" x="0" y="-22.86" length="short" rot="R90"/>
<pin name="VCCB" x="2.54" y="20.32" length="short" rot="R270"/>
<pin name="B1" x="15.24" y="5.08" length="short" rot="R180"/>
<pin name="B2" x="15.24" y="2.54" length="short" rot="R180"/>
<pin name="B3" x="15.24" y="0" length="short" rot="R180"/>
<pin name="B4" x="15.24" y="-2.54" length="short" rot="R180"/>
<pin name="B5" x="15.24" y="-5.08" length="short" rot="R180"/>
<pin name="B6" x="15.24" y="-7.62" length="short" rot="R180"/>
<pin name="B7" x="15.24" y="-10.16" length="short" rot="R180"/>
<pin name="B8" x="15.24" y="-12.7" length="short" rot="R180"/>
<pin name="OE" x="-15.24" y="12.7" length="short"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="TXB0108PWR" prefix="U" uservalue="yes" library_version="1">
<description>8-Bit Bi-Directional Level Shifter

1.2V-3.6V (VCCA) to 1.65V-5.5V (VCCB) bi-directional level shifter with auto direction sensing.

Max data rate - VCCA 1.8V:  20Mbps (50ns), VCCA 3.3V: 100Mbps (10ns)

Digikey: 296-21527-1-ND
</description>
<gates>
<gate name="G$1" symbol="TXB0108PWR" x="0" y="0"/>
</gates>
<devices>
<device name="" package="TSSOP20">
<connects>
<connect gate="G$1" pin="A1" pad="1"/>
<connect gate="G$1" pin="A2" pad="3"/>
<connect gate="G$1" pin="A3" pad="4"/>
<connect gate="G$1" pin="A4" pad="5"/>
<connect gate="G$1" pin="A5" pad="6"/>
<connect gate="G$1" pin="A6" pad="7"/>
<connect gate="G$1" pin="A7" pad="8"/>
<connect gate="G$1" pin="A8" pad="9"/>
<connect gate="G$1" pin="B1" pad="20"/>
<connect gate="G$1" pin="B2" pad="18"/>
<connect gate="G$1" pin="B3" pad="17"/>
<connect gate="G$1" pin="B4" pad="16"/>
<connect gate="G$1" pin="B5" pad="15"/>
<connect gate="G$1" pin="B6" pad="14"/>
<connect gate="G$1" pin="B7" pad="13"/>
<connect gate="G$1" pin="B8" pad="12"/>
<connect gate="G$1" pin="GND" pad="11"/>
<connect gate="G$1" pin="OE" pad="10"/>
<connect gate="G$1" pin="VCCA" pad="2"/>
<connect gate="G$1" pin="VCCB" pad="19"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
<library name="AP7215-33YG">
<packages>
<package name="SOT89-3L">
<smd name="1" x="-1.5" y="-1.8542" dx="0.889" dy="1.2954" layer="1"/>
<smd name="2" x="0" y="-1.8542" dx="0.889" dy="1.2954" layer="1"/>
<smd name="3" x="1.5" y="-1.8542" dx="0.889" dy="1.2954" layer="1"/>
<smd name="4" x="0" y="0.7493" dx="1.7018" dy="2.6924" layer="1"/>
<wire x1="-1.27" y1="-1.2446" x2="-1.7526" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="-1.7526" y1="-1.2446" x2="-1.7526" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="-1.7526" y1="-2.4384" x2="-1.27" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="-1.27" y1="-2.4384" x2="-1.27" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="0.254" y1="-1.2446" x2="-0.254" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="-0.254" y1="-1.2446" x2="-0.2286" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="-0.2286" y1="-2.4384" x2="0.254" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="0.254" y1="-2.4384" x2="0.254" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="1.7526" y1="-1.2446" x2="1.27" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="1.27" y1="-1.2446" x2="1.27" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="1.27" y1="-2.4384" x2="1.7526" y2="-2.4384" width="0.1524" layer="51"/>
<wire x1="1.7526" y1="-2.4384" x2="1.7526" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="-0.8128" y1="1.2446" x2="0.7874" y2="1.2446" width="0.1524" layer="51"/>
<wire x1="0.7874" y1="1.2446" x2="0.7874" y2="1.778" width="0.1524" layer="51"/>
<wire x1="0.7874" y1="1.778" x2="-0.8128" y2="1.778" width="0.1524" layer="51"/>
<wire x1="-0.8128" y1="1.778" x2="-0.8128" y2="1.2446" width="0.1524" layer="51"/>
<wire x1="-2.2352" y1="-1.2446" x2="2.2352" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="2.2352" y1="-1.2446" x2="2.2352" y2="1.2446" width="0.1524" layer="51"/>
<wire x1="2.2352" y1="1.2446" x2="-2.2352" y2="1.2446" width="0.1524" layer="51"/>
<wire x1="-2.2352" y1="1.2446" x2="-2.2352" y2="-1.2446" width="0.1524" layer="51"/>
<wire x1="-1.8796" y1="-0.9906" x2="-2.1336" y2="-0.9906" width="0" layer="51" curve="-180"/>
<wire x1="-2.1336" y1="-0.9906" x2="-1.8796" y2="-0.9906" width="0" layer="51" curve="-180"/>
<wire x1="2.3876" y1="-1.3716" x2="2.3876" y2="1.3716" width="0.1524" layer="21"/>
<wire x1="2.3876" y1="1.3716" x2="1.1938" y2="1.3716" width="0.1524" layer="21"/>
<wire x1="-2.3876" y1="1.3716" x2="-2.3876" y2="-1.3716" width="0.1524" layer="21"/>
<wire x1="-1.1938" y1="1.3716" x2="-2.3876" y2="1.3716" width="0.1524" layer="21"/>
<wire x1="-3.4036" y1="-2.4384" x2="-3.6576" y2="-2.4384" width="0.1524" layer="21" curve="-180"/>
<wire x1="-3.6576" y1="-2.4384" x2="-3.4036" y2="-2.4384" width="0.1524" layer="21" curve="-180"/>
<polygon width="0.0254" layer="29">
<vertex x="-0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-0.508"/>
<vertex x="-0.4445" y="-0.508"/>
</polygon>
<polygon width="0.0254" layer="31">
<vertex x="-0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-0.508"/>
<vertex x="-0.4445" y="-0.508"/>
</polygon>
<polygon width="0.0254" layer="1">
<vertex x="-0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-1.2065"/>
<vertex x="0.4445" y="-0.508"/>
<vertex x="-0.4445" y="-0.508"/>
</polygon>
<text x="-3.2766" y="-0.635" size="1.27" layer="25" ratio="6" rot="SR0">>Name</text>
</package>
<package name="SOT89-3L-M">
<smd name="1" x="-1.5" y="-1.852403125" dx="0.9" dy="1.3" layer="1"/>
<smd name="2" x="0" y="-1.852403125" dx="0.9" dy="1.3" layer="1"/>
<smd name="3" x="1.5" y="-1.852403125" dx="0.9" dy="1.3" layer="1"/>
<wire x1="-1.2192" y1="-1.2954" x2="-1.778" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-1.778" y1="-1.2954" x2="-1.778" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-1.778" y1="-2.4892" x2="-1.2192" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-1.2192" y1="-2.4892" x2="-1.2192" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="0.2794" y1="-1.2954" x2="-0.2794" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-0.2794" y1="-1.2954" x2="-0.2794" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-0.2794" y1="-2.4892" x2="0.2794" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="0.2794" y1="-2.4892" x2="0.2794" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="1.778" y1="-1.2954" x2="1.2192" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="1.2192" y1="-1.2954" x2="1.2192" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="1.2192" y1="-2.4892" x2="1.778" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="1.778" y1="-2.4892" x2="1.778" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-2.3114" y1="-1.2954" x2="2.3114" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="2.3114" y1="-1.2954" x2="2.3114" y2="1.2954" width="0.1524" layer="51"/>
<wire x1="2.3114" y1="1.2954" x2="-2.3114" y2="1.2954" width="0.1524" layer="51"/>
<wire x1="-2.3114" y1="1.2954" x2="-2.3114" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-1.9304" y1="-1.0414" x2="-2.1844" y2="-1.0414" width="0" layer="51" curve="-180"/>
<wire x1="-2.1844" y1="-1.0414" x2="-1.9304" y2="-1.0414" width="0" layer="51" curve="-180"/>
<polygon width="0.1524" layer="1">
<vertex x="-0.3208" y="-1.3"/>
<vertex x="-0.3208" y="-1.0008"/>
<vertex x="-0.9173" y="-0.4551"/>
<vertex x="-0.9173" y="2.8588"/>
<vertex x="-0.48405" y="2.8588"/>
<vertex x="0.48405" y="2.8588"/>
<vertex x="0.9173" y="2.8588"/>
<vertex x="0.9173" y="-0.4551"/>
<vertex x="0.3208" y="-1.0008"/>
<vertex x="0.3208" y="-1.3"/>
</polygon>
<polygon width="0.1524" layer="29">
<vertex x="-0.3208" y="-1.3"/>
<vertex x="-0.3208" y="-1.0008"/>
<vertex x="-0.9173" y="-0.4551"/>
<vertex x="-0.9173" y="2.8588"/>
<vertex x="0.9173" y="2.8588"/>
<vertex x="0.9173" y="-0.4551"/>
<vertex x="0.3208" y="-1.0008"/>
<vertex x="0.3208" y="-1.3"/>
</polygon>
<polygon width="0.1524" layer="31">
<vertex x="-0.3208" y="-1.3"/>
<vertex x="-0.3208" y="-1.0008"/>
<vertex x="-0.9173" y="-0.4551"/>
<vertex x="-0.9173" y="2.8588"/>
<vertex x="0.9173" y="2.8588"/>
<vertex x="0.9173" y="-0.4551"/>
<vertex x="0.3208" y="-1.0008"/>
<vertex x="0.3208" y="-1.3"/>
</polygon>
<wire x1="2.4384" y1="-1.4224" x2="2.4384" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="2.4384" y1="1.4224" x2="1.2446" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="-2.4384" y1="1.4224" x2="-2.4384" y2="-1.4224" width="0.1524" layer="21"/>
<wire x1="-1.2446" y1="1.4224" x2="-2.4384" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="-3.4544" y1="-2.3114" x2="-3.7084" y2="-2.3114" width="0.1524" layer="21" curve="-180"/>
<wire x1="-3.7084" y1="-2.3114" x2="-3.4544" y2="-2.3114" width="0.1524" layer="21" curve="-180"/>
<text x="-3.2766" y="-0.635" size="1.27" layer="25" ratio="6" rot="SR0">>Name</text>
</package>
<package name="SOT89-3L-L">
<smd name="1" x="-1.5" y="-1.750803125" dx="0.9" dy="1.3" layer="1"/>
<smd name="2" x="0" y="-1.750803125" dx="0.9" dy="1.3" layer="1"/>
<smd name="3" x="1.5" y="-1.750803125" dx="0.9" dy="1.3" layer="1"/>
<wire x1="-1.2192" y1="-1.2954" x2="-1.778" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-1.778" y1="-1.2954" x2="-1.778" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-1.778" y1="-2.4892" x2="-1.2192" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-1.2192" y1="-2.4892" x2="-1.2192" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="0.2794" y1="-1.2954" x2="-0.2794" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-0.2794" y1="-1.2954" x2="-0.2794" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="-0.2794" y1="-2.4892" x2="0.2794" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="0.2794" y1="-2.4892" x2="0.2794" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="1.778" y1="-1.2954" x2="1.2192" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="1.2192" y1="-1.2954" x2="1.2192" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="1.2192" y1="-2.4892" x2="1.778" y2="-2.4892" width="0.1524" layer="51"/>
<wire x1="1.778" y1="-2.4892" x2="1.778" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-2.3114" y1="-1.2954" x2="2.3114" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="2.3114" y1="-1.2954" x2="2.3114" y2="1.2954" width="0.1524" layer="51"/>
<wire x1="2.3114" y1="1.2954" x2="-2.3114" y2="1.2954" width="0.1524" layer="51"/>
<wire x1="-2.3114" y1="1.2954" x2="-2.3114" y2="-1.2954" width="0.1524" layer="51"/>
<wire x1="-1.9304" y1="-1.0414" x2="-2.1844" y2="-1.0414" width="0" layer="51" curve="-180"/>
<wire x1="-2.1844" y1="-1.0414" x2="-1.9304" y2="-1.0414" width="0" layer="51" curve="-180"/>
<polygon width="0.1524" layer="1">
<vertex x="-0.27" y="-1.3"/>
<vertex x="-0.27" y="-0.95"/>
<vertex x="-0.8665" y="-0.3535"/>
<vertex x="-0.8665" y="2.4524"/>
<vertex x="-0.43325" y="2.4524"/>
<vertex x="0.43325" y="2.4524"/>
<vertex x="0.8665" y="2.4524"/>
<vertex x="0.8665" y="-0.3535"/>
<vertex x="0.27" y="-0.95"/>
<vertex x="0.27" y="-1.3"/>
</polygon>
<polygon width="0.1524" layer="29">
<vertex x="-0.27" y="-1.3"/>
<vertex x="-0.27" y="-0.95"/>
<vertex x="-0.8665" y="-0.3535"/>
<vertex x="-0.8665" y="2.4524"/>
<vertex x="0.8665" y="2.4524"/>
<vertex x="0.8665" y="-0.3535"/>
<vertex x="0.27" y="-0.95"/>
<vertex x="0.27" y="-1.3"/>
</polygon>
<polygon width="0.1524" layer="31">
<vertex x="-0.27" y="-1.3"/>
<vertex x="-0.27" y="-0.95"/>
<vertex x="-0.8665" y="-0.3535"/>
<vertex x="-0.8665" y="2.4524"/>
<vertex x="0.8665" y="2.4524"/>
<vertex x="0.8665" y="-0.3535"/>
<vertex x="0.27" y="-0.95"/>
<vertex x="0.27" y="-1.3"/>
</polygon>
<wire x1="2.4384" y1="-1.4224" x2="2.4384" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="2.4384" y1="1.4224" x2="1.1938" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="-2.4384" y1="1.4224" x2="-2.4384" y2="-1.4224" width="0.1524" layer="21"/>
<wire x1="-1.1938" y1="1.4224" x2="-2.4384" y2="1.4224" width="0.1524" layer="21"/>
<wire x1="-3.4544" y1="-2.3114" x2="-3.7084" y2="-2.3114" width="0.1524" layer="21" curve="-180"/>
<wire x1="-3.7084" y1="-2.3114" x2="-3.4544" y2="-2.3114" width="0.1524" layer="21" curve="-180"/>
<text x="-3.2766" y="-0.635" size="1.27" layer="25" ratio="6" rot="SR0">>Name</text>
</package>
</packages>
<symbols>
<symbol name="AP7215-33YG-13">
<pin name="GND" x="2.54" y="0" length="middle" direction="pwr"/>
<pin name="VIN" x="58.42" y="-2.54" length="middle" direction="in" rot="R180"/>
<pin name="VROUT" x="58.42" y="0" length="middle" direction="out" rot="R180"/>
<wire x1="7.62" y1="5.08" x2="7.62" y2="-7.62" width="0.1524" layer="94"/>
<wire x1="7.62" y1="-7.62" x2="53.34" y2="-7.62" width="0.1524" layer="94"/>
<wire x1="53.34" y1="-7.62" x2="53.34" y2="5.08" width="0.1524" layer="94"/>
<wire x1="53.34" y1="5.08" x2="7.62" y2="5.08" width="0.1524" layer="94"/>
<text x="25.7556" y="9.1186" size="2.0828" layer="95" ratio="6" rot="SR0">>Name</text>
<text x="25.1206" y="6.5786" size="2.0828" layer="96" ratio="6" rot="SR0">>Value</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="AP7215-33YG-13" prefix="U">
<gates>
<gate name="A" symbol="AP7215-33YG-13" x="0" y="0"/>
</gates>
<devices>
<device name="" package="SOT89-3L">
<connects>
<connect gate="A" pin="GND" pad="1"/>
<connect gate="A" pin="VIN" pad="2"/>
<connect gate="A" pin="VROUT" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="MANUFACTURER_PART_NUMBER" value="AP721533YG13" constant="no"/>
<attribute name="VENDOR" value="Diodes Inc" constant="no"/>
</technology>
</technologies>
</device>
<device name="SOT89-3L-M" package="SOT89-3L-M">
<connects>
<connect gate="A" pin="GND" pad="1"/>
<connect gate="A" pin="VIN" pad="2"/>
<connect gate="A" pin="VROUT" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="MANUFACTURER_PART_NUMBER" value="AP721533YG13" constant="no"/>
<attribute name="VENDOR" value="Diodes Inc" constant="no"/>
</technology>
</technologies>
</device>
<device name="SOT89-3L-L" package="SOT89-3L-L">
<connects>
<connect gate="A" pin="GND" pad="1"/>
<connect gate="A" pin="VIN" pad="2"/>
<connect gate="A" pin="VROUT" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="MANUFACTURER_PART_NUMBER" value="AP721533YG13" constant="no"/>
<attribute name="VENDOR" value="Diodes Inc" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<parts>
<part name="1284P" library="Atmel_By_element14_Batch_1-00" deviceset="ATMEGA1284P-AU" device=""/>
<part name="XTAL" library="special" deviceset="XTAL/S" device="" value="16MHz"/>
<part name="C2" library="rcl" deviceset="C-EU" device="C0603" value="22pF"/>
<part name="C3" library="rcl" deviceset="C-EU" device="C0603" value="22pF"/>
<part name="R5" library="rcl" deviceset="R-EU_" device="R0603" value="10k"/>
<part name="C4" library="rcl" deviceset="C-EU" device="C0603" value="100nF"/>
<part name="C5" library="rcl" deviceset="C-EU" device="C0805" value="10uF"/>
<part name="IC" library="ftdichip" deviceset="FT230X" device="S"/>
<part name="USB" library="adafruit" deviceset="USB" device="MOLEX"/>
<part name="R1" library="rcl" deviceset="R-EU_" device="R0603" value="10"/>
<part name="R2" library="rcl" deviceset="R-EU_" device="R0603" value="10"/>
<part name="C1" library="rcl" deviceset="C-EU" device="C0603" value="100nF"/>
<part name="RX" library="eagle-ltspice" deviceset="LED_E" device="SML0603"/>
<part name="TX" library="eagle-ltspice" deviceset="LED_E" device="SML0603"/>
<part name="R3" library="rcl" deviceset="R-EU_" device="R0603" value="1K"/>
<part name="R4" library="rcl" deviceset="R-EU_" device="R0603" value="270"/>
<part name="C6" library="rcl" deviceset="C-EU" device="C0603" value="47pF"/>
<part name="C7" library="rcl" deviceset="C-EU" device="C0603" value="47pF"/>
<part name="R6" library="rcl" deviceset="R-EU_" device="R0603" value="27"/>
<part name="R7" library="rcl" deviceset="R-EU_" device="R0603" value="27"/>
<part name="UART" library="SparkFun-Connectors" deviceset="M04" device="PTH"/>
<part name="JP1" library="SparkFun-Connectors" deviceset="M02" device="PTH"/>
<part name="DTR" library="SparkFun-Connectors" library_urn="urn:adsk.eagle:library:513" deviceset="CONN_01" device="" package3d_urn="urn:adsk.eagle:package:38028/1"/>
<part name="INAIR_R" library="SparkFun-Connectors" library_urn="urn:adsk.eagle:library:513" deviceset="CONN_07" device="" package3d_urn="urn:adsk.eagle:package:38129/1"/>
<part name="INAIR_L" library="SparkFun-Connectors" library_urn="urn:adsk.eagle:library:513" deviceset="CONN_07" device="" package3d_urn="urn:adsk.eagle:package:38129/1"/>
<part name="U1" library="adafruit" library_urn="urn:adsk.eagle:library:420" deviceset="TXB0108PWR" device="" value="TXB0108"/>
<part name="C8" library="rcl" deviceset="C-EU" device="C0603" value="100nF"/>
<part name="C9" library="rcl" deviceset="C-EU" device="C0603" value="100nF"/>
<part name="U2" library="AP7215-33YG" deviceset="AP7215-33YG-13" device=""/>
<part name="RF_RX" library="eagle-ltspice" deviceset="LED_E" device="SML0603"/>
<part name="RF_TX" library="eagle-ltspice" deviceset="LED_E" device="SML0603"/>
<part name="R9" library="rcl" deviceset="R-EU_" device="R0603" value="270"/>
<part name="R10" library="rcl" deviceset="R-EU_" device="R0603" value="2.2K"/>
</parts>
<sheets>
<sheet>
<plain>
</plain>
<instances>
<instance part="1284P" gate="A" x="45.72" y="40.64"/>
<instance part="XTAL" gate="G$1" x="38.1" y="93.98"/>
<instance part="C2" gate="G$1" x="33.02" y="104.14" rot="R180"/>
<instance part="C3" gate="G$1" x="43.18" y="104.14" rot="R180"/>
<instance part="R5" gate="G$1" x="-30.48" y="76.2"/>
<instance part="C4" gate="G$1" x="-20.32" y="68.58" rot="R180"/>
<instance part="C5" gate="G$1" x="-15.24" y="71.12"/>
<instance part="IC" gate="G$1" x="-116.84" y="81.28"/>
<instance part="USB" gate="G$1" x="-116.84" y="53.34" rot="R270"/>
<instance part="R1" gate="G$1" x="-147.32" y="73.66" smashed="yes" rot="R90">
<attribute name="NAME" x="-148.8186" y="69.85" size="1.778" layer="95" rot="R90"/>
<attribute name="VALUE" x="-149.098" y="74.93" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="R2" gate="G$1" x="-162.56" y="73.66" smashed="yes" rot="R90">
<attribute name="NAME" x="-164.0586" y="69.85" size="1.778" layer="95" rot="R90"/>
<attribute name="VALUE" x="-164.338" y="74.93" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="C1" gate="G$1" x="-157.48" y="71.12" smashed="yes" rot="R180">
<attribute name="NAME" x="-158.115" y="73.914" size="1.778" layer="95" rot="R90"/>
<attribute name="VALUE" x="-155.067" y="73.914" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="RX" gate="G$1" x="-88.9" y="86.36" rot="R270"/>
<instance part="TX" gate="G$1" x="-139.7" y="43.18" rot="R180"/>
<instance part="R3" gate="G$1" x="-78.74" y="86.36" rot="R180"/>
<instance part="R4" gate="G$1" x="-139.7" y="33.02" rot="R90"/>
<instance part="C6" gate="G$1" x="-101.6" y="58.42" smashed="yes" rot="R180">
<attribute name="NAME" x="-102.235" y="61.214" size="1.778" layer="95" rot="R90"/>
<attribute name="VALUE" x="-99.187" y="61.214" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="C7" gate="G$1" x="-132.08" y="58.42" smashed="yes" rot="R180">
<attribute name="NAME" x="-132.715" y="61.214" size="1.778" layer="95" rot="R90"/>
<attribute name="VALUE" x="-129.667" y="61.214" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="R6" gate="G$1" x="-104.14" y="20.32" smashed="yes" rot="R180">
<attribute name="NAME" x="-103.886" y="19.0754" size="1.778" layer="95" rot="R180"/>
<attribute name="VALUE" x="-100.584" y="19.05" size="1.778" layer="96" rot="R180"/>
</instance>
<instance part="R7" gate="G$1" x="-104.14" y="25.4" smashed="yes" rot="R180">
<attribute name="NAME" x="-103.886" y="28.7274" size="1.778" layer="95" rot="R180"/>
<attribute name="VALUE" x="-100.33" y="28.702" size="1.778" layer="96" rot="R180"/>
</instance>
<instance part="UART" gate="G$1" x="106.68" y="68.58" rot="R180"/>
<instance part="JP1" gate="G$1" x="-60.96" y="73.66" smashed="yes" rot="R180">
<attribute name="NAME" x="-58.42" y="67.818" size="1.778" layer="95" rot="R180"/>
</instance>
<instance part="DTR" gate="G$1" x="20.32" y="-17.78"/>
<instance part="INAIR_R" gate="G$1" x="-60.96" y="-15.24"/>
<instance part="INAIR_L" gate="G$1" x="-60.96" y="15.24"/>
<instance part="U1" gate="G$1" x="-12.7" y="20.32"/>
<instance part="C8" gate="G$1" x="-22.86" y="53.34" smashed="yes" rot="R270">
<attribute name="NAME" x="-25.654" y="52.705" size="1.778" layer="95" rot="R180"/>
<attribute name="VALUE" x="-25.654" y="55.753" size="1.778" layer="96" rot="R180"/>
</instance>
<instance part="C9" gate="G$1" x="2.54" y="53.34" smashed="yes" rot="R270">
<attribute name="NAME" x="-0.254" y="52.705" size="1.778" layer="95" rot="R180"/>
<attribute name="VALUE" x="-0.254" y="55.753" size="1.778" layer="96" rot="R180"/>
</instance>
<instance part="U2" gate="A" x="-147.32" y="-12.7"/>
<instance part="RF_RX" gate="G$1" x="88.9" y="40.64"/>
<instance part="RF_TX" gate="G$1" x="78.74" y="40.64"/>
<instance part="R9" gate="G$1" x="78.74" y="50.8" rot="R90"/>
<instance part="R10" gate="G$1" x="88.9" y="50.8" rot="R90"/>
</instances>
<busses>
</busses>
<nets>
<net name="GND" class="0">
<segment>
<pinref part="1284P" gate="A" pin="GND_2"/>
<wire x1="27.94" y1="5.08" x2="20.32" y2="5.08" width="0.1524" layer="91"/>
<wire x1="20.32" y1="5.08" x2="20.32" y2="2.54" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="GND"/>
<wire x1="20.32" y1="2.54" x2="20.32" y2="0" width="0.1524" layer="91"/>
<wire x1="20.32" y1="0" x2="20.32" y2="-2.54" width="0.1524" layer="91"/>
<wire x1="20.32" y1="-2.54" x2="27.94" y2="-2.54" width="0.1524" layer="91"/>
<wire x1="20.32" y1="5.08" x2="15.24" y2="5.08" width="0.1524" layer="91"/>

<junction x="20.32" y="5.08"/>
<pinref part="1284P" gate="A" pin="GND_3"/>
<wire x1="27.94" y1="2.54" x2="20.32" y2="2.54" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="GND_4"/>
<wire x1="27.94" y1="0" x2="20.32" y2="0" width="0.1524" layer="91"/>
<junction x="20.32" y="2.54"/>
<junction x="20.32" y="0"/>
</segment>
<segment>
<pinref part="C2" gate="G$1" pin="2"/>
<pinref part="C3" gate="G$1" pin="2"/>
<wire x1="33.02" y1="109.22" x2="38.1" y2="109.22" width="0.1524" layer="91"/>
<wire x1="38.1" y1="109.22" x2="43.18" y2="109.22" width="0.1524" layer="91"/>
<wire x1="38.1" y1="109.22" x2="38.1" y2="114.3" width="0.1524" layer="91"/>

<junction x="38.1" y="109.22"/>
</segment>
<segment>
<pinref part="C4" gate="G$1" pin="1"/>
<pinref part="C5" gate="G$1" pin="2"/>
<wire x1="-20.32" y1="66.04" x2="-15.24" y2="66.04" width="0.1524" layer="91"/>
<wire x1="-15.24" y1="66.04" x2="-7.62" y2="66.04" width="0.1524" layer="91"/>

<junction x="-15.24" y="66.04"/>
</segment>
<segment>
<pinref part="USB" gate="G$1" pin="GND"/>
<wire x1="-121.92" y1="43.18" x2="-121.92" y2="40.64" width="0.1524" layer="91"/>

<pinref part="C7" gate="G$1" pin="1"/>
<wire x1="-121.92" y1="40.64" x2="-121.92" y2="38.1" width="0.1524" layer="91"/>
<wire x1="-132.08" y1="55.88" x2="-132.08" y2="40.64" width="0.1524" layer="91"/>
<wire x1="-132.08" y1="40.64" x2="-121.92" y2="40.64" width="0.1524" layer="91"/>
<junction x="-121.92" y="40.64"/>
<pinref part="C6" gate="G$1" pin="1"/>
<wire x1="-101.6" y1="55.88" x2="-101.6" y2="40.64" width="0.1524" layer="91"/>
<wire x1="-101.6" y1="40.64" x2="-121.92" y2="40.64" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="IC" gate="G$1" pin="GND@1"/>
<wire x1="-101.6" y1="81.28" x2="-81.28" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-81.28" y1="81.28" x2="-81.28" y2="71.12" width="0.1524" layer="91"/>

<pinref part="JP1" gate="G$1" pin="2"/>
<wire x1="-81.28" y1="71.12" x2="-81.28" y2="66.04" width="0.1524" layer="91"/>
<wire x1="-81.28" y1="71.12" x2="-68.58" y2="71.12" width="0.1524" layer="91"/>
<junction x="-81.28" y="71.12"/>
</segment>
<segment>
<pinref part="IC" gate="G$1" pin="GND"/>
<wire x1="-132.08" y1="78.74" x2="-142.24" y2="78.74" width="0.1524" layer="91"/>
<wire x1="-142.24" y1="78.74" x2="-142.24" y2="66.04" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="INAIR_L" gate="G$1" pin="7"/>
<wire x1="-55.88" y1="25.4" x2="-53.34" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-53.34" y1="25.4" x2="-53.34" y2="35.56" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="U1" gate="G$1" pin="GND"/>
<wire x1="-12.7" y1="-2.54" x2="-12.7" y2="-7.62" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="C9" gate="G$1" pin="1"/>
<wire x1="5.08" y1="53.34" x2="10.16" y2="53.34" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="C8" gate="G$1" pin="2"/>
<wire x1="-27.94" y1="53.34" x2="-33.02" y2="53.34" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="U2" gate="A" pin="GND"/>
<wire x1="-144.78" y1="-12.7" x2="-144.78" y2="-7.62" width="0.1524" layer="91"/>

</segment>
<segment>
<wire x1="83.82" y1="30.48" x2="83.82" y2="25.4" width="0.1524" layer="91"/>

<pinref part="RF_RX" gate="G$1" pin="C"/>
<wire x1="88.9" y1="35.56" x2="88.9" y2="30.48" width="0.1524" layer="91"/>
<wire x1="88.9" y1="30.48" x2="83.82" y2="30.48" width="0.1524" layer="91"/>
<pinref part="RF_TX" gate="G$1" pin="C"/>
<wire x1="83.82" y1="30.48" x2="78.74" y2="30.48" width="0.1524" layer="91"/>
<wire x1="78.74" y1="30.48" x2="78.74" y2="35.56" width="0.1524" layer="91"/>
<junction x="83.82" y="30.48"/>
</segment>
</net>
<net name="5V" class="0">
<segment>
<pinref part="1284P" gate="A" pin="VCC"/>
<wire x1="27.94" y1="71.12" x2="20.32" y2="71.12" width="0.1524" layer="91"/>
<wire x1="20.32" y1="71.12" x2="20.32" y2="68.58" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="AVCC"/>
<wire x1="20.32" y1="68.58" x2="27.94" y2="68.58" width="0.1524" layer="91"/>
<wire x1="20.32" y1="68.58" x2="17.78" y2="68.58" width="0.1524" layer="91"/>

<junction x="20.32" y="68.58"/>
<pinref part="1284P" gate="A" pin="VCC_3"/>
<wire x1="27.94" y1="73.66" x2="20.32" y2="73.66" width="0.1524" layer="91"/>
<wire x1="20.32" y1="73.66" x2="20.32" y2="71.12" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="VCC_2"/>
<wire x1="27.94" y1="76.2" x2="20.32" y2="76.2" width="0.1524" layer="91"/>
<wire x1="20.32" y1="76.2" x2="20.32" y2="73.66" width="0.1524" layer="91"/>
<junction x="20.32" y="71.12"/>
<junction x="20.32" y="73.66"/>
<junction x="20.32" y="76.2"/>
</segment>
<segment>
<pinref part="R5" gate="G$1" pin="2"/>

<wire x1="-25.4" y1="76.2" x2="-20.32" y2="76.2" width="0.1524" layer="91"/>
<pinref part="C4" gate="G$1" pin="2"/>
<wire x1="-20.32" y1="76.2" x2="-15.24" y2="76.2" width="0.1524" layer="91"/>
<wire x1="-15.24" y1="76.2" x2="-7.62" y2="76.2" width="0.1524" layer="91"/>
<wire x1="-20.32" y1="73.66" x2="-20.32" y2="76.2" width="0.1524" layer="91"/>
<pinref part="C5" gate="G$1" pin="1"/>
<wire x1="-15.24" y1="73.66" x2="-15.24" y2="76.2" width="0.1524" layer="91"/>
<junction x="-20.32" y="76.2"/>
<junction x="-15.24" y="76.2"/>
</segment>
<segment>
<pinref part="USB" gate="G$1" pin="VBUS"/>
<wire x1="-111.76" y1="43.18" x2="-111.76" y2="38.1" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="IC" gate="G$1" pin="VCC"/>
<wire x1="-101.6" y1="78.74" x2="-86.36" y2="78.74" width="0.1524" layer="91"/>
<wire x1="-86.36" y1="78.74" x2="-86.36" y2="76.2" width="0.1524" layer="91"/>

<pinref part="IC" gate="G$1" pin="!RESET"/>
<wire x1="-86.36" y1="76.2" x2="-86.36" y2="73.66" width="0.1524" layer="91"/>
<wire x1="-86.36" y1="73.66" x2="-86.36" y2="66.04" width="0.1524" layer="91"/>
<wire x1="-101.6" y1="76.2" x2="-86.36" y2="76.2" width="0.1524" layer="91"/>
<junction x="-86.36" y="76.2"/>
<pinref part="JP1" gate="G$1" pin="1"/>
<wire x1="-86.36" y1="73.66" x2="-68.58" y2="73.66" width="0.1524" layer="91"/>
<junction x="-86.36" y="73.66"/>
</segment>
<segment>
<pinref part="IC" gate="G$1" pin="VCCIO"/>
<wire x1="-132.08" y1="83.82" x2="-152.4" y2="83.82" width="0.1524" layer="91"/>
<wire x1="-152.4" y1="83.82" x2="-152.4" y2="66.04" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="R3" gate="G$1" pin="1"/>
<wire x1="-73.66" y1="86.36" x2="-71.12" y2="86.36" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="R4" gate="G$1" pin="1"/>
<wire x1="-139.7" y1="27.94" x2="-139.7" y2="22.86" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="U1" gate="G$1" pin="VCCB"/>
<wire x1="-10.16" y1="40.64" x2="-10.16" y2="53.34" width="0.1524" layer="91"/>

<pinref part="C9" gate="G$1" pin="2"/>
<wire x1="-10.16" y1="53.34" x2="-10.16" y2="55.88" width="0.1524" layer="91"/>
<wire x1="-10.16" y1="53.34" x2="-2.54" y2="53.34" width="0.1524" layer="91"/>
<junction x="-10.16" y="53.34"/>
</segment>
<segment>
<pinref part="U2" gate="A" pin="VIN"/>
<wire x1="-88.9" y1="-15.24" x2="-88.9" y2="-20.32" width="0.1524" layer="91"/>

</segment>
</net>
<net name="XTAL1" class="0">
<segment>
<pinref part="XTAL" gate="G$1" pin="1"/>
<pinref part="C2" gate="G$1" pin="1"/>
<wire x1="33.02" y1="93.98" x2="33.02" y2="101.6" width="0.1524" layer="91"/>
<wire x1="33.02" y1="93.98" x2="5.08" y2="93.98" width="0.1524" layer="91"/>
<wire x1="5.08" y1="93.98" x2="5.08" y2="55.88" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="XTAL1"/>
<wire x1="5.08" y1="55.88" x2="27.94" y2="55.88" width="0.1524" layer="91"/>
<junction x="33.02" y="93.98"/>
</segment>
</net>
<net name="XTAL2" class="0">
<segment>
<pinref part="XTAL" gate="G$1" pin="2"/>
<pinref part="C3" gate="G$1" pin="1"/>
<wire x1="43.18" y1="93.98" x2="43.18" y2="101.6" width="0.1524" layer="91"/>
<wire x1="43.18" y1="93.98" x2="68.58" y2="93.98" width="0.1524" layer="91"/>
<wire x1="68.58" y1="93.98" x2="68.58" y2="76.2" width="0.1524" layer="91"/>
<pinref part="1284P" gate="A" pin="XTAL2"/>
<wire x1="68.58" y1="76.2" x2="63.5" y2="76.2" width="0.1524" layer="91"/>
<junction x="43.18" y="93.98"/>
</segment>
</net>
<net name="UART_TX0" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PD1"/>
<wire x1="63.5" y1="68.58" x2="78.74" y2="68.58" width="0.1524" layer="91"/>
<wire x1="78.74" y1="68.58" x2="78.74" y2="73.66" width="0.1524" layer="91"/>

<wire x1="78.74" y1="68.58" x2="101.6" y2="68.58" width="0.1524" layer="91"/>
<junction x="78.74" y="68.58"/>
<pinref part="UART" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="R1" gate="G$1" pin="1"/>
<wire x1="-147.32" y1="68.58" x2="-147.32" y2="66.04" width="0.1524" layer="91"/>

</segment>
</net>
<net name="UART_RX0" class="0">
<segment>

<wire x1="73.66" y1="73.66" x2="73.66" y2="71.12" width="0.1524" layer="91"/>
<wire x1="73.66" y1="71.12" x2="101.6" y2="71.12" width="0.1524" layer="91"/>
<pinref part="UART" gate="G$1" pin="1"/>
<pinref part="1284P" gate="A" pin="PD0"/>
<wire x1="63.5" y1="71.12" x2="73.66" y2="71.12" width="0.1524" layer="91"/>
<junction x="73.66" y="71.12"/>
</segment>
<segment>
<pinref part="R2" gate="G$1" pin="1"/>
<wire x1="-162.56" y1="68.58" x2="-162.56" y2="66.04" width="0.1524" layer="91"/>

</segment>
</net>
<net name="UART_RX1" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PD2"/>
<wire x1="63.5" y1="66.04" x2="83.82" y2="66.04" width="0.1524" layer="91"/>
<wire x1="83.82" y1="66.04" x2="83.82" y2="73.66" width="0.1524" layer="91"/>

<wire x1="83.82" y1="66.04" x2="101.6" y2="66.04" width="0.1524" layer="91"/>
<junction x="83.82" y="66.04"/>
<pinref part="UART" gate="G$1" pin="3"/>
</segment>
</net>
<net name="UART_TX1" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PD3"/>
<wire x1="63.5" y1="63.5" x2="88.9" y2="63.5" width="0.1524" layer="91"/>
<wire x1="88.9" y1="63.5" x2="88.9" y2="73.66" width="0.1524" layer="91"/>

<wire x1="88.9" y1="63.5" x2="101.6" y2="63.5" width="0.1524" layer="91"/>
<junction x="88.9" y="63.5"/>
<pinref part="UART" gate="G$1" pin="4"/>
</segment>
</net>
<net name="RESET" class="0">
<segment>
<pinref part="1284P" gate="A" pin="~RESET"/>
<wire x1="27.94" y1="60.96" x2="17.78" y2="60.96" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="R5" gate="G$1" pin="1"/>
<wire x1="-35.56" y1="76.2" x2="-38.1" y2="76.2" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="C1" gate="G$1" pin="1"/>
<wire x1="-157.48" y1="68.58" x2="-157.48" y2="66.04" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="DTR" gate="G$1" pin="1"/>
<wire x1="27.94" y1="-17.78" x2="30.48" y2="-17.78" width="0.1524" layer="91"/>

</segment>
</net>
<net name="3V3" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="3V3OUT"/>
<wire x1="-101.6" y1="73.66" x2="-91.44" y2="73.66" width="0.1524" layer="91"/>
<wire x1="-91.44" y1="73.66" x2="-91.44" y2="66.04" width="0.1524" layer="91"/>

</segment>
</net>
<net name="AREF" class="0">
<segment>
<pinref part="1284P" gate="A" pin="AREF"/>
<wire x1="27.94" y1="63.5" x2="17.78" y2="63.5" width="0.1524" layer="91"/>

</segment>
</net>
<net name="USB_DP" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="USBDP"/>
<wire x1="-132.08" y1="71.12" x2="-137.16" y2="71.12" width="0.1524" layer="91"/>
<pinref part="C7" gate="G$1" pin="2"/>
<wire x1="-132.08" y1="71.12" x2="-132.08" y2="63.5" width="0.1524" layer="91"/>
<junction x="-132.08" y="71.12"/>
<wire x1="-137.16" y1="71.12" x2="-137.16" y2="15.24" width="0.1524" layer="91"/>
<wire x1="-137.16" y1="15.24" x2="-96.52" y2="15.24" width="0.1524" layer="91"/>
<wire x1="-96.52" y1="15.24" x2="-96.52" y2="20.32" width="0.1524" layer="91"/>
<pinref part="R6" gate="G$1" pin="1"/>
<wire x1="-96.52" y1="20.32" x2="-99.06" y2="20.32" width="0.1524" layer="91"/>
</segment>
</net>
<net name="USB_DM" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="USBDM"/>
<wire x1="-101.6" y1="71.12" x2="-96.52" y2="71.12" width="0.1524" layer="91"/>
<pinref part="C6" gate="G$1" pin="2"/>
<wire x1="-101.6" y1="63.5" x2="-101.6" y2="71.12" width="0.1524" layer="91"/>
<junction x="-101.6" y="71.12"/>
<pinref part="R7" gate="G$1" pin="1"/>
<wire x1="-99.06" y1="25.4" x2="-96.52" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-96.52" y1="71.12" x2="-96.52" y2="25.4" width="0.1524" layer="91"/>
</segment>
</net>
<net name="USB_UART_TX" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="TXD"/>
<wire x1="-132.08" y1="88.9" x2="-162.56" y2="88.9" width="0.1524" layer="91"/>
<pinref part="R2" gate="G$1" pin="2"/>
<wire x1="-162.56" y1="88.9" x2="-162.56" y2="78.74" width="0.1524" layer="91"/>
</segment>
</net>
<net name="USB_UART_RX" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="RXD"/>
<wire x1="-132.08" y1="81.28" x2="-147.32" y2="81.28" width="0.1524" layer="91"/>
<pinref part="R1" gate="G$1" pin="2"/>
<wire x1="-147.32" y1="81.28" x2="-147.32" y2="78.74" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$5" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="!RTS"/>
<wire x1="-132.08" y1="86.36" x2="-157.48" y2="86.36" width="0.1524" layer="91"/>
<wire x1="-157.48" y1="86.36" x2="-157.48" y2="76.2" width="0.1524" layer="91"/>
<pinref part="C1" gate="G$1" pin="2"/>
</segment>
</net>
<net name="N$2" class="0">
<segment>
<pinref part="RX" gate="G$1" pin="A"/>
<pinref part="R3" gate="G$1" pin="2"/>
<wire x1="-86.36" y1="86.36" x2="-83.82" y2="86.36" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$3" class="0">
<segment>
<pinref part="TX" gate="G$1" pin="A"/>
<pinref part="R4" gate="G$1" pin="2"/>
<wire x1="-139.7" y1="40.64" x2="-139.7" y2="38.1" width="0.1524" layer="91"/>
</segment>
</net>
<net name="CBUS2" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="CBUS2"/>
<pinref part="TX" gate="G$1" pin="C"/>
<wire x1="-132.08" y1="73.66" x2="-139.7" y2="73.66" width="0.1524" layer="91"/>
<wire x1="-139.7" y1="73.66" x2="-139.7" y2="48.26" width="0.1524" layer="91"/>
</segment>
</net>
<net name="CBUS1" class="0">
<segment>
<pinref part="IC" gate="G$1" pin="CBUS1"/>
<wire x1="-101.6" y1="83.82" x2="-96.52" y2="83.82" width="0.1524" layer="91"/>
<wire x1="-96.52" y1="83.82" x2="-96.52" y2="86.36" width="0.1524" layer="91"/>
<pinref part="RX" gate="G$1" pin="C"/>
<wire x1="-96.52" y1="86.36" x2="-93.98" y2="86.36" width="0.1524" layer="91"/>
</segment>
</net>
<net name="USB_DP_IN" class="0">
<segment>
<pinref part="USB" gate="G$1" pin="D+"/>
<wire x1="-114.3" y1="43.18" x2="-114.3" y2="20.32" width="0.1524" layer="91"/>
<pinref part="R6" gate="G$1" pin="2"/>
<wire x1="-109.22" y1="20.32" x2="-114.3" y2="20.32" width="0.1524" layer="91"/>
</segment>
</net>
<net name="USB_DM_IN" class="0">
<segment>
<pinref part="USB" gate="G$1" pin="D-"/>
<pinref part="R7" gate="G$1" pin="2"/>
<wire x1="-116.84" y1="43.18" x2="-116.84" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-116.84" y1="25.4" x2="-109.22" y2="25.4" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_DI0" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB2"/>
<pinref part="U1" gate="G$1" pin="B2"/>
<wire x1="27.94" y1="22.86" x2="2.54" y2="22.86" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_RST" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB3"/>
<pinref part="U1" gate="G$1" pin="B3"/>
<wire x1="27.94" y1="20.32" x2="2.54" y2="20.32" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_CS" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB4"/>
<pinref part="U1" gate="G$1" pin="B4"/>
<wire x1="27.94" y1="17.78" x2="2.54" y2="17.78" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_MOSI" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB5"/>
<pinref part="U1" gate="G$1" pin="B5"/>
<wire x1="27.94" y1="15.24" x2="2.54" y2="15.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_MISO" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB6"/>
<pinref part="U1" gate="G$1" pin="B6"/>
<wire x1="27.94" y1="12.7" x2="2.54" y2="12.7" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA5_SCK" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PB7"/>
<pinref part="U1" gate="G$1" pin="B7"/>
<wire x1="27.94" y1="10.16" x2="2.54" y2="10.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_DI0" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A2"/>
<wire x1="-27.94" y1="22.86" x2="-43.18" y2="22.86" width="0.1524" layer="91"/>
<pinref part="INAIR_L" gate="G$1" pin="3"/>
<wire x1="-43.18" y1="22.86" x2="-43.18" y2="15.24" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="15.24" x2="-55.88" y2="15.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_RST" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A3"/>
<wire x1="-27.94" y1="20.32" x2="-40.64" y2="20.32" width="0.1524" layer="91"/>
<pinref part="INAIR_L" gate="G$1" pin="4"/>
<wire x1="-40.64" y1="20.32" x2="-40.64" y2="17.78" width="0.1524" layer="91"/>
<wire x1="-40.64" y1="17.78" x2="-55.88" y2="17.78" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_CS" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A4"/>
<wire x1="-27.94" y1="17.78" x2="-38.1" y2="17.78" width="0.1524" layer="91"/>
<wire x1="-38.1" y1="17.78" x2="-38.1" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-38.1" y1="25.4" x2="-45.72" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-45.72" y1="25.4" x2="-45.72" y2="22.86" width="0.1524" layer="91"/>
<pinref part="INAIR_L" gate="G$1" pin="6"/>
<wire x1="-45.72" y1="22.86" x2="-55.88" y2="22.86" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_MOSI" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A5"/>
<wire x1="-27.94" y1="15.24" x2="-40.64" y2="15.24" width="0.1524" layer="91"/>
<wire x1="-40.64" y1="15.24" x2="-40.64" y2="-15.24" width="0.1524" layer="91"/>
<pinref part="INAIR_R" gate="G$1" pin="3"/>
<wire x1="-40.64" y1="-15.24" x2="-55.88" y2="-15.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_MISO" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A6"/>
<wire x1="-27.94" y1="12.7" x2="-38.1" y2="12.7" width="0.1524" layer="91"/>
<pinref part="INAIR_R" gate="G$1" pin="4"/>
<wire x1="-38.1" y1="12.7" x2="-38.1" y2="-12.7" width="0.1524" layer="91"/>
<wire x1="-38.1" y1="-12.7" x2="-55.88" y2="-12.7" width="0.1524" layer="91"/>
</segment>
</net>
<net name="NA3_SCK" class="0">
<segment>
<pinref part="U1" gate="G$1" pin="A7"/>
<wire x1="-27.94" y1="10.16" x2="-35.56" y2="10.16" width="0.1524" layer="91"/>
<wire x1="-35.56" y1="10.16" x2="-35.56" y2="-10.16" width="0.1524" layer="91"/>
<pinref part="INAIR_R" gate="G$1" pin="5"/>
<wire x1="-35.56" y1="-10.16" x2="-55.88" y2="-10.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="3VS" class="0">
<segment>
<pinref part="INAIR_R" gate="G$1" pin="6"/>
<wire x1="-55.88" y1="-7.62" x2="-53.34" y2="-7.62" width="0.1524" layer="91"/>
<wire x1="-53.34" y1="-7.62" x2="-53.34" y2="0" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="U2" gate="A" pin="VROUT"/>
<wire x1="-88.9" y1="-12.7" x2="-88.9" y2="-7.62" width="0.1524" layer="91"/>

</segment>
<segment>
<pinref part="U1" gate="G$1" pin="OE"/>
<wire x1="-27.94" y1="33.02" x2="-33.02" y2="33.02" width="0.1524" layer="91"/>
<wire x1="-33.02" y1="33.02" x2="-33.02" y2="45.72" width="0.1524" layer="91"/>
<pinref part="U1" gate="G$1" pin="VCCA"/>
<wire x1="-15.24" y1="40.64" x2="-15.24" y2="45.72" width="0.1524" layer="91"/>
<wire x1="-15.24" y1="45.72" x2="-15.24" y2="53.34" width="0.1524" layer="91"/>
<wire x1="-15.24" y1="53.34" x2="-15.24" y2="55.88" width="0.1524" layer="91"/>

<pinref part="C8" gate="G$1" pin="1"/>
<wire x1="-20.32" y1="53.34" x2="-15.24" y2="53.34" width="0.1524" layer="91"/>
<wire x1="-33.02" y1="45.72" x2="-15.24" y2="45.72" width="0.1524" layer="91"/>
<junction x="-15.24" y="45.72"/>
<junction x="-15.24" y="53.34"/>
</segment>
</net>
<net name="RF_RX_LED" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PD4"/>
<wire x1="63.5" y1="60.96" x2="88.9" y2="60.96" width="0.1524" layer="91"/>
<pinref part="R10" gate="G$1" pin="2"/>
<wire x1="88.9" y1="60.96" x2="88.9" y2="55.88" width="0.1524" layer="91"/>
</segment>
</net>
<net name="RF_TX_LED" class="0">
<segment>
<pinref part="1284P" gate="A" pin="PD5"/>
<wire x1="63.5" y1="58.42" x2="78.74" y2="58.42" width="0.1524" layer="91"/>
<pinref part="R9" gate="G$1" pin="2"/>
<wire x1="78.74" y1="58.42" x2="78.74" y2="55.88" width="0.1524" layer="91"/>
</segment>
</net>
<net name="RF_TX_R" class="0">
<segment>
<pinref part="R9" gate="G$1" pin="1"/>
<pinref part="RF_TX" gate="G$1" pin="A"/>
<wire x1="78.74" y1="45.72" x2="78.74" y2="43.18" width="0.1524" layer="91"/>
</segment>
</net>
<net name="RF_RX_R" class="0">
<segment>
<pinref part="R10" gate="G$1" pin="1"/>
<pinref part="RF_RX" gate="G$1" pin="A"/>
<wire x1="88.9" y1="45.72" x2="88.9" y2="43.18" width="0.1524" layer="91"/>
</segment>
</net>
</nets>
</sheet>
</sheets>
<errors>
<approved hash="104,1,27.94,76.2,1284P,VCC_2,5V,,,"/>
<approved hash="104,1,27.94,73.66,1284P,VCC_3,5V,,,"/>
<approved hash="104,1,27.94,71.12,1284P,VCC,5V,,,"/>
<approved hash="104,1,27.94,68.58,1284P,AVCC,5V,,,"/>
<approved hash="104,1,-132.08,83.82,IC,VCCIO,5V,,,"/>
<approved hash="202,1,-132.08,76.2,IC,!CTS,,,,"/>
<approved hash="104,1,-101.6,78.74,IC,VCC,5V,,,"/>
<approved hash="104,1,-111.76,43.18,USB,VBUS,5V,,,"/>
<approved hash="106,1,-101.6,73.66,3V3,,,,,"/>
<approved hash="106,1,27.94,63.5,AREF,,,,,"/>
<approved hash="113,1,-115.481,51.435,USB,,,,,"/>
<approved hash="113,1,-90.17,86.0383,RX,,,,,"/>
<approved hash="113,1,-140.022,44.45,TX,,,,,"/>
<approved hash="113,1,104.817,65.7504,UART,,,,,"/>
<approved hash="113,1,24.7227,-16.4423,DTR,,,,,"/>
<approved hash="113,1,-59.0973,-11.3623,INAIR_R,,,,,"/>
<approved hash="113,1,-59.0973,19.1177,INAIR_L,,,,,"/>
<approved hash="113,1,-12.7,19.05,U1,,,,,"/>
<approved hash="113,1,89.2217,39.37,RF_RX,,,,,"/>
<approved hash="113,1,79.0617,39.37,RF_TX,,,,,"/>
</errors>
</schematic>
</drawing>
<compatibility>
<note version="8.2" severity="warning">
Since Version 8.2, EAGLE supports online libraries. The ids
of those online libraries will not be understood (or retained)
with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports URNs for individual library
assets (packages, symbols, and devices). The URNs of those assets
will not be understood (or retained) with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports the association of 3D packages
with devices in libraries, schematics, and board files. Those 3D
packages will not be understood (or retained) with this version.
</note>
</compatibility>
</eagle>

gha_license_id: MIT

extension: sch


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="8.2.2">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.0125" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.025" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="yes" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="no" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="90" name="Modules" color="5" fill="1" visible="no" active="no"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
<layer number="99" name="SpiceOrder" color="5" fill="1" visible="no" active="no"/>
<layer number="200" name="200bmp" color="1" fill="10" visible="yes" active="yes"/>
<layer number="201" name="201bmp" color="1" fill="10" visible="yes" active="yes"/>
</layers>
<board>
<plain>
<circle x="15.24" y="14.605" radius="13.97" width="0.254" layer="20"/>
<circle x="6.985" y="6.0325" radius="1.5875" width="0.254" layer="21"/>
<circle x="6.985" y="23.1775" radius="1.5875" width="0.254" layer="21"/>
<circle x="26.67" y="12.065" radius="1.5875" width="0.254" layer="21"/>
<circle x="26.67" y="16.8275" radius="1.5875" width="0.254" layer="21"/>
<circle x="23.1775" y="14.605" radius="1.6189375" width="0.254" layer="21"/>
<text x="11.58875" y="18.415" size="1.27" layer="21" font="vector" ratio="13">TritiLED</text>
<text x="13.49375" y="16.66875" size="1.27" layer="21" font="vector" ratio="13" rot="SR0">V2.2</text>
<wire x1="11.43" y1="26.035" x2="11.43" y2="3.175" width="3.81" layer="22" curve="143.130102" cap="flat"/>
<wire x1="19.05" y1="26.035" x2="19.05" y2="3.175" width="3.81" layer="22" curve="-143.130102" cap="flat"/>
<polygon width="0.254" layer="22">
<vertex x="12.065" y="24.13"/>
<vertex x="12.3825" y="24.4475"/>
<vertex x="12.3825" y="28.2575"/>
<vertex x="10.795" y="27.94"/>
</polygon>
<polygon width="0.254" layer="22">
<vertex x="18.0975" y="24.4475"/>
<vertex x="18.0975" y="28.2575"/>
<vertex x="19.685" y="27.94"/>
<vertex x="18.415" y="24.13"/>
</polygon>
<polygon width="0.254" layer="22">
<vertex x="12.065" y="5.08"/>
<vertex x="12.3825" y="5.08"/>
<vertex x="12.3825" y="0.9525"/>
<vertex x="10.795" y="1.27"/>
</polygon>
<polygon width="0.254" layer="22">
<vertex x="18.0975" y="5.08"/>
<vertex x="18.0975" y="0.9525"/>
<vertex x="19.685" y="1.27"/>
<vertex x="18.415" y="5.08"/>
</polygon>
<wire x1="14.9225" y1="1.27" x2="15.5575" y2="1.27" width="0.3048" layer="22"/>
<wire x1="15.24" y1="1.5875" x2="15.24" y2="0.9525" width="0.3048" layer="22"/>
<dimension x1="9.8425" y1="5.3975" x2="-0.3175" y2="-0.9525" x3="-0.9525" y3="-1.27" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="8.255" y1="9.2075" x2="-4.445" y2="8.5725" x3="-4.445" y3="8.5725" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="6.6675" y1="14.605" x2="-5.3975" y2="16.1925" x3="-5.3975" y3="16.1925" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="13.335" y1="6.6675" x2="8.5725" y2="-3.81" x3="8.5725" y3="-3.81" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="23.8125" y1="23.8125" x2="28.2575" y2="26.9875" x3="28.2575" y3="26.9875" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="6.985" y1="23.1775" x2="3.175" y2="27.6225" x3="3.175" y3="27.6225" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="22.225" y1="7.3025" x2="27.305" y2="0.3175" x3="27.305" y3="0.3175" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="26.67" y1="16.8275" x2="32.385" y2="17.78" x3="32.385" y3="17.78" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="23.1775" y1="14.605" x2="33.3375" y2="14.605" x3="33.3375" y3="14.605" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="26.67" y1="12.065" x2="32.385" y2="11.1125" x3="32.385" y3="11.1125" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="21.2725" y1="21.2725" x2="32.0675" y2="23.495" x3="32.0675" y3="23.495" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="10.4775" y1="20.955" x2="-6.0325" y2="21.9075" x3="-6.0325" y3="21.9075" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="15.24" y1="14.605" x2="32.385" y2="5.08" x3="32.385" y3="5.08" textsize="1.778" layer="48" dtype="leader"/>
<dimension x1="6.985" y1="6.0325" x2="-0.9525" y2="3.4925" x3="-0.9525" y3="3.4925" textsize="1.778" layer="48" dtype="leader"/>
<text x="11.1125" y="11.7475" size="1.27" layer="21" ratio="13">Luxeon C</text>
<text x="12.065" y="9.8425" size="1.27" layer="21" ratio="13">Edition</text>
</plain>
<libraries>
<library name="led_temp">
<packages>
<package name="ICSP_PAD">
<smd name="P$2" x="0" y="0" dx="2.54" dy="2.54" layer="1" roundness="100" cream="no"/>
<text x="2.54" y="0" size="1.27" layer="25">>NAME</text>
</package>
</packages>
</library>
<library name="tritiled">
<packages>
<package name="SRR6028_INDUCTOR">
<polygon width="0.127" layer="1">
<vertex x="-3.65" y="3.65"/>
<vertex x="3.65" y="3.65"/>
<vertex x="3.65" y="1.05"/>
<vertex x="2.5" y="1.05" curve="90"/>
<vertex x="0" y="2.7" curve="94.422201"/>
<vertex x="-2.5" y="1.05"/>
<vertex x="-3.65" y="1.05"/>
</polygon>
<wire x1="-2.68" y1="1.06" x2="2.66" y2="1.09" width="0.4064" layer="1" curve="-135.021028" cap="flat"/>
<polygon width="0.127" layer="1">
<vertex x="3.65" y="-3.65"/>
<vertex x="-3.65" y="-3.65"/>
<vertex x="-3.65" y="-1.05"/>
<vertex x="-2.5" y="-1.05" curve="90"/>
<vertex x="0" y="-2.7" curve="94.422201"/>
<vertex x="2.5" y="-1.05"/>
<vertex x="3.65" y="-1.05"/>
</polygon>
<wire x1="2.68" y1="-1.06" x2="-2.66" y2="-1.09" width="0.4064" layer="1" curve="-135.021028" cap="flat"/>
<smd name="P$1" x="-3" y="3" dx="1.27" dy="1.27" layer="1"/>
<smd name="P$2" x="-3" y="-3" dx="1.27" dy="1.27" layer="1"/>
<wire x1="-3" y1="0.6825" x2="-3" y2="-0.6825" width="0.127" layer="21"/>
<wire x1="3" y1="0.6825" x2="3" y2="-0.6825" width="0.127" layer="21"/>
<wire x1="-3.81" y1="3.81" x2="3.81" y2="3.81" width="0.127" layer="21"/>
<wire x1="3.81" y1="3.81" x2="3.81" y2="-3.81" width="0.127" layer="21"/>
<wire x1="3.81" y1="-3.81" x2="-3.81" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-3.81" y1="-3.81" x2="-3.81" y2="3.81" width="0.127" layer="21"/>
<polygon width="0.127" layer="29">
<vertex x="-3.65" y="3.65"/>
<vertex x="3.65" y="3.65"/>
<vertex x="3.65" y="1.05"/>
<vertex x="2.5" y="1.05" curve="90"/>
<vertex x="0" y="2.7" curve="94.422201"/>
<vertex x="-2.5" y="1.05"/>
<vertex x="-3.65" y="1.05"/>
</polygon>
<wire x1="-2.68" y1="1.06" x2="2.66" y2="1.09" width="0.4064" layer="29" curve="-135.021028" cap="flat"/>
<polygon width="0.127" layer="29">
<vertex x="3.65" y="-3.65"/>
<vertex x="-3.65" y="-3.65"/>
<vertex x="-3.65" y="-1.05"/>
<vertex x="-2.5" y="-1.05" curve="90"/>
<vertex x="0" y="-2.7" curve="94.422201"/>
<vertex x="2.5" y="-1.05"/>
<vertex x="3.65" y="-1.05"/>
</polygon>
<wire x1="2.68" y1="-1.06" x2="-2.66" y2="-1.09" width="0.4064" layer="29" curve="-135.021028" cap="flat"/>
<polygon width="0.254" layer="41">
<vertex x="-3.81" y="0.9525"/>
<vertex x="-3.81" y="-0.9525"/>
<vertex x="-2.2225" y="-0.9525" curve="90"/>
<vertex x="-0.3175" y="-2.54"/>
<vertex x="0.3175" y="-2.54" curve="90"/>
<vertex x="2.2225" y="-0.9525"/>
<vertex x="3.81" y="-0.9525"/>
<vertex x="3.81" y="0.9525"/>
<vertex x="2.2225" y="0.9525" curve="90"/>
<vertex x="0.3175" y="2.54"/>
<vertex x="-0.3175" y="2.54" curve="90"/>
<vertex x="-2.2225" y="0.9525"/>
</polygon>
<text x="5.08" y="2.54" size="1.27" layer="25">>NAME</text>
<text x="5.08" y="0" size="1.27" layer="27">>VALUE</text>
<polygon width="0.3048" layer="31" spacing="0.6096">
<vertex x="-3.65" y="3.65"/>
<vertex x="3.65" y="3.65"/>
<vertex x="3.65" y="1.05"/>
<vertex x="2.5" y="1.05" curve="90"/>
<vertex x="0" y="2.7" curve="94.422201"/>
<vertex x="-2.5" y="1.05"/>
<vertex x="-3.65" y="1.05"/>
</polygon>
<wire x1="-2.68" y1="1.06" x2="2.66" y2="1.09" width="0.4064" layer="31" curve="-135.021028" cap="flat"/>
<polygon width="0.127" layer="31">
<vertex x="3.65" y="-3.65"/>
<vertex x="-3.65" y="-3.65"/>
<vertex x="-3.65" y="-1.05"/>
<vertex x="-2.5" y="-1.05" curve="90"/>
<vertex x="0" y="-2.7" curve="94.422201"/>
<vertex x="2.5" y="-1.05"/>
<vertex x="3.65" y="-1.05"/>
</polygon>
<wire x1="2.68" y1="-1.06" x2="-2.66" y2="-1.09" width="0.4064" layer="31" curve="-135.021028" cap="flat"/>
</package>
<package name="CR2032_BAT-HLD_001">
<smd name="GND" x="0" y="0" dx="17.78" dy="17.78" layer="1" roundness="100"/>
<smd name="+V1" x="-11.43" y="0" dx="2.54" dy="5.08" layer="1"/>
<smd name="+V2" x="11.43" y="0" dx="2.54" dy="5.08" layer="1"/>
<wire x1="-10.541" y1="7.366" x2="10.541" y2="7.366" width="0.254" layer="51"/>
<wire x1="10.541" y1="7.366" x2="10.541" y2="-8.128" width="0.254" layer="51"/>
<wire x1="10.541" y1="-8.128" x2="-10.541" y2="-8.128" width="0.254" layer="51"/>
<wire x1="-10.541" y1="-8.128" x2="-10.541" y2="7.366" width="0.254" layer="51"/>
<circle x="0" y="0" radius="10.0076" width="0.254" layer="21"/>
</package>
<package name="LUXEON_C">
<smd name="HS" x="0" y="0" dx="0.5" dy="1.7" layer="1"/>
<smd name="C" x="0.725" y="0" dx="0.25" dy="1.7" layer="1"/>
<smd name="A" x="-0.725" y="0" dx="0.25" dy="1.7" layer="1"/>
<wire x1="-1" y1="1" x2="0.425" y2="1" width="0.127" layer="21"/>
<wire x1="0.425" y1="1" x2="1" y2="1" width="0.127" layer="21"/>
<wire x1="1" y1="1" x2="1" y2="-1" width="0.127" layer="21"/>
<wire x1="1" y1="-1" x2="0.425" y2="-1" width="0.127" layer="21"/>
<wire x1="0.425" y1="-1" x2="-1" y2="-1" width="0.127" layer="21"/>
<wire x1="-1" y1="-1" x2="-1" y2="1" width="0.127" layer="21"/>
<wire x1="0.425" y1="1" x2="0.425" y2="-1" width="0.127" layer="21"/>
</package>
<package name="SOT-23">
<smd name="1" x="-0.95" y="-1.1" dx="1" dy="1.4" layer="1"/>
<smd name="2" x="0.95" y="-1.1" dx="1" dy="1.4" layer="1"/>
<smd name="3" x="0" y="1.1" dx="1" dy="1.4" layer="1"/>
<wire x1="-0.7" y1="0.65" x2="-1.5" y2="0.65" width="0.127" layer="21"/>
<wire x1="-1.5" y1="0.65" x2="-1.5" y2="-0.25" width="0.127" layer="21"/>
<wire x1="0.7" y1="0.65" x2="1.5" y2="0.65" width="0.127" layer="21"/>
<wire x1="1.5" y1="0.65" x2="1.5" y2="-0.25" width="0.127" layer="21"/>
<wire x1="-0.3" y1="-0.65" x2="0.3" y2="-0.65" width="0.127" layer="21"/>
<wire x1="-0.3" y1="-0.65" x2="-1.5" y2="-0.65" width="0.127" layer="51"/>
<wire x1="-1.5" y1="-0.65" x2="-1.5" y2="-0.25" width="0.127" layer="51"/>
<wire x1="0.3" y1="-0.65" x2="1.5" y2="-0.65" width="0.127" layer="51"/>
<wire x1="1.5" y1="-0.65" x2="1.5" y2="-0.3" width="0.127" layer="51"/>
<wire x1="0.7" y1="0.65" x2="-0.7" y2="0.65" width="0.127" layer="51"/>
<rectangle x1="-0.2" y1="0.7" x2="0.25" y2="1.25" layer="51"/>
<rectangle x1="-1.15" y1="-1.25" x2="-0.7" y2="-0.7" layer="51"/>
<rectangle x1="0.75" y1="-1.25" x2="1.2" y2="-0.7" layer="51"/>
<text x="2.54" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="2.54" y="-1.27" size="1.27" layer="27">>VALUE</text>
</package>
<package name="SMD_SWITCH">
<wire x1="-2.3" y1="2.3" x2="2.3" y2="2.3" width="0.254" layer="21"/>
<wire x1="2.3" y1="2.3" x2="2.3" y2="-2.3" width="0.254" layer="21"/>
<wire x1="2.3" y1="-2.3" x2="-2.3" y2="-2.3" width="0.254" layer="21"/>
<wire x1="-2.3" y1="-2.3" x2="-2.3" y2="2.3" width="0.254" layer="21"/>
<smd name="P$1" x="-3.6" y="1.5" dx="1.6" dy="1.4" layer="1"/>
<smd name="P$2" x="3.6" y="1.5" dx="1.6" dy="1.4" layer="1"/>
<smd name="P$3" x="3.6" y="-1.5" dx="1.6" dy="1.4" layer="1"/>
<smd name="P$4" x="-3.6" y="-1.5" dx="1.6" dy="1.4" layer="1"/>
<circle x="0" y="0" radius="1.2" width="0.254" layer="21"/>
<text x="6.35" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="6.35" y="-1.27" size="1.27" layer="27">>VALUE</text>
</package>
<package name="1206">
<smd name="P$1" x="-1.55" y="0" dx="0.9" dy="1.6" layer="1"/>
<smd name="P$2" x="1.55" y="0" dx="0.9" dy="1.6" layer="1"/>
<wire x1="-2.225" y1="1.125" x2="2.225" y2="1.125" width="0.127" layer="21"/>
<wire x1="2.225" y1="1.125" x2="2.225" y2="-1.125" width="0.127" layer="21"/>
<wire x1="2.225" y1="-1.125" x2="-2.225" y2="-1.125" width="0.127" layer="21"/>
<wire x1="-2.225" y1="-1.125" x2="-2.225" y2="1.125" width="0.127" layer="21"/>
<text x="-2.54" y="2.54" size="1.27" layer="25">>NAME</text>
<text x="-2.54" y="-3.81" size="1.27" layer="27">>VALUE</text>
</package>
<package name="0805">
<smd name="P$1" x="-0.95" y="0" dx="0.9" dy="1.3" layer="1"/>
<smd name="P$2" x="0.95" y="0" dx="0.9" dy="1.3" layer="1"/>
<wire x1="-1.5025" y1="0.925" x2="-1.5025" y2="-0.925" width="0.127" layer="21"/>
<wire x1="-1.5025" y1="-0.925" x2="1.5025" y2="-0.925" width="0.127" layer="21"/>
<wire x1="1.5025" y1="-0.925" x2="1.5025" y2="0.925" width="0.127" layer="21"/>
<wire x1="1.5025" y1="0.925" x2="-1.5025" y2="0.925" width="0.127" layer="21"/>
<text x="2.54" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="2.54" y="-1.27" size="1.27" layer="27">>VALUE</text>
</package>
<package name="SOIC8">
<smd name="1" x="-1.905" y="-2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="2" x="-0.635" y="-2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="3" x="0.635" y="-2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="4" x="1.905" y="-2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="5" x="1.905" y="2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="6" x="0.635" y="2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="7" x="-0.635" y="2.7" dx="0.55" dy="1.5" layer="1"/>
<smd name="8" x="-1.905" y="2.7" dx="0.55" dy="1.5" layer="1"/>
<wire x1="-2.45" y1="1.8" x2="2.45" y2="1.8" width="0.127" layer="21"/>
<wire x1="2.45" y1="1.8" x2="2.45" y2="-1.8" width="0.127" layer="21"/>
<wire x1="2.45" y1="-1.8" x2="-2.45" y2="-1.8" width="0.127" layer="21"/>
<wire x1="-2.45" y1="-1.8" x2="-2.45" y2="-0.62" width="0.127" layer="21"/>
<wire x1="-2.45" y1="-0.62" x2="-2.42" y2="-0.62" width="0.127" layer="21"/>
<wire x1="-2.42" y1="-0.62" x2="-1.88" y2="-0.08" width="0.127" layer="21" curve="90"/>
<wire x1="-1.88" y1="-0.08" x2="-1.88" y2="0" width="0.127" layer="21"/>
<wire x1="-1.88" y1="0" x2="-2.45" y2="0.54" width="0.127" layer="21" curve="90"/>
<wire x1="-2.45" y1="0.54" x2="-2.45" y2="1.8" width="0.127" layer="21"/>
<circle x="-2.8" y="-2.1" radius="0.2" width="0.127" layer="21"/>
<text x="3.81" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="3.81" y="-1.27" size="1.27" layer="27">>VALUE</text>
</package>
<package name="R1206">
<smd name="P$1" x="-1.55" y="0" dx="1.6" dy="1.9" layer="1"/>
<smd name="P$2" x="1.55" y="0" dx="1.6" dy="1.9" layer="1"/>
<wire x1="-2.6" y1="1.2" x2="2.6" y2="1.2" width="0.127" layer="21"/>
<wire x1="2.6" y1="1.2" x2="2.6" y2="-1.2" width="0.127" layer="21"/>
<wire x1="2.6" y1="-1.2" x2="-2.6" y2="-1.2" width="0.127" layer="21"/>
<wire x1="-2.6" y1="-1.2" x2="-2.6" y2="1.16" width="0.127" layer="21"/>
<wire x1="-2.6" y1="1.2" x2="-2.6" y2="1.16" width="0.127" layer="21"/>
<text x="-2.54" y="2.54" size="1.27" layer="25">>NAME</text>
<text x="-2.54" y="-3.81" size="1.27" layer="27">>VALUE</text>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<designrules name="LaenPCBOrder_tented_vias">
<description language="de">EAGLE Design Rules

Die Standard-Design-Rules sind so gewählt, dass sie für
die meisten Anwendungen passen. Sollte ihre Platine
besondere Anforderungen haben, treffen Sie die erforderlichen
Einstellungen hier und speichern die Design Rules unter
einem neuen Namen ab.</description>
<description language="en">Laen's PCB Order Design Rules

Please make sure your boards conform to these design rules.</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm"/>
<param name="mtIsolate" value="1.5011mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm"/>
<param name="mdWireWire" value="6mil"/>
<param name="mdWirePad" value="6mil"/>
<param name="mdWireVia" value="6mil"/>
<param name="mdPadPad" value="6mil"/>
<param name="mdPadVia" value="6mil"/>
<param name="mdViaVia" value="6mil"/>
<param name="mdSmdPad" value="6mil"/>
<param name="mdSmdVia" value="6mil"/>
<param name="mdSmdSmd" value="6mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="15mil"/>
<param name="mdDrill" value="6mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="6mil"/>
<param name="msDrill" value="13mil"/>
<param name="msMicroVia" value="13mil"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="7mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="7mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="7mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="7mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="7mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="3mil"/>
<param name="mlMaxStopFrame" value="3mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="16mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkGrid" value="0"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="50mil"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="0"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="a"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="a"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="L1" library="tritiled" package="SRR6028_INDUCTOR" value="1m" x="6.6675" y="14.605" smashed="yes" rot="R180">
<attribute name="NAME" x="-7.9375" y="16.51" size="1.27" layer="25"/>
<attribute name="VALUE" x="-7.9375" y="14.605" size="1.27" layer="27"/>
</element>
<element name="D1" library="tritiled" package="LUXEON_C" value="Luxeon C" x="15.24" y="14.605" smashed="yes" rot="R270">
<attribute name="NAME" x="35.2425" y="6.6675" size="1.27" layer="25" rot="R180"/>
<attribute name="VALUE" x="42.2275" y="4.7625" size="1.27" layer="27" rot="R180"/>
</element>
<element name="B1" library="tritiled" package="CR2032_BAT-HLD_001" value="BAT-HLD-001_CR2032" x="15.24" y="14.605" rot="MR270"/>
<element name="Q1" library="tritiled" package="SOT-23" value="ZXMN3B01FTA" x="10.4775" y="20.955" smashed="yes" rot="R180">
<attribute name="NAME" x="-11.43" y="24.13" size="1.27" layer="25"/>
<attribute name="VALUE" x="-11.43" y="22.225" size="1.27" layer="27"/>
</element>
<element name="SW1" library="tritiled" package="SMD_SWITCH" value="SMD_SWITCH" x="22.225" y="7.3025" smashed="yes" rot="R45">
<attribute name="NAME" x="27.7221" y="-1.279346875" size="1.27" layer="25"/>
<attribute name="VALUE" x="27.613153125" y="-3.3929" size="1.27" layer="27"/>
</element>
<element name="MCLR_PAD" library="led_temp" package="ICSP_PAD" value="ICSP_PAD" x="23.1775" y="14.605" smashed="yes">
<attribute name="NAME" x="33.9725" y="14.2875" size="1.27" layer="25"/>
</element>
<element name="ICSPDAT_PAD" library="led_temp" package="ICSP_PAD" value="ICSP_PAD" x="26.67" y="16.8275" smashed="yes">
<attribute name="NAME" x="32.7025" y="17.4625" size="1.27" layer="25"/>
</element>
<element name="ICSPCLK_PAD" library="led_temp" package="ICSP_PAD" value="ICSP_PAD" x="26.67" y="12.065" smashed="yes" rot="R90">
<attribute name="NAME" x="32.7025" y="10.4775" size="1.27" layer="25"/>
</element>
<element name="VSS_PAD" library="led_temp" package="ICSP_PAD" value="ICSP_PAD" x="6.985" y="23.1775" smashed="yes">
<attribute name="NAME" x="-0.635" y="28.2575" size="1.27" layer="25"/>
</element>
<element name="VDD_PAD" library="led_temp" package="ICSP_PAD" value="ICSP_PAD" x="6.985" y="6.0325" smashed="yes" rot="R90">
<attribute name="NAME" x="-9.525" y="2.54" size="1.27" layer="25"/>
</element>
<element name="Q2" library="tritiled" package="SOT-23" value="DMG2305UX" x="13.335" y="6.6675" smashed="yes" rot="R90">
<attribute name="NAME" x="3.4925" y="-3.81" size="1.27" layer="25"/>
<attribute name="VALUE" x="3.4925" y="-5.715" size="1.27" layer="27"/>
</element>
<element name="C1" library="tritiled" package="1206" value="10u" x="8.255" y="9.2075" smashed="yes" rot="R180">
<attribute name="NAME" x="-7.9375" y="8.5725" size="1.27" layer="25"/>
<attribute name="VALUE" x="-7.9375" y="6.6675" size="1.27" layer="27"/>
</element>
<element name="C2" library="tritiled" package="0805" value="100n" x="23.8125" y="23.8125" smashed="yes" rot="R315">
<attribute name="NAME" x="28.520528125" y="27.776575" size="1.27" layer="25"/>
<attribute name="VALUE" x="28.520525" y="25.880921875" size="1.27" layer="27"/>
</element>
<element name="U1" library="tritiled" package="SOIC8" value="PIC12LF1571" x="21.2725" y="21.2725" smashed="yes" rot="R225">
<attribute name="NAME" x="32.593553125" y="24.229603125" size="1.27" layer="25"/>
<attribute name="VALUE" x="32.484603125" y="22.433553125" size="1.27" layer="27"/>
</element>
<element name="R1" library="tritiled" package="R1206" value="100" x="9.8425" y="5.3975" smashed="yes" rot="R90">
<attribute name="NAME" x="-3.4925" y="-0.9525" size="1.27" layer="25"/>
<attribute name="VALUE" x="-3.4925" y="-3.175" size="1.27" layer="27"/>
</element>
</elements>
<signals>
<signal name="GND">
<contactref element="B1" pad="GND"/>
<contactref element="Q1" pad="2"/>
<polygon width="0.254" layer="16" thermals="no">
<vertex x="0" y="0"/>
<vertex x="29.845" y="0"/>
<vertex x="29.845" y="29.21"/>
<vertex x="0" y="29.21"/>
</polygon>
<polygon width="0.254" layer="1" thermals="no" rank="2">
<vertex x="0" y="0"/>
<vertex x="29.845" y="0"/>
<vertex x="29.845" y="29.21"/>
<vertex x="0" y="29.21"/>
</polygon>
<contactref element="VSS_PAD" pad="P$2"/>
<via x="5.08" y="9.8425" extent="1-16" drill="0.7" shape="square"/>
<via x="5.08" y="8.5725" extent="1-16" drill="0.7" shape="square"/>
<via x="4.1275" y="9.8425" extent="1-16" drill="0.7" shape="square"/>
<via x="4.1275" y="8.5725" extent="1-16" drill="0.7" shape="square"/>
<via x="9.2075" y="24.765" extent="1-16" drill="0.7" shape="square"/>
<via x="9.2075" y="23.8125" extent="1-16" drill="0.7" shape="square"/>
<via x="7.9375" y="20.955" extent="1-16" drill="0.7" shape="octagon"/>
<via x="6.985" y="20.955" extent="1-16" drill="0.7" shape="square"/>
<via x="6.985" y="20.0025" extent="1-16" drill="0.7" shape="octagon"/>
<via x="25.4" y="22.225" extent="1-16" drill="0.7" shape="octagon"/>
<via x="23.1775" y="21.74875" extent="1-16" drill="0.7" shape="octagon"/>
<via x="26.19375" y="20.79625" extent="1-16" drill="0.7" shape="octagon"/>
<via x="10.16" y="24.765" extent="1-16" drill="0.7" shape="square"/>
<via x="10.16" y="23.8125" extent="1-16" drill="0.7" shape="octagon"/>
<via x="22.225" y="5.08" extent="1-16" drill="0.7" shape="octagon"/>
<via x="24.4475" y="7.3025" extent="1-16" drill="0.7" shape="octagon"/>
<via x="25.7175" y="19.52625" extent="1-16" drill="0.7" shape="octagon"/>
<via x="16.51" y="6.35" extent="1-16" drill="0.7" shape="octagon"/>
<contactref element="Q2" pad="1"/>
<contactref element="C1" pad="P$2"/>
<contactref element="C2" pad="P$2"/>
<contactref element="U1" pad="8"/>
<contactref element="SW1" pad="P$3"/>
<contactref element="SW1" pad="P$4"/>
</signal>
<signal name="N$5">
<contactref element="L1" pad="P$2"/>
<contactref element="D1" pad="A"/>
<contactref element="Q1" pad="3"/>
<wire x1="10.4775" y1="19.855" x2="9.6675" y2="19.68" width="1.4224" layer="1"/>
<wire x1="9.6675" y1="19.68" x2="9.6675" y2="17.605" width="1.4224" layer="1"/>
<polygon width="0.254" layer="1" thermals="no">
<vertex x="9.2075" y="18.0975"/>
<vertex x="14.9225" y="18.0975"/>
<vertex x="16.1925" y="16.8275"/>
<vertex x="16.1925" y="15.5575"/>
<vertex x="14.2875" y="15.5575"/>
<vertex x="14.2875" y="16.1925"/>
<vertex x="9.2075" y="16.1925"/>
</polygon>
<wire x1="9.6675" y1="17.605" x2="12.965" y2="17.605" width="0.254" layer="1"/>
<wire x1="12.965" y1="17.605" x2="15.24" y2="15.33" width="0.254" layer="1"/>
</signal>
<signal name="+3.3V">
<contactref element="L1" pad="P$1"/>
<contactref element="D1" pad="C"/>
<wire x1="9.6675" y1="11.605" x2="9.755" y2="11.5175" width="1.778" layer="1"/>
<contactref element="Q2" pad="2"/>
<contactref element="C1" pad="P$1"/>
<contactref element="C2" pad="P$1"/>
<wire x1="15.5875" y1="9.2075" x2="14.605" y2="9.2075" width="1.778" layer="1"/>
<wire x1="14.605" y1="9.2075" x2="10.4775" y2="9.2075" width="1.778" layer="1"/>
<wire x1="10.4775" y1="9.2075" x2="10.4775" y2="10.795" width="1.778" layer="1"/>
<wire x1="10.4775" y1="10.795" x2="9.6675" y2="11.605" width="1.778" layer="1"/>
<contactref element="U1" pad="1"/>
<wire x1="23.140746875" y1="24.48425" x2="23.140746875" y2="24.528725" width="0.6096" layer="1"/>
<wire x1="23.140746875" y1="24.48425" x2="19.928996875" y2="21.2725" width="0.8128" layer="1"/>
<wire x1="19.928996875" y1="21.2725" x2="19.6596" y2="21.08835" width="0.3048" layer="1"/>
<wire x1="20.71035" y1="24.528725" x2="20.754825" y2="24.48425" width="0.8128" layer="1"/>
<wire x1="20.754825" y1="24.48425" x2="23.140746875" y2="24.48425" width="0.8128" layer="1"/>
<wire x1="19.6596" y1="21.08835" x2="17.73555" y2="23.0124" width="0.3048" layer="1"/>
<wire x1="17.73555" y1="23.0124" x2="16.8275" y2="22.86" width="0.3048" layer="1"/>
<wire x1="16.8275" y1="22.86" x2="16.35125" y2="22.38375" width="0.6096" layer="1"/>
<wire x1="14.435" y1="7.6175" x2="14.605" y2="7.6175" width="0.8128" layer="1"/>
<wire x1="14.605" y1="7.6175" x2="14.605" y2="9.2075" width="0.8128" layer="1"/>
<wire x1="9.805" y1="9.2075" x2="10.4775" y2="9.2075" width="0.6096" layer="1"/>
<wire x1="16.35125" y1="20.79625" x2="19.3675" y2="17.78" width="0.8128" layer="1"/>
<wire x1="19.3675" y1="17.78" x2="19.3675" y2="9.525" width="0.8128" layer="1"/>
<wire x1="19.3675" y1="9.525" x2="19.05" y2="9.2075" width="0.8128" layer="1"/>
<wire x1="19.05" y1="9.2075" x2="15.5875" y2="9.2075" width="0.8128" layer="1"/>
<wire x1="16.35125" y1="22.38375" x2="16.35125" y2="20.79625" width="0.8128" layer="1"/>
<polygon width="0.254" layer="1" thermals="no">
<vertex x="14.2875" y="13.6525"/>
<vertex x="16.1925" y="13.6525"/>
<vertex x="16.1925" y="12.065"/>
<vertex x="15.24" y="11.1125"/>
<vertex x="9.2075" y="11.1125"/>
<vertex x="9.2075" y="12.7"/>
<vertex x="13.97" y="12.7"/>
<vertex x="14.2875" y="13.0175"/>
</polygon>
<wire x1="15.24" y1="13.88" x2="15.24" y2="12.3825" width="0.254" layer="1"/>
<wire x1="15.24" y1="12.3825" x2="14.9225" y2="12.065" width="0.254" layer="1"/>
<wire x1="14.9225" y1="12.065" x2="10.1275" y2="12.065" width="0.254" layer="1"/>
<wire x1="10.1275" y1="12.065" x2="9.6675" y2="11.605" width="0.254" layer="1"/>
</signal>
<signal name="N$7">
</signal>
<signal name="N$3">
</signal>
<signal name="N$11">
</signal>
<signal name="VSAFE">
<contactref element="Q2" pad="3"/>
<contactref element="VDD_PAD" pad="P$2"/>
<contactref element="R1" pad="P$2"/>
<wire x1="9.8425" y1="6.9475" x2="6.985" y2="6.9475" width="0.8128" layer="1"/>
<wire x1="6.985" y1="6.9475" x2="6.985" y2="6.0325" width="0.8128" layer="1"/>
<wire x1="12.235" y1="6.6675" x2="9.8425" y2="6.6675" width="0.8128" layer="1"/>
<wire x1="9.8425" y1="6.6675" x2="9.8425" y2="6.9475" width="0.8128" layer="1"/>
</signal>
<signal name="N$1">
<contactref element="MCLR_PAD" pad="P$2"/>
<contactref element="U1" pad="4"/>
<wire x1="18.016271875" y1="21.834646875" x2="20.48341875" y2="19.3675" width="0.4064" layer="1"/>
<wire x1="20.48341875" y1="19.3675" x2="21.43125" y2="19.3675" width="0.4064" layer="1"/>
<wire x1="21.43125" y1="19.3675" x2="23.1775" y2="17.62125" width="0.3048" layer="1"/>
<wire x1="23.1775" y1="17.62125" x2="23.1775" y2="14.605" width="0.4064" layer="1"/>
</signal>
<signal name="N$2">
<contactref element="ICSPDAT_PAD" pad="P$2"/>
<contactref element="U1" pad="7"/>
<wire x1="23.6307" y1="19.812321875" x2="26.67" y2="16.8275" width="0.6096" layer="1"/>
</signal>
<signal name="N$4">
<contactref element="ICSPCLK_PAD" pad="P$2"/>
<contactref element="U1" pad="6"/>
<wire x1="22.732675" y1="18.914296875" x2="24.4475" y2="17.199471875" width="0.4064" layer="1"/>
<wire x1="24.4475" y1="17.199471875" x2="24.4475" y2="16.1925" width="0.4064" layer="1"/>
<wire x1="24.4475" y1="16.1925" x2="26.67" y2="13.97" width="0.4064" layer="1"/>
<wire x1="26.67" y1="13.97" x2="26.67" y2="12.065" width="0.4064" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="U1" pad="5"/>
<contactref element="SW1" pad="P$1"/>
<contactref element="SW1" pad="P$2"/>
<wire x1="18.618753125" y1="5.817575" x2="21.323090625" y2="8.5219125" width="0.8128" layer="1"/>
<wire x1="21.323090625" y1="8.5219125" x2="23.709921875" y2="10.90874375" width="0.8128" layer="1"/>
<wire x1="21.834646875" y1="18.016271875" x2="20.955" y2="17.136625" width="0.4064" layer="1"/>
<wire x1="20.955" y1="17.136625" x2="20.955" y2="9.2075" width="0.4064" layer="1"/>
<wire x1="20.955" y1="9.2075" x2="21.323090625" y2="8.839409375" width="0.4064" layer="1"/>
<wire x1="21.323090625" y1="8.839409375" x2="21.323090625" y2="8.5219125" width="0.4064" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="Q1" pad="1"/>
<contactref element="U1" pad="2"/>
<contactref element="U1" pad="3"/>
<wire x1="19.812321875" y1="23.6307" x2="18.914296875" y2="22.732675" width="0.6096" layer="1"/>
<wire x1="18.914296875" y1="22.732675" x2="17.834471875" y2="23.8125" width="0.6096" layer="1"/>
<wire x1="17.834471875" y1="23.8125" x2="13.185" y2="23.8125" width="0.8128" layer="1"/>
<wire x1="13.185" y1="23.8125" x2="11.4275" y2="22.055" width="0.8128" layer="1" curve="90"/>
</signal>
<signal name="VBATT">
<polygon width="0.254" layer="1">
<vertex x="12.7" y="1.905"/>
<vertex x="12.7" y="4.445"/>
<vertex x="17.78" y="4.445"/>
<vertex x="17.78" y="1.905"/>
</polygon>
<polygon width="0.254" layer="1" thermals="no">
<vertex x="12.7" y="27.305"/>
<vertex x="12.7" y="24.765"/>
<vertex x="17.78" y="24.765"/>
<vertex x="17.78" y="27.305"/>
</polygon>
<contactref element="B1" pad="+V2" route="any" routetag="G$1.+V"/>
<contactref element="B1" pad="+V1" route="any" routetag="G$1.+V"/>
<contactref element="R1" pad="P$1"/>
<via x="15.24" y="26.035" extent="1-16" drill="0.6" shape="square"/>
<via x="13.6525" y="26.035" extent="1-16" drill="0.6" shape="square"/>
<via x="16.8275" y="26.035" extent="1-16" drill="0.6" shape="square"/>
<via x="15.24" y="3.175" extent="1-16" drill="0.6" shape="square"/>
<via x="13.6525" y="3.175" extent="1-16" drill="0.6" shape="square"/>
<via x="16.8275" y="3.175" extent="1-16" drill="0.6" shape="square"/>
<wire x1="9.8425" y1="3.8475" x2="13.6525" y2="3.8475" width="1.27" layer="1"/>
<wire x1="13.6525" y1="3.8475" x2="13.6525" y2="3.175" width="1.27" layer="1"/>
</signal>
</signals>
<errors>
<approved hash="3,1,9d885c705c3f9dc7"/>
<approved hash="3,1,9d045cfc5cb99d41"/>
<approved hash="18,29,74610db60c2df45b"/>
<approved hash="18,29,a6bcc6b6fb3103ee"/>
<approved hash="18,29,46bcc2f0593546f3"/>
<approved hash="18,29,2ab6aef6accbaa01"/>
<approved hash="18,29,dc06910556211916"/>
<approved hash="18,29,9ef8973a2afaaf83"/>
<approved hash="18,29,156997ad93569a0e"/>
<approved hash="18,29,24fd44d50f755b5f"/>
<approved hash="19,1,190b530d7005511e"/>
<approved hash="19,1,995601ea24b5c507"/>
<approved hash="6,1,1bad6c84dc340d48"/>
<approved hash="6,1,deb6ce1f3ab53c48"/>
<approved hash="6,1,8a7027fe8c3439da"/>
<approved hash="6,1,9e29c5792f0a86be"/>
<approved hash="6,1,d210c0a5853a62de"/>
<approved hash="6,1,30938fa18627c043"/>
<approved hash="6,1,c4031e3e3bf9d834"/>
<approved hash="6,1,f9f2475974b54516"/>
<approved hash="6,1,b6efa5c4d6314615"/>
<approved hash="6,1,2bca294130ce6a1f"/>
<approved hash="6,1,4bd122a704572a61"/>
<approved hash="6,1,b84da97f6c801db8"/>
<approved hash="6,1,1acd6c7e5d9bfb23"/>
<approved hash="6,1,844de388e533a7fc"/>
<approved hash="19,16,876df9f771f24795"/>
<approved hash="19,16,c4fec00fcc0ac8fb"/>
<approved hash="19,16,062901d80ddd0a2c"/>
<approved hash="19,16,474e43bf4fa44b55"/>
<approved hash="19,16,541fb12cbd29581a"/>
<approved hash="19,16,96c870fb7cfe9acd"/>
<approved hash="19,16,d7af329c3e87dbb4"/>
</errors>
</board>
</drawing>
</eagle>

license: MIT

repository: kontakt/tritiled

license_type: permissive

repo_name: kontakt/tritiled

branch_name: refs/heads/master

extension: brd


repository: rasalt/fhir-datalab

repo_name: rasalt/fhir-datalab

filename: LICENSE


text:
package point

// Several similar sort functions. A SortXY will give more importance
// to X then to Y. If any of those characters is lowercase, it'll mean
// that the order in that case is reversed.
func SortXY(p1, p2 *Point) bool {
	return (p1.X > p2.X) || (p1.X == p2.X && p1.Y >= p2.Y)
}

func SortXy(p1, p2 *Point) bool {
	return (p1.X > p2.X) || (p1.X == p2.X && p1.Y <= p2.Y)
}

func SortxY(p1, p2 *Point) bool {
	return (p1.X < p2.X) || (p1.X == p2.X && p1.Y >= p2.Y)
}

func Sortxy(p1, p2 *Point) bool {
	return (p1.X < p2.X) || (p1.X == p2.X && p1.Y <= p2.Y)
}

func SortYX(p1, p2 *Point) bool {
	return (p1.Y > p2.Y) || (p1.Y == p2.Y && p1.X >= p2.X)
}

func SortYx(p1, p2 *Point) bool {
	return (p1.Y > p2.Y) || (p1.Y == p2.Y && p1.X <= p2.X)
}

func SortyX(p1, p2 *Point) bool {
	return (p1.Y < p2.Y) || (p1.Y == p2.Y && p1.X >= p2.X)
}

func Sortyx(p1, p2 *Point) bool {
	return (p1.Y < p2.Y) || (p1.Y == p2.Y && p1.X <= p2.X)
}

// SortFromRadial Sorts using a tangential from a center point
// this sorter is different from the rest in that it returns the actual sort
// as it needs an origin
func SortRadial(x, y float32) func(*Point, *Point) bool {
	return func(p1, p2 *Point) bool {
		return tan(p1, x, y) >= tan(p2, x, y)
	}
}

func SortCounterRadial(x, y float32) func(*Point, *Point) bool {
	return func(p1, p2 *Point) bool {
		return tan(p1, x, y) <= tan(p2, x, y)
	}
}

func tan(p1 *Point, x, y float32) float32 {
	var tan1 float32
	x1, y1 := movePoint(p1, x, y)
	if x1 != 0.0 {
		tan1 = y1 / x1
	} else {
		tan1 = 1.0
	}
	return tan1
}

func movePoint(p1 *Point, x, y float32) (float32, float32) {
	return p1.X - x, p1.Y - y
}

// SortDiagonal \
func SortDiagonal(p1, p2 *Point) bool {
	return (p1.X + p1.Y) >= (p2.X + p2.Y)
}

// SortDiagonal2 /
func SortDiagonal2(p1, p2 *Point) bool {
	return (p1.X + (1.0 - p1.Y)) >= (p2.X + (1.0 - p2.Y))
}

// Quicksort implementation. This one takes a sorting function
// instead of asuming that the less than is the only posible ordering.
// It's recursive, so it may fail for very big datasets
func QuickSort(data PointList, sortFunc SortFunction) {
	if len(data) < 2 {
		return
	}
	pivot := data[0]
	l, r := 1, len(data)-1
	for l <= r {
		for l <= r && sortFunc(pivot, data[l]) {
			l++
		}
		for r >= l && !sortFunc(pivot, data[r]) {
			r--
		}
		if l < r {
			data[l], data[r] = data[r], data[l]
		}
	}
	if r > 0 {
		data[0], data[r] = data[r], data[0]
		QuickSort(data[0:r], sortFunc)
	}
	QuickSort(data[l:], sortFunc)
}

repository: Willyfrog/peano

repo_name: Willyfrog/peano

extension: go


text:
package victor

import (
    "github.com/brettbuddin/victor/campfire"
    "log"
    "time"
)

type Campfire struct {
    brain   *Brain
    account string
    token   string
    rooms   []int
    client  *campfire.Client
    me      *campfire.User
}

func NewCampfire(name string, account string, token string, rooms []int) *Campfire {
    return &Campfire{
        brain:   NewBrain(name),
        account: account,
        token:   token,
        rooms:   rooms,
        client:  campfire.NewClient(account, token),
    }
}

// Returns the Brain of this adapter.
func (c *Campfire) Brain() *Brain {
    return c.brain
}

// Returns the Client used by this adapter.
func (c *Campfire) Client() *campfire.Client {
    return c.client
}

// Hear registers a new Hear Matcher with the Brain.
func (c *Campfire) Hear(expStr string, callback func(*Context)) {
    c.Brain().Hear(expStr, callback)
}

// Respond registers a new Respond Matcher with the Brain.
func (c *Campfire) Respond(expStr string, callback func(*Context)) {
    c.Brain().Respond(expStr, callback)
}

// Run is where the business happens.
func (c *Campfire) Run() {
    rooms := c.rooms
    messages := make(chan *campfire.Message)
    joined := 0

    for i := range rooms {
        me, err := c.Client().Me()

        if err != nil {
            log.Printf("Error fetching info about c: %s", err)
            continue
        }

        c.me = me

        room := c.Client().Room(rooms[i])

        if room.Join() != nil {
            log.Printf("Error joining room %i: %s", rooms[i], err)
            continue
        }
        joined++

        go c.pollRoomDetails(room)
        room.Stream(messages)
    }

    if joined == 0 {
        log.Fatal("No rooms joined; nothing to stream from.")
    }

    for {
        msg := <-messages

        if msg.UserId() == c.me.Id() {
            continue
        }

        ctx := &Context{
            Reply: func(text string) {
                user := c.Brain().UserForId(msg.UserId())

                prefix := ""

                if user != nil {
                    prefix = user.Name() + ": "
                }

                c.Client().Room(msg.RoomId()).Say(prefix + text)
            },
            Send: func(text string) {
                c.Client().Room(msg.RoomId()).Say(text)
            },
            Paste: func(text string) {
                c.Client().Room(msg.RoomId()).Paste(text)
            },
            Sound: func(name string) {
                c.Client().Room(msg.RoomId()).Sound(name)
            },
        }
        ctx.SetMessage(msg)

        go c.brain.Receive(ctx)
    }
}

func (c *Campfire) pollRoomDetails(room *campfire.Room) {
    for {
        details, err := room.Show()

        if err != nil {
            continue
        }

        for _, user := range details.Users() {
            c.Brain().RememberUser(user)
        }

        time.Sleep(300 * time.Second)
    }
}

repository: fd/victor

repo_name: fd/victor