diff --git a/Adafruit Feather RP2040.zip b/Adafruit Feather RP2040.zip
new file mode 100644
index 0000000..ad580a1
Binary files /dev/null and b/Adafruit Feather RP2040.zip differ
diff --git a/breadboard.svg b/breadboard.svg
new file mode 100644
index 0000000..81c5772
--- /dev/null
+++ b/breadboard.svg
@@ -0,0 +1,1996 @@
+
+
+
diff --git a/parser.py b/parser.py
new file mode 100644
index 0000000..fbd6b86
--- /dev/null
+++ b/parser.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python3
+
+import click
+import xml.etree.ElementTree as ET
+from xml.dom import minidom
+import xmltodict
+import svgutils.transform as sg
+import sys
+import re
+
+MM_TO_PX = 96 / 25.4
+PX_TO_MM = 25.4 / 96
+FONT_HEIGHT_PX = 10.5
+FONT_CHAR_W = 4
+
+@click.argument('circuitpydef')
+@click.argument('SVG')
+@click.argument('FZP')
+
+
+@click.command()
+def parse(fzp, svg, circuitpydef):
+ click.echo("HI! THIS IS A MISTAKE!")
+
+
+ connections = []
+ f = open(fzp)
+ xmldict = xmltodict.parse(f.read())
+ for c in xmldict['module']['connectors']['connector']:
+ c_name = c['@name']
+ c_svg = c['views']['breadboardView']['p']['@svgId']
+ d = {'name': c_name, 'svgid': c_svg}
+ connections.append(d)
+ print(connections)
+
+ # open and paste the SVG into a new file
+ bb_sg = sg.fromfile(svg)
+ bb_root = bb_sg.getroot()
+ w = bb_sg.width
+ h = bb_sg.height
+ if "in" in w:
+ w = 25.4 * float(w[:-2])
+ else:
+ raise RuntimeError("Dont know units of width!", w)
+ if "in" in h:
+ h = 25.4 * float(h[:-2])
+ else:
+ raise RuntimeError("Dont know units of width!", h)
+ print("Width, Height in mm: ", w, h)
+
+ newsvg = sg.SVGFigure()
+ newsvg.set_size(("%dpx" % (w * MM_TO_PX), "%dpx" % (h * MM_TO_PX)))
+ print(newsvg.get_size())
+
+ #bb_root.rotate(90)
+ #bb_root.moveto(h * MM_TO_PX, 0, 1.33)
+ newsvg.append(bb_root)
+ newsvg.save("rotated.svg")
+
+ # ok now we can open said new file as an xml
+ xmldoc = minidom.parse("rotated.svg")
+
+ # Find all circle/pads
+ circlelist = xmldoc.getElementsByTagName('circle')
+ for c in circlelist:
+ try:
+ idval = c.attributes['id'].value
+ cx = c.attributes['cx'].value
+ cy = c.attributes['cy'].value
+ for d in connections:
+ if d['svgid'] == c.attributes['id'].value:
+ d['cx'] = float(cx)
+ d['cy'] = float(cy)
+ except KeyError:
+ pass
+
+ # sometimes pads are ellipses, note they're often transformed!
+ ellipselist = xmldoc.getElementsByTagName('ellipse')
+ for c in ellipselist:
+ try:
+ idval = c.attributes['id'].value
+ cx = c.attributes['cx'].value
+ cy = c.attributes['cy'].value
+ for d in connections:
+ if d['svgid'] == c.attributes['id'].value:
+ d['cx'] = float(cx)
+ d['cy'] = float(cy)
+ except KeyError:
+ pass
+
+ # now check the circuitpython definition file
+ pyvar = open(circuitpydef).readlines()
+ for line in pyvar:
+ #print(line)
+ matches = re.match(r'.*MP_ROM_QSTR\(MP_QSTR_(.*)\),\s+MP_ROM_PTR\(&pin_(.*)\)', line)
+ if not matches:
+ continue
+ #print(matches.group(1), matches.group(2))
+ for d in connections:
+ if d['name'] == matches.group(1):
+ if not 'aliases' in d:
+ d['aliases'] = []
+ d['aliases'].append(matches.group(2))
+
+ # add text labels!
+ for c in connections:
+ print(c)
+ is_top = c['cy'] < h/2
+
+ label = c['name']
+ if 'aliases' in c:
+ for a in c['aliases']:
+ if is_top:
+ label += "/" + a
+ else:
+ label = a + "/" + label
+ txt = sg.TextElement(0, 0, label, font="Courier New", weight="bold", color='red', size=6)
+ txt.rotate(270)
+ if is_top:
+ txt.moveto(c['cx'] + FONT_HEIGHT_PX/5, c['cy']-FONT_CHAR_W)
+ else:
+ txt.moveto(c['cx'] + FONT_HEIGHT_PX/5, c['cy']+(FONT_CHAR_W*len(label)))
+ newsvg.append(txt)
+
+ newsvg.save("rotated.svg")
+
+if __name__ == '__main__':
+ parse()
diff --git a/part.fzp b/part.fzp
new file mode 100644
index 0000000..ad89fec
--- /dev/null
+++ b/part.fzp
@@ -0,0 +1,625 @@
+
+
+ 4
+ Wed Mar 3 2021
+ kattni
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A new chip means a new Feather, and the Raspberry Pi RP2040 is no exception. When we saw this chip we thought "this chip is going to be awesome when we give it the Feather Treatment" and so we did! This Feather features the <span style=" font-weight:600;">RP2040</span>, and all niceties you know and love about Feather</p>
+<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Measures 2.0" x 0.9" x 0.28" (50.8mm x 22.8mm x 7mm) without headers soldered in</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Light as a (large?) feather - 5 grams</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RP2040 32-bit Cortex M0+ dual core running at ~125 MHz @ 3.3V logic and power</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">264 KB RAM</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">8 MB SPI FLASH</span> chip for storing files and CircuitPython/MicroPython code storage. No EEPROM</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tons of GPIO! 21 x GPIO pins with following capabilities:</span></li>
+<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;"><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Four </span>12 bit ADCs (one more than Pico)</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Two I2C, Two SPI and two UART peripherals, we label one for the 'main' interface in standard Feather locations</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">16 x PWM outputs - for servos, LEDs, etc</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The 8 digital 'non-ADC/non-peripheral' GPIO are consecutive for maximum PIO compatibility</li></ul>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Built in 200mA lipoly charger</span> with charging status indicator LED</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Pin #13 red LED </span>for general purpose blinking</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">RGB NeoPixel </span>with power pin on GPIO so you can depower it for low power usages.</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">On-board <span style=" font-weight:600;">STEMMA QT connector</span> that lets you quickly connect any Qwiic, STEMMA QT or Grove I2C devices with no soldering!</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Both Reset button and Bootloader select button for quick restarts (no unplugging-replugging to relaunch code) </span></li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">3.3V Power/enable pin</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://www.adafruit.com/product/752"><span style=" text-decoration: underline; color:#0000ff;">Optional SWD debug port can be soldered in for debug access</span></a></li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">4 mounting holes</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">24 MHz crystal for perfect timing.</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">3.3V regulator with 500mA peak current output</li>
+<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">USB Type C connector </span>lets you access built-in ROM USB bootloader and serial port debugging</li></ul>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Inside the RP2040 is a 'permanent ROM' USB UF2 bootloader</span>. What that means is when you want to program new firmware, you can hold down the BOOTSEL button while plugging it into USB (or pulling down the RUN/Reset pin to ground) and it will appear as a USB disk drive you can drag the firmware onto. Folks who have been using Adafruit products will find this very familiar - we use the technique on all our native-USB boards. Just note you don't double-click reset, instead hold down BOOTSEL during boot to enter the bootloader!</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The RP2040 is a powerful chip, which has the clock speed of our M4 (SAMD51), and two cores that are equivalent to our M0 (SAMD21). Since it is an M0 chip, it does not have a floating point unit, or DSP hardware support - so if you're doing something with heavy floating-point math, it will be done in software and thus not as fast as an M4. For many other computational tasks, you'll get close-to-M4 speeds!</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For peripherals, there are two I2C controllers, two SPI controllers, and two UARTs that are multiplexed across the GPIO - check the pinout for what pins can be set to which. There are 16 PWM channels, each pin has a channel it can be set to (ditto on the pinout).</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You'll note there's no I2S peripheral, or SDIO, or camera, what's up with that? Well instead of having specific hardware support for serial-data-like peripherals like these, the RP2040 comes with the PIO state machine system which is a unique and powerful way to create <span style=" font-style:italic;">custom hardware logic and data processing blocks</span> that run on their own without taking up a CPU. For example, NeoPixels - often we bitbang the timing-specific protocol for these LEDs. For the RP2040, we instead use PIO object that reads in the data buffer and clocks out the right bitstream with perfect accuracy. <a href="https://github.com/raspberrypi/pico-examples/tree/master/pio"><span style=" text-decoration: underline; color:#0000ff;">Same with I2S audio in or out, LED matrix displays, 8-bit or SPI based TFTs, even VGA</span></a>! In MicroPython and CircuitPython you can create PIO control commands to script the peripheral and load it in at runtime. There are 2 PIO peripherals with 4 state machines each.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">At the time of launch, there is no Arduino core support for this board. There is great </span><a href="https://github.com/raspberrypi/pico-sdk"><span style=" font-weight:600; text-decoration: underline; color:#0000ff;">C/C++ support</span></a><span style=" font-weight:600;">, an official </span><a href="https://github.com/raspberrypi/micropython"><span style=" font-weight:600; text-decoration: underline; color:#0000ff;">MicroPython port</span></a><span style=" font-weight:600;">, and a </span><a href="https://circuitpython.org/downloads"><span style=" font-weight:600; text-decoration: underline; color:#0000ff;">CircuitPython port</span></a><span style=" font-weight:600;">!</span> We of course <a href="https://learn.adafruit.com/welcome-to-circuitpython"><span style=" text-decoration: underline; color:#0000ff;">recommend CircuitPython because we think it's the easiest way to get started</span></a> and it has support with most of our drivers, displays, sensors, and more, supported out of the box so you can follow along with our CircuitPython projects and tutorials.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">While the RP2040 has lots of onboard RAM (264KB), it does not have built-in FLASH memory. Instead, that is provided by the external QSPI flash chip. <span style=" font-weight:600;">On this board there is 8 MB</span>, which is shared between the program it's running and any file storage used by MicroPython or CircuitPython. When using C/C++ you get the whole flash memory, if using Python you will have about 7 MB remaining for code, files, images, fonts, etc.</p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">RP2040 Chip features:</span></p>
+<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dual ARM Cortex-M0+ @ 133MHz</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">264kB on-chip SRAM in six independent banks</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DMA controller</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fully-connected AHB crossbar</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Interpolator and integer divider peripherals</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">On-chip programmable LDO to generate core voltage</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">2 on-chip PLLs to generate USB and core clocks</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">30 GPIO pins, 4 of which can be used as analog inputs</li>
+<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Peripherals</li></ul>
+<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;"><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">2 UARTs</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">2 SPI controllers</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">2 I2C controllers</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">16 PWM channels</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">USB 1.1 controller and PHY, with host and device support</li>
+<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">8 PIO state machines</li></ul>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Comes fully assembled and tested, with the UF2 USB bootloader. We also toss in some header, so you can solder it in and plug it into a solderless breadboard. </p></body></html>
+ Adafruit Feather RP2040
+
+
+ Adafruit #4884
+
+ Adafruit Feather RP2040
+ variant 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +3V3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +3V3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +3V3
+
+
+
+
+
+
+
+
+
+
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ https://www.adafruit.com/product/4884
+
diff --git a/rp2040pins.csv b/rp2040pins.csv
new file mode 100644
index 0000000..bbd5232
--- /dev/null
+++ b/rp2040pins.csv
@@ -0,0 +1,31 @@
+GPIO SPI UART I2C PWM
+GPIO0 RX0 TX0 SDA0 PWM0A
+GPIO1 CSn0 RX0 SCL0 PWM0B
+GPIO2 SCK0 CTS0 SDA1 PWM1A
+GPIO3 TX0 RTS0 SCL1 PWM1B
+GPIO4 RX0 TX1 SDA0 PWM2A
+GPIO5 CSn0 RX1 SCL0 PWM2B
+GPIO6 SCK0 CTS1 SDA1 PWM3A
+GPIO7 TX0 RTS1 SCL1 PWM3B
+GPIO8 RX1 TX1 SDA0 PWM4A
+GPIO9 CSn1 RX1 SCL0 PWM4B
+GPIO10 SCK1 CTS1 SDA1 PWM5A
+GPIO11 TX1 RTS1 SCL1 PWM5B
+GPIO12 RX1 TX0 SDA0 PWM6A
+GPIO13 CSn1 RX0 SCL0 PWM6B
+GPIO14 SCK1 CTS0 SDA1 PWM7A
+GPIO15 TX1 RTS0 SCL1 PWM7B
+GPIO16 RX0 TX0 SDA0 PWM0A
+GPIO17 CSn0 RX0 SCL0 PWM0B
+GPIO18 SCK0 CTS0 SDA1 PWM1A
+GPIO19 TX0 RTS0 SCL1 PWM1B
+GPIO20 RX0 TX1 SDA0 PWM2A
+GPIO21 CSn0 RX1 SCL0 PWM2B
+GPIO22 SCK0 CTS1 SDA1 PWM3A
+GPIO23 TX0 RTS1 SCL1 PWM3B
+GPIO24 RX1 TX1 SDA0 PWM4A
+GPIO25 CSn1 RX1 SCL0 PWM4B
+GPIO26 SCK1 CTS1 SDA1 PWM5A
+GPIO27 TX1 RTS1 SCL1 PWM5B
+GPIO28 RX1 TX0 SDA0 PWM6A
+GPIO29 CSn1 RX0 SCL0 PWM6B