Create Repo

This commit is contained in:
Justin Bland 2021-06-28 16:40:28 +10:00
parent 9bad102db6
commit 44c578cd99
46 changed files with 22042 additions and 1 deletions

BIN
PCB/BadUSB-Bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

7706
PCB/BadUSB-Panel.brd Normal file

File diff suppressed because it is too large Load Diff

BIN
PCB/BadUSB-TOP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

1999
PCB/BadUSB.brd Normal file

File diff suppressed because it is too large Load Diff

8736
PCB/BadUSB.sch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/2262093/100519/2.49/6/4/Connector/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;Headers &amp; Wire Housings ECONOSTIK HEADER DR VT SMT 2X3&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="10129383906001ALF">
<description>&lt;b&gt;10129383-906001ALF-3&lt;/b&gt;&lt;br&gt;
</description>
<smd name="A1" x="-2.540" y="-2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<smd name="A2" x="0.000" y="-2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<smd name="A3" x="2.540" y="-2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<smd name="B1" x="-2.540" y="2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<smd name="B2" x="0.000" y="2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<smd name="B3" x="2.540" y="2.730" dx="3.180" dy="1.270" layer="1" rot="R90"/>
<text x="-0.195" y="0.000" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="-0.195" y="0.000" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-3.81" y1="2.415" x2="3.81" y2="2.415" width="0.2" layer="51"/>
<wire x1="3.81" y1="2.415" x2="3.81" y2="-2.415" width="0.2" layer="51"/>
<wire x1="3.81" y1="-2.415" x2="-3.81" y2="-2.415" width="0.2" layer="51"/>
<wire x1="-3.81" y1="-2.415" x2="-3.81" y2="2.415" width="0.2" layer="51"/>
<wire x1="-5.2" y1="5.32" x2="4.81" y2="5.32" width="0.1" layer="51"/>
<wire x1="4.81" y1="5.32" x2="4.81" y2="-5.32" width="0.1" layer="51"/>
<wire x1="4.81" y1="-5.32" x2="-5.2" y2="-5.32" width="0.1" layer="51"/>
<wire x1="-5.2" y1="-5.32" x2="-5.2" y2="5.32" width="0.1" layer="51"/>
<wire x1="-3.81" y1="2.415" x2="-3.81" y2="-2.4" width="0.1" layer="21"/>
<wire x1="-4.2" y1="-3.4" x2="-4.2" y2="-3.4" width="0.2" layer="21"/>
<wire x1="-4.200" y1="-3.400" x2="-4.000" y2="-3.400" width="0.2" layer="21" curve="180.0"/>
<wire x1="-4" y1="-3.4" x2="-4" y2="-3.4" width="0.2" layer="21"/>
<wire x1="-4.000" y1="-3.400" x2="-4.200" y2="-3.400" width="0.2" layer="21" curve="180.0"/>
<wire x1="3.8" y1="2.415" x2="3.81" y2="-2.415" width="0.1" layer="21"/>
</package>
</packages>
<symbols>
<symbol name="10129383-906001ALF">
<wire x1="5.08" y1="2.54" x2="17.78" y2="2.54" width="0.254" layer="94"/>
<wire x1="17.78" y1="-7.62" x2="17.78" y2="2.54" width="0.254" layer="94"/>
<wire x1="17.78" y1="-7.62" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<wire x1="5.08" y1="2.54" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<text x="19.05" y="7.62" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="19.05" y="5.08" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="A1" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="A2" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="A3" x="0" y="-5.08" length="middle" direction="io" rot="R0"/>
<pin name="B1" x="22.86" y="0" length="middle" direction="io" rot="R180"/>
<pin name="B2" x="22.86" y="-2.54" length="middle" direction="io" rot="R180"/>
<pin name="B3" x="22.86" y="-5.08" length="middle" direction="io" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="10129383-906001ALF" prefix="J">
<description>&lt;b&gt;Headers &amp; Wire Housings ECONOSTIK HEADER DR VT SMT 2X3&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="https://componentsearchengine.com/Datasheets/1/10129383-906001ALF.pdf"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="10129383-906001ALF" x="0" y="0"/>
</gates>
<devices>
<device name="" package="10129383906001ALF">
<connects>
<connect gate="G$1" pin="A1" pad="A1"/>
<connect gate="G$1" pin="A2" pad="A2"/>
<connect gate="G$1" pin="A3" pad="A3"/>
<connect gate="G$1" pin="B1" pad="B1"/>
<connect gate="G$1" pin="B2" pad="B2"/>
<connect gate="G$1" pin="B3" pad="B3"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="Amphenol" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="10129383-906001ALF" constant="no"/>
<attribute name="Mouser_Part_Number" value="649-1012938390601ALF" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/Amphenol-FCI/10129383-906001ALF/?qs=0lQeLiL1qyZsINMRDvT9Pw%3D%3D" constant="no"/>
<attribute name="Arrow_Part_Number" value="10129383-906001ALF" constant="no"/>
<attribute name="Arrow_Price-Stock" value="https://www.arrow.com/en/products/10129383-906001alf/amphenol-fci" constant="no"/>
<attribute name="Description" value="Headers &amp; Wire Housings ECONOSTIK HEADER DR VT SMT 2X3" constant="no"/>
<attribute name="Height" value="8.58mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/232218/100519/2.47/12/4/Connector/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;Molex 47219 Series 8 Way Horizontal Hinged Micro SD Memory Card Connector with Solder Termination&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="472192001">
<description>&lt;b&gt;47219-2001&lt;/b&gt;&lt;br&gt;
</description>
<smd name="1" x="3.205" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="2" x="2.105" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="3" x="1.005" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="4" x="-0.095" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="5" x="-1.195" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="6" x="-2.295" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="7" x="-3.395" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="8" x="-4.495" y="-1.800" dx="1.500" dy="0.800" layer="1" rot="R90"/>
<smd name="9" x="-6.875" y="-4.400" dx="2.000" dy="1.450" layer="1" rot="R90"/>
<smd name="10" x="-6.875" y="3.900" dx="2.000" dy="1.450" layer="1" rot="R90"/>
<smd name="11" x="6.875" y="3.900" dx="2.000" dy="1.450" layer="1" rot="R90"/>
<smd name="12" x="6.875" y="-4.400" dx="2.000" dy="1.450" layer="1" rot="R90"/>
<text x="0.000" y="0.000" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="0.000" y="0.000" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-6.8" y1="7.55" x2="6.8" y2="7.55" width="0.2" layer="51"/>
<wire x1="6.8" y1="7.55" x2="6.8" y2="-6.95" width="0.2" layer="51"/>
<wire x1="6.8" y1="-6.95" x2="-6.8" y2="-6.95" width="0.2" layer="51"/>
<wire x1="-6.8" y1="-6.95" x2="-6.8" y2="7.55" width="0.2" layer="51"/>
<wire x1="-8.6" y1="8.55" x2="8.6" y2="8.55" width="0.1" layer="51"/>
<wire x1="8.6" y1="8.55" x2="8.6" y2="-8.55" width="0.1" layer="51"/>
<wire x1="8.6" y1="-8.55" x2="-8.6" y2="-8.55" width="0.1" layer="51"/>
<wire x1="-8.6" y1="-8.55" x2="-8.6" y2="8.55" width="0.1" layer="51"/>
<wire x1="-6.8" y1="6.05" x2="-6.8" y2="7.55" width="0.1" layer="21"/>
<wire x1="-6.8" y1="7.55" x2="6.8" y2="7.55" width="0.1" layer="21"/>
<wire x1="6.8" y1="7.55" x2="6.8" y2="6.05" width="0.1" layer="21"/>
<wire x1="-6.8" y1="6.05" x2="-6.8" y2="5.55" width="0.1" layer="21"/>
<wire x1="6.8" y1="6.05" x2="6.8" y2="5.55" width="0.1" layer="21"/>
<wire x1="-6.8" y1="2.55" x2="-6.8" y2="-2.95" width="0.1" layer="21"/>
<wire x1="6.8" y1="2.55" x2="6.8" y2="-2.95" width="0.1" layer="21"/>
<wire x1="-6.8" y1="-5.95" x2="-6.8" y2="-6.95" width="0.1" layer="21"/>
<wire x1="-6.8" y1="-6.95" x2="6.8" y2="-6.95" width="0.1" layer="21"/>
<wire x1="6.8" y1="-6.95" x2="6.8" y2="-5.95" width="0.1" layer="21"/>
<wire x1="3.2" y1="-7.45" x2="3.2" y2="-7.45" width="0.2" layer="21"/>
<wire x1="3.200" y1="-7.450" x2="3.400" y2="-7.450" width="0.2" layer="21" curve="-180.0"/>
<wire x1="3.4" y1="-7.45" x2="3.4" y2="-7.45" width="0.2" layer="21"/>
<wire x1="3.400" y1="-7.450" x2="3.200" y2="-7.450" width="0.2" layer="21" curve="-180.0"/>
</package>
</packages>
<symbols>
<symbol name="47219-2001">
<wire x1="5.08" y1="2.54" x2="27.94" y2="2.54" width="0.254" layer="94"/>
<wire x1="27.94" y1="-15.24" x2="27.94" y2="2.54" width="0.254" layer="94"/>
<wire x1="27.94" y1="-15.24" x2="5.08" y2="-15.24" width="0.254" layer="94"/>
<wire x1="5.08" y1="2.54" x2="5.08" y2="-15.24" width="0.254" layer="94"/>
<text x="29.21" y="7.62" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="29.21" y="5.08" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="DAT2" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="CD/DAT3" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="CMD" x="0" y="-5.08" length="middle" direction="io" rot="R0"/>
<pin name="VDD" x="0" y="-7.62" length="middle" direction="io" rot="R0"/>
<pin name="CLK" x="0" y="-10.16" length="middle" direction="io" rot="R0"/>
<pin name="VSS" x="0" y="-12.7" length="middle" direction="io" rot="R0"/>
<pin name="DAT0" x="33.02" y="0" length="middle" direction="io" rot="R180"/>
<pin name="DAT1" x="33.02" y="-2.54" length="middle" direction="io" rot="R180"/>
<pin name="GND_1" x="33.02" y="-5.08" length="middle" direction="io" rot="R180"/>
<pin name="GND_2" x="33.02" y="-7.62" length="middle" direction="io" rot="R180"/>
<pin name="GND_3" x="33.02" y="-10.16" length="middle" direction="io" rot="R180"/>
<pin name="GND_4" x="33.02" y="-12.7" length="middle" direction="io" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="47219-2001" prefix="J">
<description>&lt;b&gt;Molex 47219 Series 8 Way Horizontal Hinged Micro SD Memory Card Connector with Solder Termination&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="http://www.molex.com/molex/products/datasheet.jsp?part=active/0472192001_MEMORY_CARD_SOCKET.xml&amp;channel=Products&amp;Lang=en-US"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="47219-2001" x="0" y="0"/>
</gates>
<devices>
<device name="" package="472192001">
<connects>
<connect gate="G$1" pin="DAT2" pad="1"/>
<connect gate="G$1" pin="CD/DAT3" pad="2"/>
<connect gate="G$1" pin="CMD" pad="3"/>
<connect gate="G$1" pin="VDD" pad="4"/>
<connect gate="G$1" pin="CLK" pad="5"/>
<connect gate="G$1" pin="VSS" pad="6"/>
<connect gate="G$1" pin="DAT0" pad="7"/>
<connect gate="G$1" pin="DAT1" pad="8"/>
<connect gate="G$1" pin="GND_1" pad="9"/>
<connect gate="G$1" pin="GND_2" pad="10"/>
<connect gate="G$1" pin="GND_3" pad="11"/>
<connect gate="G$1" pin="GND_4" pad="12"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="Molex" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="47219-2001" constant="no"/>
<attribute name="Arrow_Part_Number" value="" constant="no"/>
<attribute name="Arrow_Price-Stock" value="" constant="no"/>
<attribute name="Mouser_Part_Number" value="538-47219-2001" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/Molex/47219-2001?qs=6kT3pPPHxnVaoXw6Dd7beQ%3D%3D" constant="no"/>
<attribute name="Description" value="Molex 47219 Series 8 Way Horizontal Hinged Micro SD Memory Card Connector with Solder Termination" constant="no"/>
<attribute name="Height" value="mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,255 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/240314/100519/2.47/44/3/Integrated Circuit/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;8-bit Microcontrollers - MCU USB 32K Flash 16 MHz&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="QFP80P1200X1200X120-44N">
<description>&lt;b&gt;44ML*-*-&lt;/b&gt;&lt;br&gt;
</description>
<smd name="1" x="-5.75" y="4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="2" x="-5.75" y="3.2" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="3" x="-5.75" y="2.4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="4" x="-5.75" y="1.6" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="5" x="-5.75" y="0.8" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="6" x="-5.75" y="0" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="7" x="-5.75" y="-0.8" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="8" x="-5.75" y="-1.6" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="9" x="-5.75" y="-2.4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="10" x="-5.75" y="-3.2" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="11" x="-5.75" y="-4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="12" x="-4" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="13" x="-3.2" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="14" x="-2.4" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="15" x="-1.6" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="16" x="-0.8" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="17" x="0" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="18" x="0.8" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="19" x="1.6" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="20" x="2.4" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="21" x="3.2" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="22" x="4" y="-5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="23" x="5.75" y="-4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="24" x="5.75" y="-3.2" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="25" x="5.75" y="-2.4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="26" x="5.75" y="-1.6" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="27" x="5.75" y="-0.8" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="28" x="5.75" y="0" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="29" x="5.75" y="0.8" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="30" x="5.75" y="1.6" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="31" x="5.75" y="2.4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="32" x="5.75" y="3.2" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="33" x="5.75" y="4" dx="1.5" dy="0.6" layer="1" rot="R0"/>
<smd name="34" x="4" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="35" x="3.2" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="36" x="2.4" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="37" x="1.6" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="38" x="0.8" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="39" x="0" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="40" x="-0.8" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="41" x="-1.6" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="42" x="-2.4" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="43" x="-3.2" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<smd name="44" x="-4" y="5.75" dx="1.5" dy="0.6" layer="1" rot="R90"/>
<text x="0" y="0" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="0" y="0" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-6.75" y1="6.75" x2="6.75" y2="6.75" width="0.05" layer="51"/>
<wire x1="6.75" y1="6.75" x2="6.75" y2="-6.75" width="0.05" layer="51"/>
<wire x1="6.75" y1="-6.75" x2="-6.75" y2="-6.75" width="0.05" layer="51"/>
<wire x1="-6.75" y1="-6.75" x2="-6.75" y2="6.75" width="0.05" layer="51"/>
<wire x1="-5" y1="5" x2="5" y2="5" width="0.1" layer="51"/>
<wire x1="5" y1="5" x2="5" y2="-5" width="0.1" layer="51"/>
<wire x1="5" y1="-5" x2="-5" y2="-5" width="0.1" layer="51"/>
<wire x1="-5" y1="-5" x2="-5" y2="5" width="0.1" layer="51"/>
<wire x1="-5" y1="4.2" x2="-4.2" y2="5" width="0.1" layer="51"/>
<wire x1="-4.65" y1="4.65" x2="4.65" y2="4.65" width="0.2" layer="21"/>
<wire x1="4.65" y1="4.65" x2="4.65" y2="-4.65" width="0.2" layer="21"/>
<wire x1="4.65" y1="-4.65" x2="-4.65" y2="-4.65" width="0.2" layer="21"/>
<wire x1="-4.65" y1="-4.65" x2="-4.65" y2="4.65" width="0.2" layer="21"/>
<circle x="-6.1" y="5.2" radius="0.2" width="0.4" layer="25"/>
</package>
</packages>
<symbols>
<symbol name="ATMEGA32U4-AUR">
<wire x1="5.08" y1="22.86" x2="76.2" y2="22.86" width="0.254" layer="94"/>
<wire x1="76.2" y1="-66.04" x2="76.2" y2="22.86" width="0.254" layer="94"/>
<wire x1="76.2" y1="-66.04" x2="5.08" y2="-66.04" width="0.254" layer="94"/>
<wire x1="5.08" y1="22.86" x2="5.08" y2="-66.04" width="0.254" layer="94"/>
<text x="77.47" y="27.94" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="77.47" y="25.4" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="(INT.6/AIN0)_PE6" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="UVCC" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="D-" x="0" y="-5.08" length="middle" direction="io" rot="R0"/>
<pin name="D+" x="0" y="-7.62" length="middle" direction="io" rot="R0"/>
<pin name="UGND" x="0" y="-10.16" length="middle" direction="io" rot="R0"/>
<pin name="UCAP" x="0" y="-12.7" length="middle" direction="io" rot="R0"/>
<pin name="VBUS" x="0" y="-15.24" length="middle" direction="io" rot="R0"/>
<pin name="(SS/PCINT0)_PB0" x="0" y="-17.78" length="middle" direction="io" rot="R0"/>
<pin name="(PCINT1/SCLK_)_PB1" x="0" y="-20.32" length="middle" direction="io" rot="R0"/>
<pin name="(PDI/PCINT2/MOSI)_PB2" x="0" y="-22.86" length="middle" direction="io" rot="R0"/>
<pin name="(PDO/PCINT3/MISO_)_PB3" x="0" y="-25.4" length="middle" direction="io" rot="R0"/>
<pin name="(PCINT7/OC0A/OC1C/!RTS)_PB7" x="27.94" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="!RESET" x="30.48" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="VCC_1" x="33.02" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="GND_1" x="35.56" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="XTAL2" x="38.1" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="XTAL1" x="40.64" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="(OC0B/SCL/INT0)_PD0" x="43.18" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="(SDA/INT1)_PD1" x="45.72" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="(RXD1/INT2)_PD2" x="48.26" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="(TXD1/INT3)_PD3" x="50.8" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="(XCK1/!CTS)_PD5" x="53.34" y="-71.12" length="middle" direction="io" rot="R90"/>
<pin name="PE2_(!HWB)" x="81.28" y="0" length="middle" direction="io" rot="R180"/>
<pin name="PC7_(ICP3/CLK0/OC4A_)" x="81.28" y="-2.54" length="middle" direction="io" rot="R180"/>
<pin name="PC6_(_OC3A/!OC4A)" x="81.28" y="-5.08" length="middle" direction="io" rot="R180"/>
<pin name="PB6_(PCINT6/OC1B/OC4B/ADC" x="81.28" y="-7.62" length="middle" direction="io" rot="R180"/>
<pin name="PB5_(PCINT5/OC1A/!OC4B!/ADC" x="81.28" y="-10.16" length="middle" direction="io" rot="R180"/>
<pin name="PB4_(PCINT4/ADC11)" x="81.28" y="-12.7" length="middle" direction="io" rot="R180"/>
<pin name="PD7_(T0/OC4D/ADC10)" x="81.28" y="-15.24" length="middle" direction="io" rot="R180"/>
<pin name="PD6_(T1/!OC4D!/ADC9)" x="81.28" y="-17.78" length="middle" direction="io" rot="R180"/>
<pin name="PD4_(ICP1/ADC8)" x="81.28" y="-20.32" length="middle" direction="io" rot="R180"/>
<pin name="AVCC_1" x="81.28" y="-22.86" length="middle" direction="io" rot="R180"/>
<pin name="GND_2" x="81.28" y="-25.4" length="middle" direction="io" rot="R180"/>
<pin name="AVCC_2" x="27.94" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="GND_4" x="30.48" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="AREF" x="33.02" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF0_(ADC0)" x="35.56" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF1_(ADC1)" x="38.1" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF4_(ADC4/TCK)" x="40.64" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF5_(ADC5/TMS)" x="43.18" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF6_(ADC6/TDO)" x="45.72" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="PF7_(ADC7/TDI)" x="48.26" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="GND_3" x="50.8" y="27.94" length="middle" direction="io" rot="R270"/>
<pin name="VCC_2" x="53.34" y="27.94" length="middle" direction="io" rot="R270"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="ATMEGA32U4-AUR" prefix="IC">
<description>&lt;b&gt;8-bit Microcontrollers - MCU USB 32K Flash 16 MHz&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="http://www.farnell.com/datasheets/2047909.pdf"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="ATMEGA32U4-AUR" x="0" y="0"/>
</gates>
<devices>
<device name="" package="QFP80P1200X1200X120-44N">
<connects>
<connect gate="G$1" pin="(INT.6/AIN0)_PE6" pad="1"/>
<connect gate="G$1" pin="UVCC" pad="2"/>
<connect gate="G$1" pin="D-" pad="3"/>
<connect gate="G$1" pin="D+" pad="4"/>
<connect gate="G$1" pin="UGND" pad="5"/>
<connect gate="G$1" pin="UCAP" pad="6"/>
<connect gate="G$1" pin="VBUS" pad="7"/>
<connect gate="G$1" pin="(SS/PCINT0)_PB0" pad="8"/>
<connect gate="G$1" pin="(PCINT1/SCLK_)_PB1" pad="9"/>
<connect gate="G$1" pin="(PDI/PCINT2/MOSI)_PB2" pad="10"/>
<connect gate="G$1" pin="(PDO/PCINT3/MISO_)_PB3" pad="11"/>
<connect gate="G$1" pin="(PCINT7/OC0A/OC1C/!RTS)_PB7" pad="12"/>
<connect gate="G$1" pin="!RESET" pad="13"/>
<connect gate="G$1" pin="VCC_1" pad="14"/>
<connect gate="G$1" pin="GND_1" pad="15"/>
<connect gate="G$1" pin="XTAL2" pad="16"/>
<connect gate="G$1" pin="XTAL1" pad="17"/>
<connect gate="G$1" pin="(OC0B/SCL/INT0)_PD0" pad="18"/>
<connect gate="G$1" pin="(SDA/INT1)_PD1" pad="19"/>
<connect gate="G$1" pin="(RXD1/INT2)_PD2" pad="20"/>
<connect gate="G$1" pin="(TXD1/INT3)_PD3" pad="21"/>
<connect gate="G$1" pin="(XCK1/!CTS)_PD5" pad="22"/>
<connect gate="G$1" pin="GND_2" pad="23"/>
<connect gate="G$1" pin="AVCC_1" pad="24"/>
<connect gate="G$1" pin="PD4_(ICP1/ADC8)" pad="25"/>
<connect gate="G$1" pin="PD6_(T1/!OC4D!/ADC9)" pad="26"/>
<connect gate="G$1" pin="PD7_(T0/OC4D/ADC10)" pad="27"/>
<connect gate="G$1" pin="PB4_(PCINT4/ADC11)" pad="28"/>
<connect gate="G$1" pin="PB5_(PCINT5/OC1A/!OC4B!/ADC" pad="29"/>
<connect gate="G$1" pin="PB6_(PCINT6/OC1B/OC4B/ADC" pad="30"/>
<connect gate="G$1" pin="PC6_(_OC3A/!OC4A)" pad="31"/>
<connect gate="G$1" pin="PC7_(ICP3/CLK0/OC4A_)" pad="32"/>
<connect gate="G$1" pin="PE2_(!HWB)" pad="33"/>
<connect gate="G$1" pin="VCC_2" pad="34"/>
<connect gate="G$1" pin="GND_3" pad="35"/>
<connect gate="G$1" pin="PF7_(ADC7/TDI)" pad="36"/>
<connect gate="G$1" pin="PF6_(ADC6/TDO)" pad="37"/>
<connect gate="G$1" pin="PF5_(ADC5/TMS)" pad="38"/>
<connect gate="G$1" pin="PF4_(ADC4/TCK)" pad="39"/>
<connect gate="G$1" pin="PF1_(ADC1)" pad="40"/>
<connect gate="G$1" pin="PF0_(ADC0)" pad="41"/>
<connect gate="G$1" pin="AREF" pad="42"/>
<connect gate="G$1" pin="GND_4" pad="43"/>
<connect gate="G$1" pin="AVCC_2" pad="44"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="Microchip" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="ATMEGA32U4-AUR" constant="no"/>
<attribute name="Arrow_Part_Number" value="ATMEGA32U4-AUR" constant="no"/>
<attribute name="Arrow_Price-Stock" value="https://www.arrow.com/en/products/atmega32u4-aur/microchip-technology" constant="no"/>
<attribute name="Mouser_Part_Number" value="556-ATMEGA32U4-AUR" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/Microchip-Technology-Atmel/ATMEGA32U4-AUR?qs=rBGENRD8NwIbVIAimLns%252BA%3D%3D" constant="no"/>
<attribute name="Description" value="8-bit Microcontrollers - MCU USB 32K Flash 16 MHz" constant="no"/>
<attribute name="Height" value="1.2mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/954918/100519/2.49/6/2/Connector/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;6 Position, Micro Low Profile Header Strip, Double-Row, Vertical Surface Mount&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="FTS-103-YY-XX-DV-TR">
<description>&lt;b&gt;FTS-103-YY-XX-DV-TR&lt;/b&gt;&lt;br&gt;
</description>
<smd name="1" x="-1.27" y="-2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<smd name="2" x="-1.27" y="2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<smd name="3" x="0" y="-2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<smd name="4" x="0" y="2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<smd name="5" x="1.27" y="-2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<smd name="6" x="1.27" y="2.035" dx="2.79" dy="0.74" layer="1" rot="R90"/>
<text x="0" y="0" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="0" y="0" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-1.905" y1="1.715" x2="1.905" y2="1.715" width="0.2" layer="51"/>
<wire x1="1.905" y1="1.715" x2="1.905" y2="-1.715" width="0.2" layer="51"/>
<wire x1="1.905" y1="-1.715" x2="-1.905" y2="-1.715" width="0.2" layer="51"/>
<wire x1="-1.905" y1="-1.715" x2="-1.905" y2="1.715" width="0.2" layer="51"/>
<wire x1="1.905" y1="1.715" x2="1.905" y2="-1.715" width="0.1" layer="21"/>
<wire x1="-1.905" y1="-1.715" x2="-1.905" y2="1.715" width="0.1" layer="21"/>
<circle x="-1.32" y="-3.785" radius="0.05" width="0.2" layer="25"/>
<wire x1="-3.105" y1="4.43" x2="3.105" y2="4.43" width="0.05" layer="51"/>
<wire x1="3.105" y1="4.43" x2="3.105" y2="-4.885" width="0.05" layer="51"/>
<wire x1="3.105" y1="-4.885" x2="-3.105" y2="-4.885" width="0.05" layer="51"/>
<wire x1="-3.105" y1="-4.885" x2="-3.105" y2="4.43" width="0.05" layer="51"/>
</package>
</packages>
<symbols>
<symbol name="FTS-103-01-L-DV-TR">
<wire x1="5.08" y1="2.54" x2="15.24" y2="2.54" width="0.254" layer="94"/>
<wire x1="15.24" y1="-7.62" x2="15.24" y2="2.54" width="0.254" layer="94"/>
<wire x1="15.24" y1="-7.62" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<wire x1="5.08" y1="2.54" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<text x="16.51" y="7.62" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="16.51" y="5.08" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="1" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="2" x="20.32" y="0" length="middle" direction="io" rot="R180"/>
<pin name="3" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="4" x="20.32" y="-2.54" length="middle" direction="io" rot="R180"/>
<pin name="5" x="0" y="-5.08" length="middle" direction="io" rot="R0"/>
<pin name="6" x="20.32" y="-5.08" length="middle" direction="io" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="FTS-103-01-L-DV-TR" prefix="J">
<description>&lt;b&gt;6 Position, Micro Low Profile Header Strip, Double-Row, Vertical Surface Mount&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="http://suddendocs.samtec.com/prints/fts-1xx-xx-xx-xx-xx-mkt.pdf"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="FTS-103-01-L-DV-TR" x="0" y="0"/>
</gates>
<devices>
<device name="" package="FTS-103-YY-XX-DV-TR">
<connects>
<connect gate="G$1" pin="1" pad="1"/>
<connect gate="G$1" pin="2" pad="2"/>
<connect gate="G$1" pin="3" pad="3"/>
<connect gate="G$1" pin="4" pad="4"/>
<connect gate="G$1" pin="5" pad="5"/>
<connect gate="G$1" pin="6" pad="6"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="SAMTEC" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="FTS-103-01-L-DV-TR" constant="no"/>
<attribute name="Mouser_Part_Number" value="200-FTS10301LDVTR" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/Samtec/FTS-103-01-L-DV-TR?qs=0lQeLiL1qyZdQ0modVbSfg%3D%3D" constant="no"/>
<attribute name="Arrow_Part_Number" value="FTS-103-01-L-DV-TR" constant="no"/>
<attribute name="Arrow_Price-Stock" value="https://www.arrow.com/en/products/fts-103-01-l-dv-tr/samtec" constant="no"/>
<attribute name="Description" value="6 Position, Micro Low Profile Header Strip, Double-Row, Vertical Surface Mount" constant="no"/>
<attribute name="Height" value="mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/678373/100519/2.47/4/4/Connector/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;USB Connectors USB 2.0 type A plug 4 pin Horizontal TH&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="UP2-AH-1-TH">
<description>&lt;b&gt;UP2-AH-1-TH&lt;/b&gt;&lt;br&gt;
</description>
<pad name="1" x="3.5" y="19.9" drill="1" diameter="1.55"/>
<pad name="2" x="1" y="19.9" drill="1" diameter="1.55"/>
<pad name="3" x="-1" y="19.9" drill="1" diameter="1.55"/>
<pad name="4" x="-3.5" y="19.9" drill="1" diameter="1.55"/>
<pad name="5" x="-2.3" y="17.8" drill="1.2" diameter="1.85"/>
<pad name="6" x="2.3" y="17.8" drill="1.2" diameter="1.85"/>
<pad name="7" x="5.85" y="17.8" drill="2.7" diameter="4"/>
<pad name="8" x="-5.85" y="17.8" drill="2.7" diameter="4"/>
<text x="-0.427" y="13.687" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="-0.427" y="13.687" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-6" y1="18.8" x2="6" y2="18.8" width="0.2" layer="51"/>
<wire x1="6" y1="18.8" x2="6" y2="0" width="0.2" layer="51"/>
<wire x1="6" y1="0" x2="-6" y2="0" width="0.2" layer="51"/>
<wire x1="-6" y1="0" x2="-6" y2="18.8" width="0.2" layer="51"/>
<wire x1="-6" y1="0" x2="-6" y2="15.086" width="0.2" layer="21"/>
<wire x1="-6" y1="0" x2="6" y2="0" width="0.2" layer="21"/>
<wire x1="6" y1="0" x2="6" y2="15.086" width="0.2" layer="21"/>
<circle x="3.483" y="21.422" radius="0.06419" width="0.2" layer="25"/>
</package>
</packages>
<symbols>
<symbol name="UP2-AH-1-TH">
<wire x1="5.08" y1="2.54" x2="15.24" y2="2.54" width="0.254" layer="94"/>
<wire x1="15.24" y1="-5.08" x2="15.24" y2="2.54" width="0.254" layer="94"/>
<wire x1="15.24" y1="-5.08" x2="5.08" y2="-5.08" width="0.254" layer="94"/>
<wire x1="5.08" y1="2.54" x2="5.08" y2="-5.08" width="0.254" layer="94"/>
<text x="16.51" y="7.62" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="16.51" y="5.08" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="1" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="2" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="3" x="20.32" y="0" length="middle" direction="io" rot="R180"/>
<pin name="4" x="20.32" y="-2.54" length="middle" direction="io" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="UP2-AH-1-TH" prefix="J">
<description>&lt;b&gt;USB Connectors USB 2.0 type A plug 4 pin Horizontal TH&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="http://www.cui.com/product/resource/up2-ah-th.pdf"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="UP2-AH-1-TH" x="0" y="0"/>
</gates>
<devices>
<device name="" package="UP2-AH-1-TH">
<connects>
<connect gate="G$1" pin="1" pad="1"/>
<connect gate="G$1" pin="2" pad="2"/>
<connect gate="G$1" pin="3" pad="3"/>
<connect gate="G$1" pin="4" pad="4"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="CUI Devices" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="UP2-AH-1-TH" constant="no"/>
<attribute name="Arrow_Part_Number" value="UP2-AH-1-TH" constant="no"/>
<attribute name="Arrow_Price-Stock" value="https://www.arrow.com/en/products/up2-ah-1-th/cui-devices" constant="no"/>
<attribute name="Mouser_Part_Number" value="490-UP2-AH-1-TH" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/CUI-Devices/UP2-AH-1-TH?qs=5mqXD9RfOg0slNuu3mCk4w%3D%3D" constant="no"/>
<attribute name="Description" value="USB Connectors USB 2.0 type A plug 4 pin Horizontal TH" constant="no"/>
<attribute name="Height" value="mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<!--/741989/100519/2.47/5/3/Integrated Circuit/-->
<!DOCTYPE curve SYSTEM "eagle.dtd">
<eagle version="7.7.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" 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="yes" 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="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" 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="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<library>
<description>&lt;LDO Voltage Regulators 300mA High Speed Votage Regulator&lt;/b&gt;&lt;p&gt;
&lt;author&gt;Created by SamacSys&lt;/author&gt;</description>
<packages>
<package name="SOT95P280X130-5N">
<description>&lt;b&gt;SOT-25-3&lt;/b&gt;&lt;br&gt;
</description>
<smd name="1" x="-1.4" y="0.95" dx="0.9" dy="0.6" layer="1" rot="R0"/>
<smd name="2" x="-1.4" y="0" dx="0.9" dy="0.6" layer="1" rot="R0"/>
<smd name="3" x="-1.4" y="-0.95" dx="0.9" dy="0.6" layer="1" rot="R0"/>
<smd name="4" x="1.4" y="-0.95" dx="0.9" dy="0.6" layer="1" rot="R0"/>
<smd name="5" x="1.4" y="0.95" dx="0.9" dy="0.6" layer="1" rot="R0"/>
<text x="0" y="0" align="center" size="1.27" layer="25" rot="R0" >&gt;NAME</text>
<text x="0" y="0" align="center" size="1.27" layer="27" rot="R0" >&gt;VALUE</text>
<wire x1="-2.1" y1="1.8" x2="2.1" y2="1.8" width="0.05" layer="51"/>
<wire x1="2.1" y1="1.8" x2="2.1" y2="-1.8" width="0.05" layer="51"/>
<wire x1="2.1" y1="-1.8" x2="-2.1" y2="-1.8" width="0.05" layer="51"/>
<wire x1="-2.1" y1="-1.8" x2="-2.1" y2="1.8" width="0.05" layer="51"/>
<wire x1="-0.825" y1="1.45" x2="0.825" y2="1.45" width="0.1" layer="51"/>
<wire x1="0.825" y1="1.45" x2="0.825" y2="-1.45" width="0.1" layer="51"/>
<wire x1="0.825" y1="-1.45" x2="-0.825" y2="-1.45" width="0.1" layer="51"/>
<wire x1="-0.825" y1="-1.45" x2="-0.825" y2="1.45" width="0.1" layer="51"/>
<wire x1="-0.825" y1="0.5" x2="0.125" y2="1.45" width="0.1" layer="51"/>
<wire x1="-0.6" y1="1.45" x2="0.6" y2="1.45" width="0.2" layer="21"/>
<wire x1="0.6" y1="1.45" x2="0.6" y2="-1.45" width="0.2" layer="21"/>
<wire x1="0.6" y1="-1.45" x2="-0.6" y2="-1.45" width="0.2" layer="21"/>
<wire x1="-0.6" y1="-1.45" x2="-0.6" y2="1.45" width="0.2" layer="21"/>
<wire x1="-1.85" y1="1.5" x2="-0.95" y2="1.5" width="0.2" layer="21"/>
</package>
</packages>
<symbols>
<symbol name="XC6219A332MR-G">
<wire x1="5.08" y1="2.54" x2="22.86" y2="2.54" width="0.254" layer="94"/>
<wire x1="22.86" y1="-7.62" x2="22.86" y2="2.54" width="0.254" layer="94"/>
<wire x1="22.86" y1="-7.62" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<wire x1="5.08" y1="2.54" x2="5.08" y2="-7.62" width="0.254" layer="94"/>
<text x="24.13" y="7.62" align="center-left" size="1.778" layer="95">&gt;NAME</text>
<text x="24.13" y="5.08" align="center-left" size="1.778" layer="96">&gt;VALUE</text>
<pin name="VIN" x="0" y="0" length="middle" direction="io" rot="R0"/>
<pin name="VSS" x="0" y="-2.54" length="middle" direction="io" rot="R0"/>
<pin name="CE" x="0" y="-5.08" length="middle" direction="io" rot="R0"/>
<pin name="NC" x="27.94" y="0" length="middle" direction="nc" rot="R180"/>
<pin name="VOUT" x="27.94" y="-2.54" length="middle" direction="io" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="XC6219A332MR-G" prefix="IC">
<description>&lt;b&gt;LDO Voltage Regulators 300mA High Speed Votage Regulator&lt;/b&gt;&lt;p&gt;
Source: &lt;a href="https://www.torexsemi.com/file/xc6219/XC6219.pdf"&gt; Datasheet &lt;/a&gt;</description>
<gates>
<gate name="G$1" symbol="XC6219A332MR-G" x="0" y="0"/>
</gates>
<devices>
<device name="" package="SOT95P280X130-5N">
<connects>
<connect gate="G$1" pin="VIN" pad="1"/>
<connect gate="G$1" pin="VSS" pad="2"/>
<connect gate="G$1" pin="CE" pad="3"/>
<connect gate="G$1" pin="NC" pad="4"/>
<connect gate="G$1" pin="VOUT" pad="5"/>
</connects>
<technologies>
<technology name="">
<attribute name="Manufacturer_Name" value="Torex" constant="no"/>
<attribute name="Manufacturer_Part_Number" value="XC6219A332MR-G" constant="no"/>
<attribute name="Arrow_Part_Number" value="" constant="no"/>
<attribute name="Arrow_Price-Stock" value="" constant="no"/>
<attribute name="Mouser_Part_Number" value="865-XC6219A332MR-G" constant="no"/>
<attribute name="Mouser_Price-Stock" value="https://www.mouser.co.uk/ProductDetail/Torex-Semiconductor/XC6219A332MR-G?qs=AsjdqWjXhJ%2FqZhqmpYowVg%3D%3D" constant="no"/>
<attribute name="Description" value="LDO Voltage Regulators 300mA High Speed Votage Regulator" constant="no"/>
<attribute name="Height" value="1.3mm" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

204
PCB/Part Libraries/fid.lbr Normal file
View File

@ -0,0 +1,204 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="8.2.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="yes" altdistance="0.01" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="2" name="GND" color="18" fill="9" visible="no" active="no"/>
<layer number="3" name="Route3" color="4" fill="3" visible="no" active="no"/>
<layer number="4" name="Route4" color="1" fill="4" visible="no" active="no"/>
<layer number="5" name="Route5" color="4" fill="4" visible="no" active="no"/>
<layer number="6" name="Route6" color="1" fill="8" visible="no" active="no"/>
<layer number="7" name="Route7" color="4" fill="8" visible="no" active="no"/>
<layer number="8" name="Route8" color="1" fill="2" visible="no" active="no"/>
<layer number="9" name="Route9" color="4" fill="2" visible="no" active="no"/>
<layer number="10" name="Route10" color="1" fill="7" visible="no" active="no"/>
<layer number="11" name="Route11" color="4" fill="7" visible="no" active="no"/>
<layer number="12" name="Route12" color="1" fill="5" visible="no" active="no"/>
<layer number="13" name="Route13" color="4" fill="5" visible="no" active="no"/>
<layer number="14" name="Route14" color="1" fill="6" visible="no" active="no"/>
<layer number="15" name="PWR" color="5" fill="9" visible="no" active="no"/>
<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="yes" 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="yes" 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="yes" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="yes" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="yes" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="yes" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="yes" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="yes" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="yes" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="yes" 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="yes" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="yes" 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="50" name="dxf" color="7" fill="1" visible="no" active="no"/>
<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="53" name="tGND_GNDA" color="7" fill="1" visible="no" active="no"/>
<layer number="54" name="bGND_GNDA" color="7" fill="1" visible="no" active="no"/>
<layer number="56" name="wert" color="7" fill="1" visible="no" active="no"/>
<layer number="90" name="Modules" color="5" fill="1" visible="no" active="no"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
<layer number="100" name="Outline" color="7" fill="1" visible="no" active="yes"/>
<layer number="101" name="Stencil" color="7" fill="1" visible="no" active="yes"/>
<layer number="102" name="V-Score" color="3" fill="1" visible="no" active="yes"/>
</layers>
<library>
<description>Fiducial Marks
&lt;br&gt;Alignment marks for fabrication and placement.
&lt;p&gt;
&lt;i&gt;05/24/17 - Changed circles to smd pads so locations show up in XY files. C. Nicks</description>
<packages>
<package name="FID_020">
<description>Fiducial 20mil</description>
<circle x="0" y="0" radius="0.508" width="0" layer="29"/>
<circle x="0" y="0" radius="0.508" width="0" layer="30"/>
<circle x="0" y="0" radius="0.635" width="0" layer="41"/>
<circle x="0" y="0" radius="0.635" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="0.508" dy="0.508" layer="1" roundness="100" stop="no" thermals="no" cream="no"/>
<smd name="FIDB" x="0" y="0" dx="0.508" dy="0.508" layer="16" roundness="100" stop="no" thermals="no" cream="no"/>
</package>
<package name="FID_040">
<description>Fiducial 40mil</description>
<circle x="0" y="0" radius="1.016" width="0" layer="29"/>
<circle x="0" y="0" radius="1.016" width="0" layer="30"/>
<circle x="0" y="0" radius="1.27" width="0" layer="41"/>
<circle x="0" y="0" radius="1.27" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="1.016" dy="1.016" layer="1" roundness="100" stop="no" thermals="no" cream="no"/>
<smd name="FIDB" x="0" y="0" dx="1.016" dy="1.016" layer="16" roundness="100" stop="no" thermals="no" cream="no"/>
</package>
<package name="FID_060">
<description>Fiducial 60mil</description>
<circle x="0" y="0" radius="1.27" width="0" layer="30"/>
<circle x="0" y="0" radius="1.27" width="0" layer="29"/>
<circle x="0" y="0" radius="1.524" width="0" layer="41"/>
<circle x="0" y="0" radius="1.524" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="1.524" dy="1.524" layer="1" roundness="100" stop="no" thermals="no"/>
<smd name="FIDB" x="0" y="0" dx="1.524" dy="1.524" layer="16" roundness="100" stop="no" thermals="no"/>
</package>
<package name="FID_040_P">
<description>Fiducial 40mil with paste for alignment</description>
<circle x="0" y="0" radius="1.016" width="0" layer="29"/>
<circle x="0" y="0" radius="1.016" width="0" layer="30"/>
<circle x="0" y="0" radius="1.27" width="0" layer="41"/>
<circle x="0" y="0" radius="1.27" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="1.016" dy="1.016" layer="1" roundness="100" stop="no" thermals="no"/>
<smd name="FIDB" x="0" y="0" dx="1.016" dy="1.016" layer="16" roundness="100" stop="no" thermals="no"/>
</package>
<package name="FID_060_P">
<description>Fiducial 60mil with paste for alignment</description>
<circle x="0" y="0" radius="1.27" width="0" layer="30"/>
<circle x="0" y="0" radius="1.27" width="0" layer="29"/>
<circle x="0" y="0" radius="1.524" width="0" layer="41"/>
<circle x="0" y="0" radius="1.524" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="1.524" dy="1.524" layer="1" roundness="100" stop="no" thermals="no"/>
<smd name="FIDB" x="0" y="0" dx="1.524" dy="1.524" layer="16" roundness="100" stop="no" thermals="no"/>
</package>
<package name="FID_020_P">
<description>Fiducial 20mil with paste for alignment</description>
<circle x="0" y="0" radius="0.508" width="0" layer="29"/>
<circle x="0" y="0" radius="0.508" width="0" layer="30"/>
<circle x="0" y="0" radius="0.635" width="0" layer="41"/>
<circle x="0" y="0" radius="0.635" width="0" layer="42"/>
<smd name="FIDT" x="0" y="0" dx="0.508" dy="0.508" layer="1" roundness="100" stop="no" thermals="no"/>
<smd name="FIDB" x="0" y="0" dx="0.508" dy="0.508" layer="16" roundness="100" stop="no" thermals="no"/>
</package>
</packages>
<symbols>
<symbol name="EMPTY">
<description>Empty symbol so a blank device can be made. Sometimes when working with scripts and ULPs they error when there are board-only elements</description>
</symbol>
<symbol name="FIDUCIAL">
<description>Empty symbol so a blank device can be made. Sometimes when working with scripts and ULPs they error when there are board-only elements</description>
<circle x="0" y="0" radius="0.254" width="0" layer="94"/>
<text x="0" y="1.27" size="1.016" layer="95" font="vector" ratio="12">&gt;NAME</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="FID" prefix="FD">
<description>Fiducial marks. Top and Bottom copper with stop mask</description>
<gates>
<gate name="G$2" symbol="FIDUCIAL" x="0" y="0"/>
</gates>
<devices>
<device name="_20MIL" package="FID_020">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
<device name="_40MIL" package="FID_040">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
<device name="_60MIL" package="FID_060">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
<device name="_20MIL_P" package="FID_020_P">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
<device name="_40MIL_P" package="FID_040_P">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
<device name="_60MIL_P" package="FID_060_P">
<technologies>
<technology name="">
<attribute name="BOM" value="" constant="no"/>
</technology>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</drawing>
</eagle>

BIN
PCB/Schematic.pdf Normal file

Binary file not shown.

335
PCB/eagle.epf Normal file
View File

@ -0,0 +1,335 @@
[Eagle]
Version="09 03 00"
Platform="Windows"
Globals="Globals"
Desktop="Desktop"
[Globals]
AutoSaveProject=1
UsedLibraryUrn="urn:adsk.eagle:library:79"
UsedLibraryUrn="urn:adsk.eagle:library:88"
UsedLibraryUrn="urn:adsk.eagle:library:201"
UsedLibraryUrn="urn:adsk.eagle:library:202"
UsedLibraryUrn="urn:adsk.eagle:library:203"
UsedLibraryUrn="urn:adsk.eagle:library:204"
UsedLibraryUrn="urn:adsk.eagle:library:206"
UsedLibraryUrn="urn:adsk.eagle:library:208"
UsedLibraryUrn="urn:adsk.eagle:library:210"
UsedLibraryUrn="urn:adsk.eagle:library:211"
UsedLibraryUrn="urn:adsk.eagle:library:212"
UsedLibraryUrn="urn:adsk.eagle:library:213"
UsedLibraryUrn="urn:adsk.eagle:library:89"
UsedLibraryUrn="urn:adsk.eagle:library:214"
UsedLibraryUrn="urn:adsk.eagle:library:215"
UsedLibraryUrn="urn:adsk.eagle:library:218"
UsedLibraryUrn="urn:adsk.eagle:library:220"
UsedLibraryUrn="urn:adsk.eagle:library:221"
UsedLibraryUrn="urn:adsk.eagle:library:222"
UsedLibraryUrn="urn:adsk.eagle:library:224"
UsedLibraryUrn="urn:adsk.eagle:library:226"
UsedLibraryUrn="urn:adsk.eagle:library:229"
UsedLibraryUrn="urn:adsk.eagle:library:230"
UsedLibraryUrn="urn:adsk.eagle:library:90"
UsedLibraryUrn="urn:adsk.eagle:library:231"
UsedLibraryUrn="urn:adsk.eagle:library:233"
UsedLibraryUrn="urn:adsk.eagle:library:234"
UsedLibraryUrn="urn:adsk.eagle:library:235"
UsedLibraryUrn="urn:adsk.eagle:library:236"
UsedLibraryUrn="urn:adsk.eagle:library:237"
UsedLibraryUrn="urn:adsk.eagle:library:238"
UsedLibraryUrn="urn:adsk.eagle:library:239"
UsedLibraryUrn="urn:adsk.eagle:library:240"
UsedLibraryUrn="urn:adsk.eagle:library:241"
UsedLibraryUrn="urn:adsk.eagle:library:93"
UsedLibraryUrn="urn:adsk.eagle:library:242"
UsedLibraryUrn="urn:adsk.eagle:library:243"
UsedLibraryUrn="urn:adsk.eagle:library:244"
UsedLibraryUrn="urn:adsk.eagle:library:245"
UsedLibraryUrn="urn:adsk.eagle:library:248"
UsedLibraryUrn="urn:adsk.eagle:library:250"
UsedLibraryUrn="urn:adsk.eagle:library:251"
UsedLibraryUrn="urn:adsk.eagle:library:252"
UsedLibraryUrn="urn:adsk.eagle:library:255"
UsedLibraryUrn="urn:adsk.eagle:library:256"
UsedLibraryUrn="urn:adsk.eagle:library:94"
UsedLibraryUrn="urn:adsk.eagle:library:258"
UsedLibraryUrn="urn:adsk.eagle:library:259"
UsedLibraryUrn="urn:adsk.eagle:library:260"
UsedLibraryUrn="urn:adsk.eagle:library:261"
UsedLibraryUrn="urn:adsk.eagle:library:262"
UsedLibraryUrn="urn:adsk.eagle:library:263"
UsedLibraryUrn="urn:adsk.eagle:library:264"
UsedLibraryUrn="urn:adsk.eagle:library:265"
UsedLibraryUrn="urn:adsk.eagle:library:266"
UsedLibraryUrn="urn:adsk.eagle:library:267"
UsedLibraryUrn="urn:adsk.eagle:library:96"
UsedLibraryUrn="urn:adsk.eagle:library:269"
UsedLibraryUrn="urn:adsk.eagle:library:270"
UsedLibraryUrn="urn:adsk.eagle:library:272"
UsedLibraryUrn="urn:adsk.eagle:library:273"
UsedLibraryUrn="urn:adsk.eagle:library:274"
UsedLibraryUrn="urn:adsk.eagle:library:275"
UsedLibraryUrn="urn:adsk.eagle:library:276"
UsedLibraryUrn="urn:adsk.eagle:library:278"
UsedLibraryUrn="urn:adsk.eagle:library:279"
UsedLibraryUrn="urn:adsk.eagle:library:281"
UsedLibraryUrn="urn:adsk.eagle:library:97"
UsedLibraryUrn="urn:adsk.eagle:library:283"
UsedLibraryUrn="urn:adsk.eagle:library:284"
UsedLibraryUrn="urn:adsk.eagle:library:285"
UsedLibraryUrn="urn:adsk.eagle:library:287"
UsedLibraryUrn="urn:adsk.eagle:library:288"
UsedLibraryUrn="urn:adsk.eagle:library:289"
UsedLibraryUrn="urn:adsk.eagle:library:290"
UsedLibraryUrn="urn:adsk.eagle:library:291"
UsedLibraryUrn="urn:adsk.eagle:library:293"
UsedLibraryUrn="urn:adsk.eagle:library:294"
UsedLibraryUrn="urn:adsk.eagle:library:98"
UsedLibraryUrn="urn:adsk.eagle:library:296"
UsedLibraryUrn="urn:adsk.eagle:library:297"
UsedLibraryUrn="urn:adsk.eagle:library:298"
UsedLibraryUrn="urn:adsk.eagle:library:300"
UsedLibraryUrn="urn:adsk.eagle:library:302"
UsedLibraryUrn="urn:adsk.eagle:library:303"
UsedLibraryUrn="urn:adsk.eagle:library:304"
UsedLibraryUrn="urn:adsk.eagle:library:307"
UsedLibraryUrn="urn:adsk.eagle:library:312"
UsedLibraryUrn="urn:adsk.eagle:library:313"
UsedLibraryUrn="urn:adsk.eagle:library:99"
UsedLibraryUrn="urn:adsk.eagle:library:314"
UsedLibraryUrn="urn:adsk.eagle:library:315"
UsedLibraryUrn="urn:adsk.eagle:library:317"
UsedLibraryUrn="urn:adsk.eagle:library:318"
UsedLibraryUrn="urn:adsk.eagle:library:319"
UsedLibraryUrn="urn:adsk.eagle:library:320"
UsedLibraryUrn="urn:adsk.eagle:library:322"
UsedLibraryUrn="urn:adsk.eagle:library:323"
UsedLibraryUrn="urn:adsk.eagle:library:324"
UsedLibraryUrn="urn:adsk.eagle:library:325"
UsedLibraryUrn="urn:adsk.eagle:library:102"
UsedLibraryUrn="urn:adsk.eagle:library:327"
UsedLibraryUrn="urn:adsk.eagle:library:328"
UsedLibraryUrn="urn:adsk.eagle:library:331"
UsedLibraryUrn="urn:adsk.eagle:library:332"
UsedLibraryUrn="urn:adsk.eagle:library:334"
UsedLibraryUrn="urn:adsk.eagle:library:335"
UsedLibraryUrn="urn:adsk.eagle:library:336"
UsedLibraryUrn="urn:adsk.eagle:library:337"
UsedLibraryUrn="urn:adsk.eagle:library:338"
UsedLibraryUrn="urn:adsk.eagle:library:339"
UsedLibraryUrn="urn:adsk.eagle:library:80"
UsedLibraryUrn="urn:adsk.eagle:library:105"
UsedLibraryUrn="urn:adsk.eagle:library:341"
UsedLibraryUrn="urn:adsk.eagle:library:342"
UsedLibraryUrn="urn:adsk.eagle:library:343"
UsedLibraryUrn="urn:adsk.eagle:library:344"
UsedLibraryUrn="urn:adsk.eagle:library:346"
UsedLibraryUrn="urn:adsk.eagle:library:347"
UsedLibraryUrn="urn:adsk.eagle:library:350"
UsedLibraryUrn="urn:adsk.eagle:library:351"
UsedLibraryUrn="urn:adsk.eagle:library:353"
UsedLibraryUrn="urn:adsk.eagle:library:358"
UsedLibraryUrn="urn:adsk.eagle:library:107"
UsedLibraryUrn="urn:adsk.eagle:library:360"
UsedLibraryUrn="urn:adsk.eagle:library:361"
UsedLibraryUrn="urn:adsk.eagle:library:362"
UsedLibraryUrn="urn:adsk.eagle:library:364"
UsedLibraryUrn="urn:adsk.eagle:library:366"
UsedLibraryUrn="urn:adsk.eagle:library:367"
UsedLibraryUrn="urn:adsk.eagle:library:368"
UsedLibraryUrn="urn:adsk.eagle:library:369"
UsedLibraryUrn="urn:adsk.eagle:library:371"
UsedLibraryUrn="urn:adsk.eagle:library:372"
UsedLibraryUrn="urn:adsk.eagle:library:109"
UsedLibraryUrn="urn:adsk.eagle:library:373"
UsedLibraryUrn="urn:adsk.eagle:library:374"
UsedLibraryUrn="urn:adsk.eagle:library:375"
UsedLibraryUrn="urn:adsk.eagle:library:376"
UsedLibraryUrn="urn:adsk.eagle:library:377"
UsedLibraryUrn="urn:adsk.eagle:library:378"
UsedLibraryUrn="urn:adsk.eagle:library:379"
UsedLibraryUrn="urn:adsk.eagle:library:380"
UsedLibraryUrn="urn:adsk.eagle:library:382"
UsedLibraryUrn="urn:adsk.eagle:library:383"
UsedLibraryUrn="urn:adsk.eagle:library:111"
UsedLibraryUrn="urn:adsk.eagle:library:385"
UsedLibraryUrn="urn:adsk.eagle:library:386"
UsedLibraryUrn="urn:adsk.eagle:library:387"
UsedLibraryUrn="urn:adsk.eagle:library:388"
UsedLibraryUrn="urn:adsk.eagle:library:389"
UsedLibraryUrn="urn:adsk.eagle:library:391"
UsedLibraryUrn="urn:adsk.eagle:library:392"
UsedLibraryUrn="urn:adsk.eagle:library:393"
UsedLibraryUrn="urn:adsk.eagle:library:394"
UsedLibraryUrn="urn:adsk.eagle:library:396"
UsedLibraryUrn="urn:adsk.eagle:library:112"
UsedLibraryUrn="urn:adsk.eagle:library:397"
UsedLibraryUrn="urn:adsk.eagle:library:398"
UsedLibraryUrn="urn:adsk.eagle:library:399"
UsedLibraryUrn="urn:adsk.eagle:library:400"
UsedLibraryUrn="urn:adsk.eagle:library:401"
UsedLibraryUrn="urn:adsk.eagle:library:402"
UsedLibraryUrn="urn:adsk.eagle:library:403"
UsedLibraryUrn="urn:adsk.eagle:library:404"
UsedLibraryUrn="urn:adsk.eagle:library:407"
UsedLibraryUrn="urn:adsk.eagle:library:408"
UsedLibraryUrn="urn:adsk.eagle:library:113"
UsedLibraryUrn="urn:adsk.eagle:library:409"
UsedLibraryUrn="urn:adsk.eagle:library:410"
UsedLibraryUrn="urn:adsk.eagle:library:411"
UsedLibraryUrn="urn:adsk.eagle:library:412"
UsedLibraryUrn="urn:adsk.eagle:library:417"
UsedLibraryUrn="urn:adsk.eagle:library:418"
UsedLibraryUrn="urn:adsk.eagle:library:419"
UsedLibraryUrn="urn:adsk.eagle:library:527439"
UsedLibraryUrn="urn:adsk.eagle:library:11396254"
UsedLibraryUrn="urn:adsk.eagle:library:15662110"
UsedLibraryUrn="urn:adsk.eagle:library:116"
UsedLibraryUrn="urn:adsk.eagle:library:420"
UsedLibraryUrn="urn:adsk.eagle:library:92"
UsedLibraryUrn="urn:adsk.eagle:library:21899384"
UsedLibraryUrn="urn:adsk.eagle:library:117"
UsedLibraryUrn="urn:adsk.eagle:library:118"
UsedLibraryUrn="urn:adsk.eagle:library:119"
UsedLibraryUrn="urn:adsk.eagle:library:81"
UsedLibraryUrn="urn:adsk.eagle:library:121"
UsedLibraryUrn="urn:adsk.eagle:library:122"
UsedLibraryUrn="urn:adsk.eagle:library:123"
UsedLibraryUrn="urn:adsk.eagle:library:124"
UsedLibraryUrn="urn:adsk.eagle:library:125"
UsedLibraryUrn="urn:adsk.eagle:library:126"
UsedLibraryUrn="urn:adsk.eagle:library:127"
UsedLibraryUrn="urn:adsk.eagle:library:128"
UsedLibraryUrn="urn:adsk.eagle:library:129"
UsedLibraryUrn="urn:adsk.eagle:library:130"
UsedLibraryUrn="urn:adsk.eagle:library:82"
UsedLibraryUrn="urn:adsk.eagle:library:132"
UsedLibraryUrn="urn:adsk.eagle:library:133"
UsedLibraryUrn="urn:adsk.eagle:library:134"
UsedLibraryUrn="urn:adsk.eagle:library:135"
UsedLibraryUrn="urn:adsk.eagle:library:136"
UsedLibraryUrn="urn:adsk.eagle:library:138"
UsedLibraryUrn="urn:adsk.eagle:library:139"
UsedLibraryUrn="urn:adsk.eagle:library:140"
UsedLibraryUrn="urn:adsk.eagle:library:141"
UsedLibraryUrn="urn:adsk.eagle:library:143"
UsedLibraryUrn="urn:adsk.eagle:library:83"
UsedLibraryUrn="urn:adsk.eagle:library:144"
UsedLibraryUrn="urn:adsk.eagle:library:145"
UsedLibraryUrn="urn:adsk.eagle:library:147"
UsedLibraryUrn="urn:adsk.eagle:library:148"
UsedLibraryUrn="urn:adsk.eagle:library:149"
UsedLibraryUrn="urn:adsk.eagle:library:150"
UsedLibraryUrn="urn:adsk.eagle:library:151"
UsedLibraryUrn="urn:adsk.eagle:library:152"
UsedLibraryUrn="urn:adsk.eagle:library:153"
UsedLibraryUrn="urn:adsk.eagle:library:154"
UsedLibraryUrn="urn:adsk.eagle:library:84"
UsedLibraryUrn="urn:adsk.eagle:library:155"
UsedLibraryUrn="urn:adsk.eagle:library:156"
UsedLibraryUrn="urn:adsk.eagle:library:157"
UsedLibraryUrn="urn:adsk.eagle:library:158"
UsedLibraryUrn="urn:adsk.eagle:library:159"
UsedLibraryUrn="urn:adsk.eagle:library:160"
UsedLibraryUrn="urn:adsk.eagle:library:161"
UsedLibraryUrn="urn:adsk.eagle:library:162"
UsedLibraryUrn="urn:adsk.eagle:library:163"
UsedLibraryUrn="urn:adsk.eagle:library:164"
UsedLibraryUrn="urn:adsk.eagle:library:85"
UsedLibraryUrn="urn:adsk.eagle:library:165"
UsedLibraryUrn="urn:adsk.eagle:library:166"
UsedLibraryUrn="urn:adsk.eagle:library:167"
UsedLibraryUrn="urn:adsk.eagle:library:169"
UsedLibraryUrn="urn:adsk.eagle:library:170"
UsedLibraryUrn="urn:adsk.eagle:library:171"
UsedLibraryUrn="urn:adsk.eagle:library:172"
UsedLibraryUrn="urn:adsk.eagle:library:173"
UsedLibraryUrn="urn:adsk.eagle:library:174"
UsedLibraryUrn="urn:adsk.eagle:library:175"
UsedLibraryUrn="urn:adsk.eagle:library:86"
UsedLibraryUrn="urn:adsk.eagle:library:176"
UsedLibraryUrn="urn:adsk.eagle:library:177"
UsedLibraryUrn="urn:adsk.eagle:library:179"
UsedLibraryUrn="urn:adsk.eagle:library:180"
UsedLibraryUrn="urn:adsk.eagle:library:181"
UsedLibraryUrn="urn:adsk.eagle:library:182"
UsedLibraryUrn="urn:adsk.eagle:library:183"
UsedLibraryUrn="urn:adsk.eagle:library:184"
UsedLibraryUrn="urn:adsk.eagle:library:188"
UsedLibraryUrn="urn:adsk.eagle:library:189"
UsedLibraryUrn="urn:adsk.eagle:library:87"
UsedLibraryUrn="urn:adsk.eagle:library:190"
UsedLibraryUrn="urn:adsk.eagle:library:191"
UsedLibraryUrn="urn:adsk.eagle:library:192"
UsedLibraryUrn="urn:adsk.eagle:library:193"
UsedLibraryUrn="urn:adsk.eagle:library:194"
UsedLibraryUrn="urn:adsk.eagle:library:195"
UsedLibraryUrn="urn:adsk.eagle:library:196"
UsedLibraryUrn="urn:adsk.eagle:library:197"
UsedLibraryUrn="urn:adsk.eagle:library:198"
UsedLibraryUrn="urn:adsk.eagle:library:199"
UsedLibrary="C:/Users/Justin/Documents/EAGLE/libraries/E14_Arduino_revC.lbr"
UsedLibrary="C:/Users/Justin/Documents/EAGLE/libraries/HC-05.lbr"
UsedLibrary="C:/Users/Justin/Documents/EAGLE/libraries/SamacSys_Parts.lbr"
UsedLibrary="C:/Users/Justin/Documents/EAGLE/libraries/diy-modules.lbr"
UsedLibrary="C:/Users/Justin/Documents/EAGLE/libraries/pal.lbr"
UsedLibrary="Part Libraries/ATMEGA32U4-AUR.lbr"
UsedLibrary="Part Libraries/XC6219A332MR-G.lbr"
UsedLibrary="Part Libraries/47219-2001.lbr"
UsedLibrary="Part Libraries/UP2-AH-1-TH.lbr"
UsedLibrary="Part Libraries/10129383-906001ALF.lbr"
[Win_1]
Type="Control Panel"
Number=0
[Win_2]
Type="Schematic Editor"
Number=1
File="BadUSB.sch"
View="53.1531 18.4845 181.564 101.034"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524 0.254"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6"
ViaDiameters=" 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.3 0"
ViaDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
HoleDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
PolygonIsolates=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
DimensionWidths=" 0 0.127 0.254 0.1 0.26 0.13"
DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0"
DimensionExtLengths=" 1.27 2.54 1 2 3 0"
DimensionExtOffsets=" 1.27 2.54 1 2 3 0"
SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
WireBend=0
WireBendSet=31
WireCap=1
MiterStyle=1
PadShape=0
ViaShape=1
PolygonPour=0
PolygonRank=0
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
DimensionUnit=1
DimensionPrecision=2
DimensionShowUnit=0
PinDirection=3
PinFunction=0
PinLength=2
PinVisible=3
SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=94
Views=" 1: -23.8542 -9.73763 359.579 236.755 2: 53.1531 18.4845 181.564 101.034"
Sheet="2"
[Desktop]
Screen="3440 1440"
Window="Win_1"
Window="Win_2"

119
README.md
View File

@ -1 +1,118 @@
# Bad_USB
# BAD USB <img align="right" src="https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/logo.jpg?raw=true">
### Project: Arduino Based Malacious USB <img alt="" align="right" src="https://img.shields.io/badge/Status-Prototype%20Phase-informational?style=flat&logoColor=white&color=73398D" />
<!-- Repo Cover Image -->
<p style="background-color:rgba(22,22,22,1.00)" align="center">
<img align="center" src="https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/background.jpg?raw=true" />
</p>
<!-- Repo Stats -->
<img align="center" src="https://img.shields.io/github/commit-activity/m/CrashOverrideProductions/Tools"> <img align="center" src="https://img.shields.io/github/last-commit/CrashOverrideProductions/Tools"> <img align="center" src="https://img.shields.io/github/languages/code-size/CrashOverrideProductions/Tools"> <img align="center" src="https://img.shields.io/github/directory-file-count/CrashOverrideProductions/Tools">
### Details
The BadUSB is intended to be a budget alternative to the current offering of Keystroke Injection tools available on the market.
### What is a Keystroke Injection Attack?
A Keystroke Injection Attack Tool is a specially designed USB device, often disguised as a thumb drive, that automatically runs code on any host computer into which it is plugged. It does so by appearing to the computer as a USB HID ('Human Interface Device') keyboard and/or mouse, and then “typing” in keyboard shortcuts and commands.
This can be a vector for malicious code, and is potentially dangerous and destructive! This project aims to educate you and your “victim” on the dangers of these devices. Nothing is quite so memorable a lesson in security as plugging in an innocent looking device and being met with a flurry of terminal windows and text popping up, and receiving an automatically deployed desktop background that says “You just go PWND, be more careful next time!"
---
<!-- To Do List -->
### To Do List
- [x] Complete Readme.md
- [x] Build & Test Prototype
- [x] Design Schematic
- [x] Finalise Software
- [x] Design Board
- [ ] Order Prototype PCBs
- [ ] Design 3D Print Shell
- [ ] Research Injection Moulded Shell
---
### Prototype PCB Design
<img align="center" src="https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/BadUSB-TOP.png?raw=true" /> <img align="center" src="https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/BadUSB-Bottom.png?raw=true" />
##### BOM
| Part# | Part | Mouser Part# | Qty | Price | Total |
| ----- | ----------------------------------------------------------------- | ------------------ | :-: | :-----: | ------: |
| C1 | Multilayer Ceramic Capacitors MLCC - SMD/SMT 16V 1uF X7R 0603 10% | 80-C0603C105K4R | 1 | $0.1350 | $0.1350 |
| C2,C3 | Multilayer Ceramic Capacitors MLCC - SMD/SMT 10V 10uF 0603 10% | 791-0603X106K100CT | 2 | $0.1490 | $0.2980 |
| IC1 | 8-bit Microcontrollers - MCU AVR USB 32K FLASH INDUSTRIAL | 556-ATMEGA32U4-AU | 1 | $5.9500 | $5.9500 |
| IC2 | LDO Voltage Regulators 300mA High Speed Votage Regulator | 865-XC6219A332MR-G | 1 | $0.9450 | $0.9450 |
| J2 | USB Connectors USB 2.0 type A plug 4 pin Horizontal TH | 490-UP2-AH-1-TH | 1 | $0.7970 | $0.7970 |
| J4 | Headers & Wire Housings Micro Low Profile Header Strips | 200-FTS10301LDVTR | 1 | $2.1600 | $2.1600 |
| MICRO-SD| Memory Card Connectors TFR READER (HINGE TYPE) | 538-47219-2001 | 1 |$1.9400 |$1.9400 |
| R1,R2 |Thin Film Resistors - SMD 0603 50ppm 22Ohm | 603-RT0603DRE0722RL| 2 |$0.1760 |$0.3520 |
| | | TOTAL AUD | | |$12.5770 |
---
### Arduino Leonardo Prototype Details
##### Hardware
| Part Number | Item | Qty | Price AUD$ |
| ------------ | ---------------------------------------------------------- | :----: | ---------: |
| A000057 | AVR Arduino Leonardo with Headers | 1 | $26.73 |
| DEV-12761 | Memory IC Development Tools microSD Shield Shield | 1 | $21.53 |
##### Software
The software for this project is a modified version of the Malduino Elite firmware developed by [Seytonic](https://github.com/Seytonic "Seytonic") released under the MIT Licence.
##### Hardware Configuration
| Signal | Uno Pin | Leonardo Pin |
| -------- | :-----: | :----------: |
|SD Select | D10 | D10 |
|MISO | D12 | ICSP MISO |
|MOSI | D11 | ICSP MOSI |
|SCK | D13 | ICSP SCK |
| Notes |
| ------------ |
| Arduino Leonardo does not map SPI pins to D11/D12/D13 like the uno therefore some jumper wires are required |
---
### Proof of Concept
Images / Screenshots, etc
##### Images
![](https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/prototype.jpg?raw=true)
##### Screenshots
![](https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/test1.jpg?raw=true)
![](https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/test2.jpg?raw=true)
##### Sample Ducky Script
- Spoiler Alert - This is the Rick Roll Script
DELAY 400
GUI r
DELAY 250
STRING https://www.youtube.com/watch?v=dQw4w9WgXcQ
ENTER
DELAY 3000
STRING f
<!-- Licencing Always at the Bottom -->
------------
### Licencing <img alt="" align="right" src="https://img.shields.io/badge/Licence-CC--BY--NC--SA--4.0-informational?style=flat&logo=Creative%20Commons&logoColor=white&color=EF9421" />
**Creative Commons: Attribution - NonCommercial - ShareAlike 4.0 International (CC BY-NC-SA 4.0)**
**You are free to:**
**Share** — copy and redistribute the material in any medium or format
**Adapt** — remix, transform, and build upon the material
**Under the following terms:**
**Attribution** — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
**NonCommercial** — You may not use the material for commercial purposes.
**ShareAlike** — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

View File

@ -0,0 +1,342 @@
// |------------------------------- HEADER ---------------------------------------------------------------------------------------------------------|
// APPLICATION: MALDUINO ELITE - FIRMWARE
// AUTHOR: SEYTONIC, SPACEHUNN
// MODIFIED BY: JUSTIN BLAND
// PURPOSE OF MOD: MINOR ALTERATIONS TO SUIT CRASHOVERRIDE BAD_USB
// DATE: 09/12/2020
// AUDIT DATE: 10/12/2020
// STATUS: CODE REVIEW
//
// LICENCE: MIT LICENCE
//
// DESIGNED MCU: TEST - ARDUINO LEONARDO R3 (ATMEGA32U4) | PRODUCTION - ATMEGA32U4
//
// REVISIONS:
// 09/12/2020 IMPORT MALDUINO ELITE SOURCE FROM SEYTONIC'S GITHUB REPOSITORY
// 09/12/2020 ADD HEADER & LICENCE DETAILS
// 09/12/2020 REMOVE DIP SWTICH | FILENAME = "ducky.txt"
// 10/12/2020 REMOVE LED | ADD TEST PINOUT + TEST SUCCESSFUL
// 28/10/2020 ADD VID/PID HELPFUL INFO
// |------------------------------- LICENCE INFO ---------------------------------------------------------------------------------------------------|
/*
Copyright 2017 Seytonic, Spacehuhn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
// |------------------------------- HELPFUL INFO ---------------------------------------------------------------------------------------------------|
// ARDUINO LEONARDO DOES NOT MAP SPI PINS TO D11 / D12 / D13
//
// LEONARDO R3 PIN CONFIGURATION
// |-----SIGNAL-----|--UNO--|--LEONARDO--|
// SD Card Select D10 D10
// MISO D11 ICSP MISO
// MOSI D12 ISCP MOSI
// SCK D13 ISCP SCK
// VENDOR AND DEVICE IDS FOR COMMON HID DEVICES
// |--MANUFACTURER--|--------------DESCRIPTION--------------|--VENDOR ID--|--DEVICE ID--|
// APPLE MAGIC KEYBOARD A1644 05AC 0267
// APPLE MAGIC MOUSE A1269 05AC 030D
// MICROSOFT SURFACE KEYBAORD 045E 07CD
// MICROSOFT WIRED KEYBAORD 400 045E 0752
// MICROSOFT CLASSIC INTELLIMOUSE 045E 0823
//
// |------------------------------- DEFINITIONS ----------------------------------------------------------------------------------------------------|
#include <SPI.h>
#include <SD.h>
#include <Mouse.h>
#include <Keyboard.h>
//#define debug true // <-- uncomment to turn serial output on
#define CSpin 10 //Chip-Select of the SD-Card reader
#define blinkInterval 50
#define buffersize 256
#define KEYPAD_0 234
#define KEYPAD_1 225
#define KEYPAD_2 226
#define KEYPAD_3 227
#define KEYPAD_4 228
#define KEYPAD_5 229
#define KEYPAD_6 230
#define KEYPAD_7 231
#define KEYPAD_8 232
#define KEYPAD_9 233
#define KEYPAD_ASTERIX 221
#define KEYPAD_ENTER 224
#define KEYPAD_MINUS 222
#define KEYPAD_PERIOD 235
#define KEYPAD_PLUS 223
#define KEYPAD_SLASH 220
#define PRINTSCREEN 206
File payload;
char* buf = malloc(sizeof(char) * buffersize);
char* repeatBuffer = malloc(sizeof(char) * 12);
int bufSize = 0;
int defaultDelay = 5;
int defaultCharDelay = 5;
int rMin = -100;
int rMax = 100;
int getSpace(int start, int end) {
for (int i = start; i < end; i++) {
if (buf[i] == ' ') return i;
}
return -1;
}
bool equals(char* strA, int start, int end, char* strB, int strLen) {
if (end - start != strLen) return false;
for (int i = 0; i < strLen; i++) {
if (strA[start + i] != strB[i]) return false;
}
return true;
}
int toPositive(int num) {
if (num < 0) return num * (-1);
else return num;
}
bool equalsBuffer(int start, int end, char* str) { return equals(buf, start, end, str, String(str).length()); }
int getInt(char* str, int pos) {
if (equals(str, pos + 1, pos + 7, "RANDOM", 6)) {
return random(rMin, rMax);
}
else {
return String(str).substring(pos + 1, pos + 6).toInt();
}
}
void KeyboardWrite(uint8_t c) {
Keyboard.press(c);
delay(defaultCharDelay);
Keyboard.release(c);
}
void runLine() {
#ifdef debug
Serial.println("run: '" + String(buf).substring(0, bufSize) + "' (" + (String)bufSize + ")");
#endif
int space = getSpace(0, bufSize);
if (space == -1) runCommand(0, bufSize);
else {
if (equalsBuffer(0, space, "DEFAULTDELAY") || equalsBuffer(0, space, "DEFAULT_DELAY")) defaultDelay = getInt(buf, space);
else if (equalsBuffer(0, space, "DEFAULTCHARDELAY") || equalsBuffer(0, space, "DEFAULT_CHAR_DELAY")) defaultCharDelay = getInt(buf, space);
else if (equalsBuffer(0, space, "DELAY")) delay(getInt(buf, space));
else if (equalsBuffer(0, space, "STRING")) {
for (int i = space + 1; i < bufSize; i++) KeyboardWrite(buf[i]);
}
else if (equalsBuffer(0, space, "MOUSE")) {
int nSpace = getSpace(space + 1, bufSize);
int x = getInt(buf, space);
int y = getInt(buf, nSpace);
Mouse.move(x, y);
#ifdef debug
Serial.println("Move mouse " + (String)x + " " + (String)y);
#endif
}
else if (equalsBuffer(0, space, "SCROLL")) Mouse.move(0, 0, getInt(buf, space));
else if (equalsBuffer(0, space, "RANDOMMIN")) rMin = getInt(buf, space);
else if (equalsBuffer(0, space, "RANDOMMAX")) rMax = getInt(buf, space);
else if (equalsBuffer(0, space, "REM") || equalsBuffer(0, space, "REPEAT")) {}
else {
runCommand(0, space);
while (space >= 0 && space < bufSize) {
int nSpace = getSpace(space + 1, bufSize);
if (nSpace == -1) nSpace = bufSize;
runCommand(space + 1, nSpace);
space = nSpace;
}
}
}
Keyboard.releaseAll();
delay(defaultDelay);
}
void runCommand(int s, int e) {
#ifdef debug
Serial.println("Press '" + String(buf).substring(s, e) + "'");
#endif
if (e - s < 2) Keyboard.press(buf[s]);
else if (equalsBuffer(s, e, "ENTER")) Keyboard.press(KEY_RETURN);
else if (equalsBuffer(s, e, "GUI") || equalsBuffer(s, e, "WINDOWS")) Keyboard.press(KEY_LEFT_GUI);
else if (equalsBuffer(s, e, "SHIFT")) Keyboard.press(KEY_LEFT_SHIFT);
else if (equalsBuffer(s, e, "ALT") || equalsBuffer(s, e, "ALT_LEFT") || equalsBuffer(s, e, "ALTLEFT")) Keyboard.press(KEY_LEFT_ALT);
else if (equalsBuffer(s, e, "ALT_RIGHT") || equalsBuffer(s, e, "ALTRIGHT")) Keyboard.press(KEY_RIGHT_ALT);
else if (equalsBuffer(s, e, "CTRL") || equalsBuffer(s, e, "CONTROL")) Keyboard.press(KEY_LEFT_CTRL);
else if (equalsBuffer(s, e, "CAPSLOCK")) Keyboard.press(KEY_CAPS_LOCK);
else if (equalsBuffer(s, e, "DELETE")) Keyboard.press(KEY_DELETE);
else if (equalsBuffer(s, e, "END")) Keyboard.press(KEY_END);
else if (equalsBuffer(s, e, "ESC") || equalsBuffer(s, e, "ESCAPE")) Keyboard.press(KEY_ESC);
else if (equalsBuffer(s, e, "HOME")) Keyboard.press(KEY_HOME);
else if (equalsBuffer(s, e, "INSERT")) Keyboard.press(KEY_INSERT);
else if (equalsBuffer(s, e, "PAGEUP")) Keyboard.press(KEY_PAGE_UP);
else if (equalsBuffer(s, e, "PAGEDOWN")) Keyboard.press(KEY_PAGE_DOWN);
else if (equalsBuffer(s, e, "SPACE")) Keyboard.press(' ');
else if (equalsBuffer(s, e, "TAB")) Keyboard.press(KEY_TAB);
else if (equalsBuffer(s, e, "BACKSPACE")) Keyboard.press(KEY_BACKSPACE);
else if (equalsBuffer(s, e, "UP") || equalsBuffer(s, e, "UPARROW")) Keyboard.press(KEY_UP_ARROW);
else if (equalsBuffer(s, e, "DOWN") || equalsBuffer(s, e, "DOWNARROW")) Keyboard.press(KEY_DOWN_ARROW);
else if (equalsBuffer(s, e, "LEFT") || equalsBuffer(s, e, "LEFTARROW")) Keyboard.press(KEY_LEFT_ARROW);
else if (equalsBuffer(s, e, "RIGHT") || equalsBuffer(s, e, "RIGHTARROW")) Keyboard.press(KEY_RIGHT_ARROW);
else if (equalsBuffer(s, e, "PRINTSCREEN")) Keyboard.press(PRINTSCREEN);
else if (equalsBuffer(s, e, "F1")) Keyboard.press(KEY_F1);
else if (equalsBuffer(s, e, "F2")) Keyboard.press(KEY_F2);
else if (equalsBuffer(s, e, "F3")) Keyboard.press(KEY_F3);
else if (equalsBuffer(s, e, "F4")) Keyboard.press(KEY_F4);
else if (equalsBuffer(s, e, "F5")) Keyboard.press(KEY_F5);
else if (equalsBuffer(s, e, "F6")) Keyboard.press(KEY_F6);
else if (equalsBuffer(s, e, "F7")) Keyboard.press(KEY_F7);
else if (equalsBuffer(s, e, "F8")) Keyboard.press(KEY_F8);
else if (equalsBuffer(s, e, "F9")) Keyboard.press(KEY_F9);
else if (equalsBuffer(s, e, "F10")) Keyboard.press(KEY_F10);
else if (equalsBuffer(s, e, "F11")) Keyboard.press(KEY_F11);
else if (equalsBuffer(s, e, "F12")) Keyboard.press(KEY_F12);
else if (equalsBuffer(s, e, "NUM_0")) KeyboardWrite(KEYPAD_0);
else if (equalsBuffer(s, e, "NUM_1")) KeyboardWrite(KEYPAD_1);
else if (equalsBuffer(s, e, "NUM_2")) KeyboardWrite(KEYPAD_2);
else if (equalsBuffer(s, e, "NUM_3")) KeyboardWrite(KEYPAD_3);
else if (equalsBuffer(s, e, "NUM_4")) KeyboardWrite(KEYPAD_4);
else if (equalsBuffer(s, e, "NUM_5")) KeyboardWrite(KEYPAD_5);
else if (equalsBuffer(s, e, "NUM_6")) KeyboardWrite(KEYPAD_6);
else if (equalsBuffer(s, e, "NUM_7")) KeyboardWrite(KEYPAD_7);
else if (equalsBuffer(s, e, "NUM_8")) KeyboardWrite(KEYPAD_8);
else if (equalsBuffer(s, e, "NUM_9")) KeyboardWrite(KEYPAD_9);
else if (equalsBuffer(s, e, "NUM_ASTERIX")) KeyboardWrite(KEYPAD_ASTERIX);
else if (equalsBuffer(s, e, "NUM_ENTER")) KeyboardWrite(KEYPAD_ENTER);
else if (equalsBuffer(s, e, "NUM_Minus")) KeyboardWrite(KEYPAD_MINUS);
else if (equalsBuffer(s, e, "NUM_PERIOD")) KeyboardWrite(KEYPAD_PERIOD);
else if (equalsBuffer(s, e, "NUM_PLUS")) KeyboardWrite(KEYPAD_PLUS);
else if (equalsBuffer(s, e, "CLICK") || equalsBuffer(s, e, "CLICK_LEFT") || equalsBuffer(s, e, "MOUSECLICK")) Mouse.click();
else if (equalsBuffer(s, e, "CLICK_RIGHT")) Mouse.click(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "CLICK_MIDDLE")) Mouse.click(MOUSE_MIDDLE);
else if (equalsBuffer(s, e, "PRESS") || equalsBuffer(s, e, "PRESS_LEFT")) Mouse.press();
else if (equalsBuffer(s, e, "PRESS_LEFT")) Mouse.press(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "PRESS_MIDDLE")) Mouse.press(MOUSE_MIDDLE);
else if (equalsBuffer(s, e, "RELEASE") || equalsBuffer(s, e, "RELEASE_LEFT")) Mouse.release();
else if (equalsBuffer(s, e, "RELEASE_LEFT")) Mouse.release(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "RELEASE_MIDDLE")) Mouse.release(MOUSE_MIDDLE);
#ifdef debug
else Serial.println("failed to find command");
#endif
/* not implemented
else if(equalsBuffer(s,e,"APP")) Keyboard.press();
else if(equalsBuffer(s,e,"MENU")) Keyboard.press();
else if(equalsBuffer(s,e,"BREAK") || equalsBuffer(s,e,"PAUSE",5)) Keyboard.press();
else if(equalsBuffer(s,e,"NUMLOCK")) Keyboard.press();
else if(equalsBuffer(s,e,"SCROLLLOCK")) Keyboard.press();
*/
}
void setup() {
#ifdef debug
Serial.begin(115200);
delay(2000);
Serial.println("Started!");
#endif
randomSeed(analogRead(0));
String scriptName = "ducky.txt"; // Name of the file that will be opened
if (!SD.begin(CSpin)) {
#ifdef debug
Serial.println("couldn't access sd-card :(");
#endif
return;
}
payload = SD.open(scriptName);
if (!payload) {
#ifdef debug
Serial.println("couldn't find script: '" + String(scriptName) + "'");
#endif
return;
}
else {
Keyboard.begin();
Mouse.begin();
while (payload.available()) {
buf[bufSize] = payload.read();
if (buf[bufSize] == '\r' || buf[bufSize] == '\n' || bufSize >= buffersize) {
if (buf[bufSize] == '\r' && payload.peek() == '\n') payload.read();
//---------REPEAT---------
int repeatBufferSize = 0;
int repeats = 0;
unsigned long payloadPosition = payload.position();
for (int i = 0; i < 12; i++) {
if (payload.available()) {
repeatBuffer[repeatBufferSize] = payload.read();
repeatBufferSize++;
}
else break;
}
if (repeatBufferSize > 6) {
if (equals(repeatBuffer, 0, 6, "REPEAT", 6)) {
repeats = getInt(repeatBuffer, 6);
}
}
for (int i = 0; i < repeats; i++) runLine();
payload.seek(payloadPosition);
//------------------------
runLine();
bufSize = 0;
}
else bufSize++;
}
if (bufSize > 0) {
runLine();
bufSize = 0;
}
payload.close();
Mouse.end();
Keyboard.end();
}
}
void loop() {
}

View File

@ -0,0 +1,21 @@
#######################################
# Syntax Coloring Map HID
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
HID KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
begin KEYWORD2
SendReport KEYWORD2
AppendDescriptor KEYWORD2
#######################################
# Constants (LITERAL1)
#######################################
HID_TX LITERAL1

View File

@ -0,0 +1,9 @@
name=HID
version=1.0
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Module for PluggableUSB infrastructure. Exposes an API for devices like Keyboards, Mice and Gamepads.
paragraph=
category=Communication
url=http://www.arduino.cc/en/Reference/HID
architectures=avr

View File

@ -0,0 +1,162 @@
/*
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*/
#include "HID.h"
#if defined(USBCON)
HID_& HID()
{
static HID_ obj;
return obj;
}
int HID_::getInterface(uint8_t* interfaceCount)
{
*interfaceCount += 1; // uses 1
HIDDescriptor hidInterface = {
D_INTERFACE(pluggedInterface, 1, USB_DEVICE_CLASS_HUMAN_INTERFACE, HID_SUBCLASS_NONE, HID_PROTOCOL_NONE),
D_HIDREPORT(descriptorSize),
D_ENDPOINT(USB_ENDPOINT_IN(pluggedEndpoint), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01)
};
return USB_SendControl(0, &hidInterface, sizeof(hidInterface));
}
int HID_::getDescriptor(USBSetup& setup)
{
// Check if this is a HID Class Descriptor request
if (setup.bmRequestType != REQUEST_DEVICETOHOST_STANDARD_INTERFACE) { return 0; }
if (setup.wValueH != HID_REPORT_DESCRIPTOR_TYPE) { return 0; }
// In a HID Class Descriptor wIndex cointains the interface number
if (setup.wIndex != pluggedInterface) { return 0; }
int total = 0;
HIDSubDescriptor* node;
for (node = rootNode; node; node = node->next) {
int res = USB_SendControl(TRANSFER_PGM, node->data, node->length);
if (res == -1)
return -1;
total += res;
}
// Reset the protocol on reenumeration. Normally the host should not assume the state of the protocol
// due to the USB specs, but Windows and Linux just assumes its in report mode.
protocol = HID_REPORT_PROTOCOL;
return total;
}
uint8_t HID_::getShortName(char *name)
{
name[0] = 'H';
name[1] = 'I';
name[2] = 'D';
name[3] = 'A' + (descriptorSize & 0x0F);
name[4] = 'A' + ((descriptorSize >> 4) & 0x0F);
return 5;
}
void HID_::AppendDescriptor(HIDSubDescriptor *node)
{
if (!rootNode) {
rootNode = node;
} else {
HIDSubDescriptor *current = rootNode;
while (current->next) {
current = current->next;
}
current->next = node;
}
descriptorSize += node->length;
}
int HID_::SendReport(uint8_t id, const void* data, int len)
{
auto ret = USB_Send(pluggedEndpoint, &id, 1);
if (ret < 0) return ret;
auto ret2 = USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, len);
if (ret2 < 0) return ret2;
return ret + ret2;
}
bool HID_::setup(USBSetup& setup)
{
if (pluggedInterface != setup.wIndex) {
return false;
}
uint8_t request = setup.bRequest;
uint8_t requestType = setup.bmRequestType;
if (requestType == REQUEST_DEVICETOHOST_CLASS_INTERFACE)
{
if (request == HID_GET_REPORT) {
// TODO: HID_GetReport();
return true;
}
if (request == HID_GET_PROTOCOL) {
// TODO: Send8(protocol);
return true;
}
if (request == HID_GET_IDLE) {
// TODO: Send8(idle);
}
}
if (requestType == REQUEST_HOSTTODEVICE_CLASS_INTERFACE)
{
if (request == HID_SET_PROTOCOL) {
// The USB Host tells us if we are in boot or report mode.
// This only works with a real boot compatible device.
protocol = setup.wValueL;
return true;
}
if (request == HID_SET_IDLE) {
idle = setup.wValueL;
return true;
}
if (request == HID_SET_REPORT)
{
//uint8_t reportID = setup.wValueL;
//uint16_t length = setup.wLength;
//uint8_t data[length];
// Make sure to not read more data than USB_EP_SIZE.
// You can read multiple times through a loop.
// The first byte (may!) contain the reportID on a multreport.
//USB_RecvControl(data, length);
}
}
return false;
}
HID_::HID_(void) : PluggableUSBModule(1, 1, epType),
rootNode(NULL), descriptorSize(0),
protocol(HID_REPORT_PROTOCOL), idle(1)
{
epType[0] = EP_TYPE_INTERRUPT_IN;
PluggableUSB().plug(this);
}
int HID_::begin(void)
{
return 0;
}
#endif /* if defined(USBCON) */

View File

@ -0,0 +1,125 @@
/*
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*/
#ifndef HID_h
#define HID_h
#include <stdint.h>
#include <Arduino.h>
#include "PluggableUSB.h"
#if defined(USBCON)
#define _USING_HID
// HID 'Driver'
// ------------
#define HID_GET_REPORT 0x01
#define HID_GET_IDLE 0x02
#define HID_GET_PROTOCOL 0x03
#define HID_SET_REPORT 0x09
#define HID_SET_IDLE 0x0A
#define HID_SET_PROTOCOL 0x0B
#define HID_HID_DESCRIPTOR_TYPE 0x21
#define HID_REPORT_DESCRIPTOR_TYPE 0x22
#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
// HID subclass HID1.11 Page 8 4.2 Subclass
#define HID_SUBCLASS_NONE 0
#define HID_SUBCLASS_BOOT_INTERFACE 1
// HID Keyboard/Mouse bios compatible protocols HID1.11 Page 9 4.3 Protocols
#define HID_PROTOCOL_NONE 0
#define HID_PROTOCOL_KEYBOARD 1
#define HID_PROTOCOL_MOUSE 2
// Normal or bios protocol (Keyboard/Mouse) HID1.11 Page 54 7.2.5 Get_Protocol Request
// "protocol" variable is used for this purpose.
#define HID_BOOT_PROTOCOL 0
#define HID_REPORT_PROTOCOL 1
// HID Request Type HID1.11 Page 51 7.2.1 Get_Report Request
#define HID_REPORT_TYPE_INPUT 1
#define HID_REPORT_TYPE_OUTPUT 2
#define HID_REPORT_TYPE_FEATURE 3
typedef struct
{
uint8_t len; // 9
uint8_t dtype; // 0x21
uint8_t addr;
uint8_t versionL; // 0x101
uint8_t versionH; // 0x101
uint8_t country;
uint8_t desctype; // 0x22 report
uint8_t descLenL;
uint8_t descLenH;
} HIDDescDescriptor;
typedef struct
{
InterfaceDescriptor hid;
HIDDescDescriptor desc;
EndpointDescriptor in;
} HIDDescriptor;
class HIDSubDescriptor {
public:
HIDSubDescriptor *next = NULL;
HIDSubDescriptor(const void *d, const uint16_t l) : data(d), length(l) { }
const void* data;
const uint16_t length;
};
class HID_ : public PluggableUSBModule
{
public:
HID_(void);
int begin(void);
int SendReport(uint8_t id, const void* data, int len);
void AppendDescriptor(HIDSubDescriptor* node);
protected:
// Implementation of the PluggableUSBModule
int getInterface(uint8_t* interfaceCount);
int getDescriptor(USBSetup& setup);
bool setup(USBSetup& setup);
uint8_t getShortName(char* name);
private:
uint8_t epType[1];
HIDSubDescriptor* rootNode;
uint16_t descriptorSize;
uint8_t protocol;
uint8_t idle;
};
// Replacement for global singleton.
// This function prevents static-initialization-order-fiasco
// https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
HID_& HID();
#define D_HIDREPORT(length) { 9, 0x21, 0x01, 0x01, 0, 1, 0x22, lowByte(length), highByte(length) }
#endif // USBCON
#endif // HID_h

View File

@ -0,0 +1,24 @@
= Keyboard Library for Arduino =
This library allows an Arduino board with USB capabilities to act as a Keyboard.
For more information about this library please visit us at
https://www.arduino.cc/reference/en/language/functions/usb/keyboard/
== License ==
Copyright (c) Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

View File

@ -0,0 +1,24 @@
#######################################
# Syntax Coloring Map For Keyboard
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
Keyboard KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
begin KEYWORD2
write KEYWORD2
press KEYWORD2
release KEYWORD2
releaseAll KEYWORD2
#######################################
# Constants (LITERAL1)
#######################################

View File

@ -0,0 +1,9 @@
name=Keyboard
version=1.0.2
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Allows an Arduino/Genuino board with USB capabilites to act as a Keyboard.
paragraph=This library plugs on the HID library. It can be used with or without other HID-based libraries (Mouse, Gamepad etc)
category=Device Control
url=http://www.arduino.cc/en/Reference/Keyboard
architectures=*

View File

@ -0,0 +1,338 @@
/*
Keyboard.cpp
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "Keyboard.h"
#if defined(_USING_HID)
//================================================================================
//================================================================================
// Keyboard
static const uint8_t _hidReportDescriptor[] PROGMEM = {
// Keyboard
0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 47
0x09, 0x06, // USAGE (Keyboard)
0xa1, 0x01, // COLLECTION (Application)
0x85, 0x02, // REPORT_ID (2)
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x08, // REPORT_COUNT (8)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x08, // REPORT_SIZE (8)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x95, 0x06, // REPORT_COUNT (6)
0x75, 0x08, // REPORT_SIZE (8)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x73, // LOGICAL_MAXIMUM (115)
0x05, 0x07, // USAGE_PAGE (Keyboard)
0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))
0x29, 0x73, // USAGE_MAXIMUM (Keyboard Application)
0x81, 0x00, // INPUT (Data,Ary,Abs)
0xc0, // END_COLLECTION
};
Keyboard_::Keyboard_(void)
{
static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
HID().AppendDescriptor(&node);
}
void Keyboard_::begin(void)
{
}
void Keyboard_::end(void)
{
}
void Keyboard_::sendReport(KeyReport* keys)
{
HID().SendReport(2,keys,sizeof(KeyReport));
}
extern
const uint8_t _asciimap[128] PROGMEM;
#define SHIFT 0x80
const uint8_t _asciimap[128] =
{
0x00, // NUL
0x00, // SOH
0x00, // STX
0x00, // ETX
0x00, // EOT
0x00, // ENQ
0x00, // ACK
0x00, // BEL
0x2a, // BS Backspace
0x2b, // TAB Tab
0x28, // LF Enter
0x00, // VT
0x00, // FF
0x00, // CR
0x00, // SO
0x00, // SI
0x00, // DEL
0x00, // DC1
0x00, // DC2
0x00, // DC3
0x00, // DC4
0x00, // NAK
0x00, // SYN
0x00, // ETB
0x00, // CAN
0x00, // EM
0x00, // SUB
0x00, // ESC
0x00, // FS
0x00, // GS
0x00, // RS
0x00, // US
0x2c, // ' '
0x1e|SHIFT, // !
0x34|SHIFT, // "
0x20|SHIFT, // #
0x21|SHIFT, // $
0x22|SHIFT, // %
0x24|SHIFT, // &
0x34, // '
0x26|SHIFT, // (
0x27|SHIFT, // )
0x25|SHIFT, // *
0x2e|SHIFT, // +
0x36, // ,
0x2d, // -
0x37, // .
0x38, // /
0x27, // 0
0x1e, // 1
0x1f, // 2
0x20, // 3
0x21, // 4
0x22, // 5
0x23, // 6
0x24, // 7
0x25, // 8
0x26, // 9
0x33|SHIFT, // :
0x33, // ;
0x36|SHIFT, // <
0x2e, // =
0x37|SHIFT, // >
0x38|SHIFT, // ?
0x1f|SHIFT, // @
0x04|SHIFT, // A
0x05|SHIFT, // B
0x06|SHIFT, // C
0x07|SHIFT, // D
0x08|SHIFT, // E
0x09|SHIFT, // F
0x0a|SHIFT, // G
0x0b|SHIFT, // H
0x0c|SHIFT, // I
0x0d|SHIFT, // J
0x0e|SHIFT, // K
0x0f|SHIFT, // L
0x10|SHIFT, // M
0x11|SHIFT, // N
0x12|SHIFT, // O
0x13|SHIFT, // P
0x14|SHIFT, // Q
0x15|SHIFT, // R
0x16|SHIFT, // S
0x17|SHIFT, // T
0x18|SHIFT, // U
0x19|SHIFT, // V
0x1a|SHIFT, // W
0x1b|SHIFT, // X
0x1c|SHIFT, // Y
0x1d|SHIFT, // Z
0x2f, // [
0x31, // bslash
0x30, // ]
0x23|SHIFT, // ^
0x2d|SHIFT, // _
0x35, // `
0x04, // a
0x05, // b
0x06, // c
0x07, // d
0x08, // e
0x09, // f
0x0a, // g
0x0b, // h
0x0c, // i
0x0d, // j
0x0e, // k
0x0f, // l
0x10, // m
0x11, // n
0x12, // o
0x13, // p
0x14, // q
0x15, // r
0x16, // s
0x17, // t
0x18, // u
0x19, // v
0x1a, // w
0x1b, // x
0x1c, // y
0x1d, // z
0x2f|SHIFT, // {
0x31|SHIFT, // |
0x30|SHIFT, // }
0x35|SHIFT, // ~
0 // DEL
};
uint8_t USBPutChar(uint8_t c);
// press() adds the specified key (printing, non-printing, or modifier)
// to the persistent key report and sends the report. Because of the way
// USB HID works, the host acts like the key remains pressed until we
// call release(), releaseAll(), or otherwise clear the report and resend.
size_t Keyboard_::press(uint8_t k)
{
uint8_t i;
if (k >= 136) { // it's a non-printing key (not a modifier)
k = k - 136;
} else if (k >= 128) { // it's a modifier key
_keyReport.modifiers |= (1<<(k-128));
k = 0;
} else { // it's a printing key
k = pgm_read_byte(_asciimap + k);
if (!k) {
setWriteError();
return 0;
}
if (k & 0x80) { // it's a capital letter or other character reached with shift
_keyReport.modifiers |= 0x02; // the left shift modifier
k &= 0x7F;
}
}
// Add k to the key report only if it's not already present
// and if there is an empty slot.
if (_keyReport.keys[0] != k && _keyReport.keys[1] != k &&
_keyReport.keys[2] != k && _keyReport.keys[3] != k &&
_keyReport.keys[4] != k && _keyReport.keys[5] != k) {
for (i=0; i<6; i++) {
if (_keyReport.keys[i] == 0x00) {
_keyReport.keys[i] = k;
break;
}
}
if (i == 6) {
setWriteError();
return 0;
}
}
sendReport(&_keyReport);
return 1;
}
// release() takes the specified key out of the persistent key report and
// sends the report. This tells the OS the key is no longer pressed and that
// it shouldn't be repeated any more.
size_t Keyboard_::release(uint8_t k)
{
uint8_t i;
if (k >= 136) { // it's a non-printing key (not a modifier)
k = k - 136;
} else if (k >= 128) { // it's a modifier key
_keyReport.modifiers &= ~(1<<(k-128));
k = 0;
} else { // it's a printing key
k = pgm_read_byte(_asciimap + k);
if (!k) {
return 0;
}
if (k & 0x80) { // it's a capital letter or other character reached with shift
_keyReport.modifiers &= ~(0x02); // the left shift modifier
k &= 0x7F;
}
}
// Test the key report to see if k is present. Clear it if it exists.
// Check all positions in case the key is present more than once (which it shouldn't be)
for (i=0; i<6; i++) {
if (0 != k && _keyReport.keys[i] == k) {
_keyReport.keys[i] = 0x00;
}
}
sendReport(&_keyReport);
return 1;
}
void Keyboard_::releaseAll(void)
{
_keyReport.keys[0] = 0;
_keyReport.keys[1] = 0;
_keyReport.keys[2] = 0;
_keyReport.keys[3] = 0;
_keyReport.keys[4] = 0;
_keyReport.keys[5] = 0;
_keyReport.modifiers = 0;
sendReport(&_keyReport);
}
size_t Keyboard_::write(uint8_t c)
{
uint8_t p = press(c); // Keydown
release(c); // Keyup
return p; // just return the result of press() since release() almost always returns 1
}
size_t Keyboard_::write(const uint8_t *buffer, size_t size) {
size_t n = 0;
while (size--) {
if (*buffer != '\r') {
if (write(*buffer)) {
n++;
} else {
break;
}
}
buffer++;
}
return n;
}
Keyboard_ Keyboard;
#endif

View File

@ -0,0 +1,114 @@
/*
Keyboard.h
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef KEYBOARD_h
#define KEYBOARD_h
#include "Dependancies\HID\src\HID.h">
#if !defined(_USING_HID)
#warning "Using legacy HID core (non pluggable)"
#else
//================================================================================
//================================================================================
// Keyboard
#define KEY_LEFT_CTRL 0x80
#define KEY_LEFT_SHIFT 0x81
#define KEY_LEFT_ALT 0x82
#define KEY_LEFT_GUI 0x83
#define KEY_RIGHT_CTRL 0x84
#define KEY_RIGHT_SHIFT 0x85
#define KEY_RIGHT_ALT 0x86
#define KEY_RIGHT_GUI 0x87
#define KEY_UP_ARROW 0xDA
#define KEY_DOWN_ARROW 0xD9
#define KEY_LEFT_ARROW 0xD8
#define KEY_RIGHT_ARROW 0xD7
#define KEY_BACKSPACE 0xB2
#define KEY_TAB 0xB3
#define KEY_RETURN 0xB0
#define KEY_ESC 0xB1
#define KEY_INSERT 0xD1
#define KEY_DELETE 0xD4
#define KEY_PAGE_UP 0xD3
#define KEY_PAGE_DOWN 0xD6
#define KEY_HOME 0xD2
#define KEY_END 0xD5
#define KEY_CAPS_LOCK 0xC1
#define KEY_F1 0xC2
#define KEY_F2 0xC3
#define KEY_F3 0xC4
#define KEY_F4 0xC5
#define KEY_F5 0xC6
#define KEY_F6 0xC7
#define KEY_F7 0xC8
#define KEY_F8 0xC9
#define KEY_F9 0xCA
#define KEY_F10 0xCB
#define KEY_F11 0xCC
#define KEY_F12 0xCD
#define KEY_F13 0xF0
#define KEY_F14 0xF1
#define KEY_F15 0xF2
#define KEY_F16 0xF3
#define KEY_F17 0xF4
#define KEY_F18 0xF5
#define KEY_F19 0xF6
#define KEY_F20 0xF7
#define KEY_F21 0xF8
#define KEY_F22 0xF9
#define KEY_F23 0xFA
#define KEY_F24 0xFB
// Low level key report: up to 6 keys and shift, ctrl etc at once
typedef struct
{
uint8_t modifiers;
uint8_t reserved;
uint8_t keys[6];
} KeyReport;
class Keyboard_ : public Print
{
private:
KeyReport _keyReport;
void sendReport(KeyReport* keys);
public:
Keyboard_(void);
void begin(void);
void end(void);
size_t write(uint8_t k);
size_t write(const uint8_t *buffer, size_t size);
size_t press(uint8_t k);
size_t release(uint8_t k);
void releaseAll(void);
};
extern Keyboard_ Keyboard;
#endif
#endif

View File

@ -0,0 +1,25 @@
= Mouse Library for Arduino =
This library allows an Arduino board with USB capabilites to act as a Mouse.
Being based on HID library you need to include "HID.h" in your sketch
For more information about this library please visit us at
http://www.arduino.cc/en/Reference/Mouse
== License ==
Copyright (c) Arduino LLC. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

View File

@ -0,0 +1,24 @@
#######################################
# Syntax Coloring Map For Keyboard
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
Mouse KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
begin KEYWORD2
click KEYWORD2
move KEYWORD2
press KEYWORD2
release KEYWORD2
isPressed KEYWORD2
#######################################
# Constants (LITERAL1)
#######################################

View File

@ -0,0 +1,9 @@
name=Mouse
version=1.0.1
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Allows an Arduino/Genuino board with USB capabilites to act as a Mouse.
paragraph=This library plugs on the HID library. Can be used with or without other HID-based libraries (Keyboard, Gamepad etc)
category=Device Control
url=http://www.arduino.cc/en/Reference/Mouse
architectures=*

View File

@ -0,0 +1,123 @@
/*
Mouse.cpp
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "Mouse.h"
#if defined(_USING_HID)
static const uint8_t _hidReportDescriptor[] PROGMEM = {
// Mouse
0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 54
0x09, 0x02, // USAGE (Mouse)
0xa1, 0x01, // COLLECTION (Application)
0x09, 0x01, // USAGE (Pointer)
0xa1, 0x00, // COLLECTION (Physical)
0x85, 0x01, // REPORT_ID (1)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x03, // USAGE_MAXIMUM (Button 3)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x95, 0x03, // REPORT_COUNT (3)
0x75, 0x01, // REPORT_SIZE (1)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x95, 0x01, // REPORT_COUNT (1)
0x75, 0x05, // REPORT_SIZE (5)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x09, 0x38, // USAGE (Wheel)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x03, // REPORT_COUNT (3)
0x81, 0x06, // INPUT (Data,Var,Rel)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
};
//================================================================================
//================================================================================
// Mouse
Mouse_::Mouse_(void) : _buttons(0)
{
static HIDSubDescriptor node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
HID().AppendDescriptor(&node);
}
void Mouse_::begin(void)
{
}
void Mouse_::end(void)
{
}
void Mouse_::click(uint8_t b)
{
_buttons = b;
move(0,0,0);
_buttons = 0;
move(0,0,0);
}
void Mouse_::move(signed char x, signed char y, signed char wheel)
{
uint8_t m[4];
m[0] = _buttons;
m[1] = x;
m[2] = y;
m[3] = wheel;
HID().SendReport(1,m,4);
}
void Mouse_::buttons(uint8_t b)
{
if (b != _buttons)
{
_buttons = b;
move(0,0,0);
}
}
void Mouse_::press(uint8_t b)
{
buttons(_buttons | b);
}
void Mouse_::release(uint8_t b)
{
buttons(_buttons & ~b);
}
bool Mouse_::isPressed(uint8_t b)
{
if ((b & _buttons) > 0)
return true;
return false;
}
Mouse_ Mouse;
#endif

View File

@ -0,0 +1,60 @@
/*
Mouse.h
Copyright (c) 2015, Arduino LLC
Original code (pre-library): Copyright (c) 2011, Peter Barrett
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MOUSE_h
#define MOUSE_h
#include "HID.h"
#if !defined(_USING_HID)
#warning "Using legacy HID core (non pluggable)"
#else
//================================================================================
//================================================================================
// Mouse
#define MOUSE_LEFT 1
#define MOUSE_RIGHT 2
#define MOUSE_MIDDLE 4
#define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE)
class Mouse_
{
private:
uint8_t _buttons;
void buttons(uint8_t b);
public:
Mouse_(void);
void begin(void);
void end(void);
void click(uint8_t b = MOUSE_LEFT);
void move(signed char x, signed char y, signed char wheel = 0);
void press(uint8_t b = MOUSE_LEFT); // press LEFT by default
void release(uint8_t b = MOUSE_LEFT); // release LEFT by default
bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default
};
extern Mouse_ Mouse;
#endif
#endif

5
Software/BadUSBFirmware/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

View File

@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}

View File

@ -0,0 +1,66 @@
# BadUSB Firmware <img align="right" src="https://github.com/CrashOverrideProductions/Tools/blob/main/Bad%20USB/images/logo.jpg?raw=true">
### Project: PlatformIO Migration of BadUSB Firmware (Malduino Elite Modified) <img alt="" align="right" src="https://img.shields.io/badge/Status-Code%20Review-informational?style=flat&logoColor=white&color=0EF9421" />
<img src="https://cdn.platformio.org/images/platformio-logo.17fdc3bc.png">
#### ChangeLog
```c++
09/12/2020 IMPORT MALDUINO ELITE SOURCE FROM SEYTONIC'S GITHUB REPOSITORY
09/12/2020 ADD HEADER & LICENCE DETAILS
09/12/2020 REMOVE DIP SWTICH | FILENAME = "Ducky.txt"
10/12/2020 REMOVE LED | ADD TEST PINOUT + TEST SUCCESSFUL
28/10/2020 ADD VID/PID HELPFUL INFO
18/04/2021 CAST 'buf' & 'repeatBuffer' (char*)malloc....
18/04/2021 MOVE 'runLine' FUNCTION BELOW 'runCommand' FUNCION - PLATFORMIO ISSUE
30/04/2021 IMPLEMENT 'NumLock', 'Pause/Break', 'Scroll-Lock', 'F13 - F23' KEYS
```
#### Platform IO Build Status
```c++
Processing leonardo (platform: atmelavr; board: leonardo; framework: arduino)
-----------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/leonardo.html
PLATFORM: Atmel AVR (3.3.0) > Arduino Leonardo
HARDWARE: ATMEGA32U4 16MHz, 2.50KB RAM, 28KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr 5.1.0
- toolchain-atmelavr 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Keyboard> 1.0.2
| |-- <HID> 1.0
|-- <Mouse> 1.0.1
| |-- <HID> 1.0
|-- <SD> 1.2.4
| |-- <SPI> 1.0
Building in release mode
Compiling .pio\build\leonardo\src\main.cpp.o
Linking .pio\build\leonardo\firmware.elf
Checking size .pio\build\leonardo\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [====== ] 62.2% (used 1593 bytes from 2560 bytes)
Flash: [======= ] 68.8% (used 19722 bytes from 28672 bytes)
Building .pio\build\leonardo\firmware.hex
=========================================== [SUCCESS] Took 2.55 seconds =========================================================
```
<!-- Licencing Always at the Bottom -->
------------
### Licencing <img alt="" align="right" src="https://img.shields.io/badge/Licence-MIT-informational?style=flat&logoColor=white&color=FF9421" />
**MIT - LICENCE**
Copyright 2017 Seytonic, Spacehuhn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,39 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

View File

@ -0,0 +1,46 @@
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html

View File

@ -0,0 +1,18 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:leonardo]
platform = atmelavr
board = leonardo
framework = arduino
lib_deps =
arduino-libraries/Keyboard@^1.0.2
arduino-libraries/Mouse@^1.0.1
arduino-libraries/SD@^1.2.4

View File

@ -0,0 +1,371 @@
// |------------------------------- HEADER ---------------------------------------------------------------------------------------------------------|
// APPLICATION: MALDUINO ELITE - FIRMWARE
// AUTHOR: SEYTONIC, SPACEHUNN
// MODIFIED BY: JUSTIN BLAND
// PURPOSE OF MOD: MINOR ALTERATIONS TO SUIT CRASHOVERRIDE BADUSB
// DATE: 09/12/2020
// AUDIT DATE: 18/04/2021
// STATUS: PLATFORMIO MIGRATION
//
// LICENCE: MIT LICENCE
//
// DESIGNED MCU: TEST - ARDUINO LEONARDO R3 (ATMEGA32U4) | PRODUCTION - ATMEGA32U4
//
// REVISIONS:
// 09/12/2020 IMPORT MALDUINO ELITE SOURCE FROM SEYTONIC'S GITHUB REPOSITORY
// 09/12/2020 ADD HEADER & LICENCE DETAILS
// 09/12/2020 REMOVE DIP SWTICH | FILENAME = "ducky.txt"
// 10/12/2020 REMOVE LED | ADD TEST PINOUT + TEST SUCCESSFUL
// 28/10/2020 ADD VID/PID HELPFUL INFO
// 18/04/2021 CAST 'buf' & 'repeatBuffer' (char*)malloc....
// 18/04/2021 MOVE 'runLine' FUNCTION BELOW 'runCommand' FUNCION - PLATFORMIO ISSUE
// 30/04/2021 IMPLEMENT 'NumLock', 'Pause/Break', 'Scroll-Lock', 'F13 - F23' KEYS
// |------------------------------- LICENCE INFO ---------------------------------------------------------------------------------------------------|
/*
Copyright 2017 Seytonic, Spacehuhn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
// |------------------------------- HELPFUL INFO ---------------------------------------------------------------------------------------------------|
// ARDUINO LEONARDO DOES NOT MAP SPI PINS TO D11 / D12 / D13
//
// LEONARDO R3 PIN CONFIGURATION
// |-----SIGNAL-----|--UNO--|--LEONARDO--|
// SD Card Select D10 D10
// MISO D12 ICSP MISO
// MOSI D11 ISCP MOSI
// SCK D13 ISCP SCK
// VENDOR AND DEVICE IDS FOR COMMON HID DEVICES
// |--MANUFACTURER--|--------------DESCRIPTION--------------|--VENDOR ID--|--DEVICE ID--|
// APPLE MAGIC KEYBOARD A1644 05AC 0267
// APPLE MAGIC MOUSE A1269 05AC 030D
// MICROSOFT SURFACE KEYBAORD 045E 07CD
// MICROSOFT WIRED KEYBAORD 400 045E 0752
// MICROSOFT CLASSIC INTELLIMOUSE 045E 0823
//
// |------------------------------- DEFINITIONS ----------------------------------------------------------------------------------------------------|
#include <Arduino.h>
//#include <SPI.h>
#include <SD.h>
#include <Mouse.h>
#include <Keyboard.h>
//#define debug true // <-- uncomment to turn serial output on
#define CSpin 10 //Chip-Select of the SD-Card reader
#define buffersize 256
#define KEYPAD_0 234
#define KEYPAD_1 225
#define KEYPAD_2 226
#define KEYPAD_3 227
#define KEYPAD_4 228
#define KEYPAD_5 229
#define KEYPAD_6 230
#define KEYPAD_7 231
#define KEYPAD_8 232
#define KEYPAD_9 233
#define KEYPAD_ASTERIX 221
#define KEYPAD_ENTER 224
#define KEYPAD_MINUS 222
#define KEYPAD_PERIOD 235
#define KEYPAD_PLUS 223
#define KEYPAD_SLASH 220
#define PRINTSCREEN 206
#define NUM_LOCK 219
#define SCROLL_LOCK 207
#define PAUSE_BTN 208
File payload;
char* buf = (char*)malloc(sizeof(char) * buffersize);
char* repeatBuffer = (char*)malloc(sizeof(char) * 12);
int bufSize = 0;
int defaultDelay = 5;
int defaultCharDelay = 5;
int rMin = -100;
int rMax = 100;
int getSpace(int start, int end) {
for (int i = start; i < end; i++) {
if (buf[i] == ' ') return i;
}
return -1;
}
bool equals(char* strA, int start, int end, char* strB, int strLen) {
if (end - start != strLen) return false;
for (int i = 0; i < strLen; i++) {
if (strA[start + i] != strB[i]) return false;
}
return true;
}
int toPositive(int num) {
if (num < 0) return num * (-1);
else return num;
}
bool equalsBuffer(int start, int end, char* str) { return equals(buf, start, end, str, String(str).length()); }
int getInt(char* str, int pos) {
if (equals(str, pos + 1, pos + 7, "RANDOM", 6)) {
return random(rMin, rMax);
}
else {
return String(str).substring(pos + 1, pos + 6).toInt();
}
}
void KeyboardWrite(uint8_t c) {
Keyboard.press(c);
delay(defaultCharDelay);
Keyboard.release(c);
}
void runCommand(int s, int e) {
#ifdef debug
Serial.println("Press '" + String(buf).substring(s, e) + "'");
#endif
if (e - s < 2) Keyboard.press(buf[s]);
else if (equalsBuffer(s, e, "ENTER")) Keyboard.press(KEY_RETURN);
else if (equalsBuffer(s, e, "GUI") || equalsBuffer(s, e, "WINDOWS")) Keyboard.press(KEY_LEFT_GUI);
else if (equalsBuffer(s, e, "SHIFT")) Keyboard.press(KEY_LEFT_SHIFT);
else if (equalsBuffer(s, e, "ALT") || equalsBuffer(s, e, "ALT_LEFT") || equalsBuffer(s, e, "ALTLEFT")) Keyboard.press(KEY_LEFT_ALT);
else if (equalsBuffer(s, e, "ALT_RIGHT") || equalsBuffer(s, e, "ALTRIGHT")) Keyboard.press(KEY_RIGHT_ALT);
else if (equalsBuffer(s, e, "CTRL") || equalsBuffer(s, e, "CONTROL")) Keyboard.press(KEY_LEFT_CTRL);
else if (equalsBuffer(s, e, "CAPSLOCK")) Keyboard.press(KEY_CAPS_LOCK);
else if (equalsBuffer(s, e, "DELETE")) Keyboard.press(KEY_DELETE);
else if (equalsBuffer(s, e, "END")) Keyboard.press(KEY_END);
else if (equalsBuffer(s, e, "ESC") || equalsBuffer(s, e, "ESCAPE")) Keyboard.press(KEY_ESC);
else if (equalsBuffer(s, e, "HOME")) Keyboard.press(KEY_HOME);
else if (equalsBuffer(s, e, "INSERT")) Keyboard.press(KEY_INSERT);
else if (equalsBuffer(s, e, "PAGEUP")) Keyboard.press(KEY_PAGE_UP);
else if (equalsBuffer(s, e, "PAGEDOWN")) Keyboard.press(KEY_PAGE_DOWN);
else if (equalsBuffer(s, e, "SPACE")) Keyboard.press(' ');
else if (equalsBuffer(s, e, "TAB")) Keyboard.press(KEY_TAB);
else if (equalsBuffer(s, e, "BACKSPACE")) Keyboard.press(KEY_BACKSPACE);
else if (equalsBuffer(s, e, "UP") || equalsBuffer(s, e, "UPARROW")) Keyboard.press(KEY_UP_ARROW);
else if (equalsBuffer(s, e, "DOWN") || equalsBuffer(s, e, "DOWNARROW")) Keyboard.press(KEY_DOWN_ARROW);
else if (equalsBuffer(s, e, "LEFT") || equalsBuffer(s, e, "LEFTARROW")) Keyboard.press(KEY_LEFT_ARROW);
else if (equalsBuffer(s, e, "RIGHT") || equalsBuffer(s, e, "RIGHTARROW")) Keyboard.press(KEY_RIGHT_ARROW);
else if (equalsBuffer(s, e, "PRINTSCREEN")) Keyboard.press(PRINTSCREEN);
else if (equalsBuffer(s, e, "F1")) Keyboard.press(KEY_F1);
else if (equalsBuffer(s, e, "F2")) Keyboard.press(KEY_F2);
else if (equalsBuffer(s, e, "F3")) Keyboard.press(KEY_F3);
else if (equalsBuffer(s, e, "F4")) Keyboard.press(KEY_F4);
else if (equalsBuffer(s, e, "F5")) Keyboard.press(KEY_F5);
else if (equalsBuffer(s, e, "F6")) Keyboard.press(KEY_F6);
else if (equalsBuffer(s, e, "F7")) Keyboard.press(KEY_F7);
else if (equalsBuffer(s, e, "F8")) Keyboard.press(KEY_F8);
else if (equalsBuffer(s, e, "F9")) Keyboard.press(KEY_F9);
else if (equalsBuffer(s, e, "F10")) Keyboard.press(KEY_F10);
else if (equalsBuffer(s, e, "F11")) Keyboard.press(KEY_F11);
else if (equalsBuffer(s, e, "F12")) Keyboard.press(KEY_F12);
else if (equalsBuffer(s, e, "F13")) Keyboard.press(KEY_F13);
else if (equalsBuffer(s, e, "F14")) Keyboard.press(KEY_F14);
else if (equalsBuffer(s, e, "F15")) Keyboard.press(KEY_F15);
else if (equalsBuffer(s, e, "F16")) Keyboard.press(KEY_F16);
else if (equalsBuffer(s, e, "F17")) Keyboard.press(KEY_F17);
else if (equalsBuffer(s, e, "F18")) Keyboard.press(KEY_F18);
else if (equalsBuffer(s, e, "F19")) Keyboard.press(KEY_F19);
else if (equalsBuffer(s, e, "F20")) Keyboard.press(KEY_F20);
else if (equalsBuffer(s, e, "F21")) Keyboard.press(KEY_F21);
else if (equalsBuffer(s, e, "F22")) Keyboard.press(KEY_F22);
else if (equalsBuffer(s, e, "F23")) Keyboard.press(KEY_F23);
else if (equalsBuffer(s, e, "F24")) Keyboard.press(KEY_F24);
else if (equalsBuffer(s, e, "NUM_0")) KeyboardWrite(KEYPAD_0);
else if (equalsBuffer(s, e, "NUM_1")) KeyboardWrite(KEYPAD_1);
else if (equalsBuffer(s, e, "NUM_2")) KeyboardWrite(KEYPAD_2);
else if (equalsBuffer(s, e, "NUM_3")) KeyboardWrite(KEYPAD_3);
else if (equalsBuffer(s, e, "NUM_4")) KeyboardWrite(KEYPAD_4);
else if (equalsBuffer(s, e, "NUM_5")) KeyboardWrite(KEYPAD_5);
else if (equalsBuffer(s, e, "NUM_6")) KeyboardWrite(KEYPAD_6);
else if (equalsBuffer(s, e, "NUM_7")) KeyboardWrite(KEYPAD_7);
else if (equalsBuffer(s, e, "NUM_8")) KeyboardWrite(KEYPAD_8);
else if (equalsBuffer(s, e, "NUM_9")) KeyboardWrite(KEYPAD_9);
else if (equalsBuffer(s, e, "NUM_ASTERIX")) KeyboardWrite(KEYPAD_ASTERIX);
else if (equalsBuffer(s, e, "NUM_ENTER")) KeyboardWrite(KEYPAD_ENTER);
else if (equalsBuffer(s, e, "NUM_Minus")) KeyboardWrite(KEYPAD_MINUS);
else if (equalsBuffer(s, e, "NUM_PERIOD")) KeyboardWrite(KEYPAD_PERIOD);
else if (equalsBuffer(s, e, "NUM_PLUS")) KeyboardWrite(KEYPAD_PLUS);
else if (equalsBuffer(s, e, "NUMLOCK")) Keyboard.press(NUM_LOCK);
else if (equalsBuffer(s, e, "SCROLLLOCK")) Keyboard.press(SCROLL_LOCK);
else if (equalsBuffer(s, e, "BREAK") || equalsBuffer(s, e, "PAUSE")) Keyboard.press(PAUSE_BTN);
else if (equalsBuffer(s, e, "CLICK") || equalsBuffer(s, e, "CLICK_LEFT") || equalsBuffer(s, e, "MOUSECLICK")) Mouse.click();
else if (equalsBuffer(s, e, "CLICK_RIGHT")) Mouse.click(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "CLICK_MIDDLE")) Mouse.click(MOUSE_MIDDLE);
else if (equalsBuffer(s, e, "PRESS") || equalsBuffer(s, e, "PRESS_LEFT")) Mouse.press();
else if (equalsBuffer(s, e, "PRESS_LEFT")) Mouse.press(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "PRESS_MIDDLE")) Mouse.press(MOUSE_MIDDLE);
else if (equalsBuffer(s, e, "RELEASE") || equalsBuffer(s, e, "RELEASE_LEFT")) Mouse.release();
else if (equalsBuffer(s, e, "RELEASE_LEFT")) Mouse.release(MOUSE_RIGHT);
else if (equalsBuffer(s, e, "RELEASE_MIDDLE")) Mouse.release(MOUSE_MIDDLE);
#ifdef debug
else Serial.println("failed to find command");
#endif
/* not implemented
else if(equalsBuffer(s,e,"APP")) Keyboard.press();
else if(equalsBuffer(s,e,"MENU")) Keyboard.press(327);
*/
}
void runLine() {
#ifdef debug
Serial.println("run: '" + String(buf).substring(0, bufSize) + "' (" + (String)bufSize + ")");
#endif
int space = getSpace(0, bufSize);
if(space == -1) runCommand(0,bufSize);
else {
if (equalsBuffer(0, space, "DEFAULTDELAY") || equalsBuffer(0, space, "DEFAULT_DELAY"))
defaultDelay = getInt(buf, space);
else if (equalsBuffer(0, space, "DEFAULTCHARDELAY") || equalsBuffer(0, space, "DEFAULT_CHAR_DELAY")) defaultCharDelay = getInt(buf, space);
else if (equalsBuffer(0, space, "DELAY")) delay(getInt(buf, space));
else if (equalsBuffer(0, space, "STRING")) {
for (int i = space + 1; i < bufSize; i++) KeyboardWrite(buf[i]);
}
else if (equalsBuffer(0, space, "MOUSE")) {
int nSpace = getSpace(space + 1, bufSize);
int x = getInt(buf, space);
int y = getInt(buf, nSpace);
Mouse.move(x, y);
#ifdef debug
Serial.println("Move mouse " + (String)x + " " + (String)y);
#endif
}
else if (equalsBuffer(0, space, "SCROLL")) Mouse.move(0, 0, getInt(buf, space));
else if (equalsBuffer(0, space, "RANDOMMIN")) rMin = getInt(buf, space);
else if (equalsBuffer(0, space, "RANDOMMAX")) rMax = getInt(buf, space);
else if (equalsBuffer(0, space, "REM") || equalsBuffer(0, space, "REPEAT")) {}
else{
runCommand(0,space);
while(space >= 0 && space < bufSize){
int nSpace = getSpace(space+1,bufSize);
if(nSpace == -1) nSpace = bufSize;
runCommand(space+1,nSpace);
space = nSpace;
}
}
}
Keyboard.releaseAll();
delay(defaultDelay);
}
void setup() {
#ifdef debug
Serial.begin(115200);
delay(2000);
Serial.println("Started!");
#endif
randomSeed(analogRead(0));
if (!SD.begin(CSpin)) {
#ifdef debug
Serial.println("couldn't access sd-card :(");
#endif
return;
}
payload = SD.open("ducky.txt");
if (!payload)
{
return;
}
else {
Keyboard.begin();
Mouse.begin();
while (payload.available()) {
buf[bufSize] = payload.read();
if (buf[bufSize] == '\r' || buf[bufSize] == '\n' || bufSize >= buffersize)
{
if (buf[bufSize] == '\r' && payload.peek() == '\n')
{
payload.read();
}
//---------REPEAT---------
int repeatBufferSize = 0;
int repeats = 0;
unsigned long payloadPosition = payload.position();
for (int i = 0; i < 12; i++) {
if (payload.available()) {
repeatBuffer[repeatBufferSize] = payload.read();
repeatBufferSize++;
}
else
{
break;
}
}
if (repeatBufferSize > 6)
{
if (equals(repeatBuffer, 0, 6, "REPEAT", 6))
{
repeats = getInt(repeatBuffer, 6);
}
}
for (int i = 0; i < repeats; i++)
{
runLine();
}
payload.seek(payloadPosition);
//------------------------
runLine();
bufSize = 0;
}
else bufSize++;
}
if (bufSize > 0) {
runLine();
bufSize = 0;
}
payload.close();
Mouse.end();
Keyboard.end();
}
}
void loop() {}

View File

@ -0,0 +1,11 @@
This directory is intended for PlatformIO Unit Testing and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PlatformIO Unit Testing:
- https://docs.platformio.org/page/plus/unit-testing.html

BIN
images/BadUSB-Bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/BadUSB-TOP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/background.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
images/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
images/logo_full.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
images/prototype.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
images/test1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
images/test2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB