diff --git a/.gitignore b/.gitignore
index a230a78..3037be0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
.venv/
+venv/
__pycache__/
+.idea/
+.ropeproject
diff --git a/HOW TO.odt b/HOW TO.odt
new file mode 100644
index 0000000..d1a2cf6
Binary files /dev/null and b/HOW TO.odt differ
diff --git a/PinoutGenerator.py b/PinoutGenerator.py
new file mode 100644
index 0000000..9f6c1cc
--- /dev/null
+++ b/PinoutGenerator.py
@@ -0,0 +1,217 @@
+# First we import all the necessary libraries
+
+import json
+import sys
+from pinout.core import Group, Image
+from pinout import config
+from pinout.components.layout import Diagram
+from pinout.components.pinlabel import PinLabelGroup, PinLabel
+from pinout.components.text import TextBlock
+from pinout.components.legend import Legend, Swatch
+from pinout.config import legend
+
+#Linear search, currently unused.
+# def linear_search(data, target):
+# for tup in data:
+# if target in tup:
+# return tup
+# return None
+
+# My implementation of linear dictionary search
+def dict_search(arr, target):
+ for dict in arr: # Searches through an array of dictionaries
+ if dict["name"] == target: # If an attribute "name" matches the target argument
+ return dict # It returns the dictionary
+
+# Turns an Array of dictionaries (with the attributes "label" and "tag") into an array of touples
+# Necessary as most functions from pinout don't accept dictionaries as inputs
+def arrOfDictsToArrOfTups(dict):
+ tuplist = []
+ for entry in dict:
+ tuplist.append((entry["label"], entry["tag"]))
+ return tuplist
+
+# Used for turning preparing PinLabelGroupsData for Use
+# Turn an array of arrays of Dictionaries into an array of arrays of Touples
+def arrOfArrsOfDictsToArrOfArrsOfTups(list):
+ tuplist = []
+ for listinlistoftuplists in list:
+ tuplist.append(arrOfDictsToArrOfTups(listinlistoftuplists))
+ return tuplist
+
+# LOAD JSON FILE
+dataFilepath = sys.argv[1] #import data as an argument
+sys.path.insert(1, str(dataFilepath)) #insert filepath into python
+
+with open(dataFilepath) as f: #open JSON
+ data = json.load(f)
+
+#IMPORT CSS
+cssFilepath = ""
+
+if data["customCssFilepath"]:
+ cssFilepath = data["customCssFilepath"] # custom css
+else:
+ cssFilepath = "styles.css" # default css
+
+#Set up the diagram page
+diagram = Diagram(data["D_WIDTH"], data["D_HEIGHT"], data["brdName"])
+
+#Add the CSS stylesheet
+diagram.add_stylesheet(cssFilepath, embed=True)
+
+# Create a group to hold the pinout-diagram components.
+graphic = diagram.add(Group())
+
+# Add and embed an image
+image = Image(data["brdImgName"], embed=True)
+image.x = ((diagram.width - image.width) // 2) + 200 # center the image\
+image.y = data["hgt_shift"]
+hardware = graphic.add(image)
+
+# CREATE TITLE
+titleName = data["title"]
+titleCode = (
+ f"{data['title']} "
+ f"Pinout"
+)
+
+title = TextBlock(titleCode)
+title.x = ((diagram.width + (image.width // 2)) // 2) + data["titleWidthShift"] # center the image
+title.y = data["hgt_shift"] // 2 + data["titleHeightShift"] # Put the title slightly above the board
+diagram.add(title)
+
+# Measure and record key locations with the hardware Image instance
+for hw in data["hwCoordiantes"]:
+ hardware.add_coord(hw["name"], hw["x"], hw["y"])
+
+# CREATE LEGENDS
+config.legend["entry"]["height"] = 30
+config.legend["entry"]["swatch"]["height"] = 18
+config.legend["entry"]["swatch"]["width"] = 60
+
+legendNumber = 0
+
+for legend in data["legendList"]: #Iterate over the list of legends
+
+ #Prepare the legend for future use
+ temporaryLegendStorage = arrOfDictsToArrOfTups(data[legend])
+
+ #ACTUALLY CREATE LEGEND
+ singular_legend = Legend(temporaryLegendStorage)
+
+ #Grab the coordinates
+ legend_X = data["legendCoords"][legendNumber]["x"] + data["wid_shift"]
+ legend_Y = data["legendCoords"][legendNumber]["y"] + data["hgt_shift"]
+
+ singular_legend.x = legend_X
+ singular_legend.y = legend_Y
+
+ #Ddd the legedend to the diagram
+ diagram.add(singular_legend)
+
+ legendNumber = legendNumber + 1
+
+# ADD HARDWARE COORDINATES
+
+for record in data["hwCoordiantes"]:
+ name = record["name"]
+ recX = record["x"]
+ recY = record["y"]
+ hardware.add_coord(name, recX, recY)
+
+# ADD PIN LABELS AND PIN LABEL GROUPS
+
+graphicPinLabels = []
+graphicPinLabelGroups = []
+
+config.pinlabel["body"].update({"width": 3000})
+
+# ADD PIN LABELS
+for record in data["graphicPinLabelData"]: # Parse the data and add it to the array
+
+ ## GET START COORDS
+ start_Array = record["start_X"]["arr"]
+ start_Searchterm = record["start_X"]["searchTerm"]
+ start_dict = data[start_Array]
+ hw_dict = dict_search(start_dict, start_Searchterm)
+ X = hw_dict["x"] + data["wid_shift"]
+ Y = hw_dict["y"] + data["hgt_shift"]
+
+ ## GRAB DATA FROM THE RECORD
+ pin = record["pin"]
+ scale = (record["scale"]["x"], record["scale"]["x"])
+ tag = record["tag"]
+ body = record["body"]
+ leaderline = record["leaderline"]
+
+ ## "ASSEMBLE" THE PIN DATA
+ definedPin = [pin, X, Y, tag, scale, body, leaderline]
+ graphicPinLabels.append(definedPin)
+
+# Finally actually add the lables
+for Label in graphicPinLabels:
+ graphic.add(PinLabel(
+ content=Label[0],
+ x=Label[1],
+ y=Label[2],
+ tag=Label[3],
+ scale = Label[4],
+ body=Label[5],
+ leaderline=Label[6],
+ )
+ )
+
+# ADD PIN LABEL GROUPS
+for record in data["graphicPinLabelGroupsData"]: # Parse the data and add it to the array
+
+ ## GET START COORDS
+ start_Array = record["start"]["arr"]
+ start_Searchterm = record["start"]["searchTerm"]
+ start_dict = data[start_Array]
+
+ hw_dict = dict_search(start_dict, start_Searchterm)
+ X = hw_dict["x"] + data["wid_shift"]
+ Y = hw_dict["y"] + data["hgt_shift"]
+
+ ## GET PIN PITCH
+ start_Array = record["pinPitch"]["arr"]
+ start_Searchterm = record["pinPitch"]["searchTerm"]
+ start_dict = data[start_Array]
+
+ hw_dict = dict_search(start_dict, start_Searchterm)
+ pinPitch = hw_dict["y"]
+
+ ## GRAB DATA FROM THE RECORD
+ scale = record["scale"]
+ label_start = record["label_start"]
+ label_pitch = record["label_pitch"]
+ name = record["name"] # Pin Group name
+ size = record["size"]
+
+ # Data prepared, assemble and add it to the array
+ pinLabelGroup = (X, Y, pinPitch, (label_start["x"], label_start["y"]), (label_pitch["x"], label_pitch["y"]), (scale["x"], scale["y"]), name, size)
+ graphicPinLabelGroups.append(pinLabelGroup)
+
+#Add pin label groups to the image
+for Label in graphicPinLabelGroups:
+ labels = arrOfArrsOfDictsToArrOfArrsOfTups(data[Label[6]])
+ graphic.add(
+ PinLabelGroup(
+ x = Label[0],
+ y = Label[1],
+ pin_pitch = (hardware.coord("pin_pitch", raw=True)),
+ label_start = Label[3],
+ label_pitch = Label[4],
+ scale = Label[5],
+ labels = labels,
+ body = Label[7],
+ )
+ )
+
+# Create a filepath for the image, assume it's in the same folder as the .json
+imgFilepath = dataFilepath.replace("/data.json", "/diagram.svg")
+
+# Render the image
+with open(imgFilepath, "w") as f:
+ f.write(diagram.render())
\ No newline at end of file
diff --git a/Templates/data.json b/Templates/data.json
new file mode 100644
index 0000000..43f8234
--- /dev/null
+++ b/Templates/data.json
@@ -0,0 +1,118 @@
+{
+ "brdName": "",
+ "brdImgName": "",
+ "D_WIDTH": ,
+ "D_HEIGHT": ,
+ "_comment7": "",
+ "wid_shift": ,
+ "hgt_shift": ,
+ "title": "",
+ "customCssFilepath": ,
+ "titleWidthShift": ,
+ "titleHeightShift": ,
+
+ "legend": [
+ {"label": "Analog", "tag": "analog"},
+ {"label": "Other", "tag": "other"},
+ {"label": "Ground", "tag": "gnd"},
+ {"label": "GPIO", "tag": "gpio"},
+ {"label": "Power", "tag": "pwr"},
+ {"label": "RTC", "tag": "rtc"},
+ {"label": "I2C", "tag": "i2c"},
+ {"label": "SPI", "tag": "spi"},
+ {"label": "UART", "tag": "uart"}
+ ],
+
+ "legendSPI": [
+ {"label": "CS - 46 ", "tag": "rtc"},
+ {"label": "MOSI - 3 ", "tag": "mosi"},
+ {"label": "SCK - 14 ", "tag": "scl"},
+ {"label": "MISO - 21", "tag": "sda"},
+ {"label": "3.3V - 47", "tag": "pwr"},
+ {"label": "GND", "tag": "gnd"}
+ ],
+
+ "legendI2C": [
+ {"label": "GND", "tag": "gnd"},
+ {"label": "3.3V - 47", "tag": "pwr"},
+ {"label": "SDA - 42", "tag": "sda"},
+ {"label": "SCL - 2 ", "tag": "scl"}
+ ],
+
+ "legendList": ["legendI2C", "legendSPI", "legend"],
+ "legendCoords": [{"x": , "y": }, {"x": , "y": }, {"x": , "y": }],
+
+
+ "_comment": ["Pinlabels. Each pin is an array of touples, with each touple being in the format of (TEXT, appearance)"],
+
+ "left_header": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
+
+ "right_header": [
+ [
+
+ ],
+ [
+
+ ],
+ [
+
+ ]
+ ],
+
+ "_comment2": ["content, x, y, tag, scale, body, leaderline"],
+ "hwCoordiantes": [
+ {"name": "gnd", "x": 560, "y": 145},
+ {"name": "pin_pitch", "x": 0, "y": 51},
+ {"name": "", "x": , "y": }
+ ],
+
+ "_comment1": ["content, x, y, tag, scale, body, leaderline, #hwCoordiantes =[(\"3v3\", 10, 81), (\"3v3\", 10, 81), (\"gnd\", 221, 79), (\"pin_pitch_v\", 0, 23), (\"pin_pitch_h\", 30, 0), (\"usb_power\", 112, 610), (\"usup\", 0, 476), (\"bat\", 230, 485)]\n"],
+
+ "_comment4": ["Script has to search HW coordinates. PinLabels => PinLabelsData, and now contains a touple containing (hwCoordinates, search term, returned data index"],
+
+ "graphicPinLabelData": [
+ {
+ "pin": "",
+ "start_X": {"arr": "", "searchTerm": "", "index": },
+ "start_Y": {"arr": "", "searchTerm": "", "index": },
+ "tag": "",
+ "scale": {"x": ,"y": },
+ "body": {"x": , "y": , "width": , "height": },
+ "leaderline":
+ },
+ {
+ "pin": "",
+ "start_X": {"arr": "", "searchTerm": "", "index": },
+ "start_Y": {"arr": "", "searchTerm": "", "index": },
+ "tag": "",
+ "scale": {"x": ,"y": },
+ "body": {"x": , "y": , "width": , "height": },
+ "leaderline":
+ }
+ ],
+
+ "_comment3": ["Script has to search HW coordinates. PinLabelGroups => PinLabelGroupsData, and now contains a touple containing (hwCoordinates, search term, returned data index"],
+
+ "graphicPinLabelGroupsData": [
+ {
+ "start": {"arr": "", "searchTerm": ""},
+ "pinPitch": {"arr": "", "searchTerm": "pin_pitch"},
+ "label_start": {"x": , "y": },
+ "label_pitch": {"x": , "y": },
+ "scale": {"x": 1, "y": 1},
+ "name": "",
+ "size": {"height": , "width": }
+ }
+
+ ]
+}
diff --git a/esp32_lan/esplan.png b/esp32_lan/esplan.png
new file mode 100644
index 0000000..174ac94
Binary files /dev/null and b/esp32_lan/esplan.png differ
diff --git a/esp32_lpkit/data.py b/esp32_lpkit/data.py
index 659ac17..4124387 100644
--- a/esp32_lpkit/data.py
+++ b/esp32_lpkit/data.py
@@ -1,191 +1,191 @@
-legend = [
- ("Analog", "analog"),
- ("Other", "other"),
- ("Ground", "gnd"),
- ("GPIO", "gpio"),
- ("Power", "pwr"),
- ("RTC", "rtc"),
- ("I2C", "i2c"),
- ("SPI", "spi"),
- ("UART", "uart"),
-]
-
-# Pinlabels
-
-left_header = [
- [
- ("3V3", "pwr"),
- ],
- [
- ("EN", "pwr"),
- ],
- [
- ("GP36", "gpio"),
- ("ADC1_0", "analog"),
- ("RTC_IO0", "rtc"),
- ("SENSOR_VP", "other"),
- ("INPUT ONLY", "other"),
- ],
- [
- ("GP39", "gpio"),
- ("ADC1_3", "analog"),
- ("RTC_IO3", "rtc"),
- ("SENSOR_VN", "other"),
- ("INPUT ONLY", "other"),
- ],
- [
- ("GP34", "gpio"),
- ("ADC1_6", "analog"),
- ("RTC_IO4", "rtc"),
- ("INPUT ONLY", "other"),
- ],
- [
- ("GP35", "gpio"),
- ("ADC1_7", "analog"),
- ("RTC_IO5", "rtc"),
- ("INPUT ONLY", "other"),
- ],
- [
- ("GP32", "gpio"),
- ("ADC1_4", "analog"),
- ("RTC_IO9", "rtc"),
- ("Touch9", "other"),
- ("XTAL_32_P", "other"),
- ],
- [
- ("GP33", "gpio"),
- ("ADC1_5", "analog"),
- ("RTC_IO8", "rtc"),
- ("Touch8", "other"),
- ("XTAL_32_N", "other"),
- ],
- [
- ("GP25", "gpio"),
- ("ADC2_8", "analog"),
- ("RTC_IO6", "rtc"),
- ("DAC1", "other"),
- ],
- [
- ("GP26", "gpio"),
- ("ADC2_9", "analog"),
- ("RTC_IO7", "rtc"),
- ("DAC2", "other"),
- ],
- [
- ("GP27", "gpio"),
- ("ADC2_7", "analog"),
- ("RTC_IO17", "rtc"),
- ("Touch7", "other"),
- ],
- [
- ("GP14", "gpio"),
- ("ADC2_6", "analog"),
- ("RTC_IO16", "rtc"),
- ("Touch6", "other"),
- ("HSPI_CLK", "spi"),
- ],
- [
- ("GP12", "gpio"),
- ("ADC2_5", "analog"),
- ("RTC_IO15", "rtc"),
- ("Touch5", "other"),
- ("HSPI_MISO", "spi"),
- ],
- [
- ("GND", "gnd"),
- ],
- [
- ("GP13", "gpio"),
- ("ADC2_4", "analog"),
- ("RTC_IO14", "rtc"),
- ("Touch4", "other"),
- ("HSPI_MOSI", "spi"),
- ],
- [
- ("VCC", "pwr"),
- ],
-]
-
-
-right_header = [
- [
- ("GND", "gnd"),
- ],
- [
- ("GP23", "gpio"),
- ("VSPI_MOSI", "spi"),
- ],
- [
- ("GP22", "gpio"),
- ("SCL", "i2c"),
- ],
- [
- ("GP1", "gpio"),
- ("TXD_0", "uart"),
- ],
- [
- ("GP3", "gpio"),
- ("RXD_0", "uart"),
- ],
- [
- ("GP21", "gpio"),
- ("I2C_SCL", "i2c"),
- ],
- [
- ("GND", "gnd"),
- ],
- [
- ("GP19", "gpio"),
- ("VSPI_MISO", "spi"),
- ],
- [
- ("GP18", "gpio"),
- ("VSPI_CLK", "spi"),
- ],
- [
- ("GP5", "gpio"),
- ("VSPI_CS0", "spi"),
- ],
- [
- ("GP17", "gpio"),
- ("TXD_2", "uart"),
- ],
- [
- ("GP16", "gpio"),
- ("RXD_2", "uart"),
- ],
- [
- ("GP4", "gpio"),
- ("ADC2_0", "adc"),
- ("RTC_IO10", "rtc"),
- ("Touch0", "other"),
- ],
- [
- ("GP0", "gpio"),
- ("ADC2_1", "adc"),
- ("RTC_IO11", "rtc"),
- ("Touch1", "other"),
- ],
- [
- ("GP2", "gpio"),
- ("ADC2_2", "adc"),
- ("RTC_IO12", "rtc"),
- ("Touch2", "other"),
- ],
- [
- ("GP15", "gpio"),
- ("ADC2_3", "adc"),
- ("RTC_IO13", "rtc"),
- ("Touch3", "other"),
- ("HSPI_CS0", "spi"),
- ],
-]
-
-
-# Text
-
-title = "LaskaKit ESP32-LPKit Pinout"
-
-# description = """Python tool kit to assist with
-# documentation of electronic hardware.
-# More info at pinout.readthedocs.io"""
+legend = [
+ ("Analog", "analog"),
+ ("Other", "other"),
+ ("Ground", "gnd"),
+ ("GPIO", "gpio"),
+ ("Power", "pwr"),
+ ("RTC", "rtc"),
+ ("I2C", "i2c"),
+ ("SPI", "spi"),
+ ("UART", "uart"),
+]
+
+# Pinlabels
+
+left_header = [
+ [
+ ("3V3", "pwr"),
+ ],
+ [
+ ("EN", "pwr"),
+ ],
+ [
+ ("GP36", "gpio"),
+ ("ADC1_0", "analog"),
+ ("RTC_IO0", "rtc"),
+ ("SENSOR_VP", "other"),
+ ("INPUT ONLY", "other"),
+ ],
+ [
+ ("GP39", "gpio"),
+ ("ADC1_3", "analog"),
+ ("RTC_IO3", "rtc"),
+ ("SENSOR_VN", "other"),
+ ("INPUT ONLY", "other"),
+ ],
+ [
+ ("GP34", "gpio"),
+ ("ADC1_6", "analog"),
+ ("RTC_IO4", "rtc"),
+ ("INPUT ONLY", "other"),
+ ],
+ [
+ ("GP35", "gpio"),
+ ("ADC1_7", "analog"),
+ ("RTC_IO5", "rtc"),
+ ("INPUT ONLY", "other"),
+ ],
+ [
+ ("GP32", "gpio"),
+ ("ADC1_4", "analog"),
+ ("RTC_IO9", "rtc"),
+ ("Touch9", "other"),
+ ("XTAL_32_P", "other"),
+ ],
+ [
+ ("GP33", "gpio"),
+ ("ADC1_5", "analog"),
+ ("RTC_IO8", "rtc"),
+ ("Touch8", "other"),
+ ("XTAL_32_N", "other"),
+ ],
+ [
+ ("GP25", "gpio"),
+ ("ADC2_8", "analog"),
+ ("RTC_IO6", "rtc"),
+ ("DAC1", "other"),
+ ],
+ [
+ ("GP26", "gpio"),
+ ("ADC2_9", "analog"),
+ ("RTC_IO7", "rtc"),
+ ("DAC2", "other"),
+ ],
+ [
+ ("GP27", "gpio"),
+ ("ADC2_7", "analog"),
+ ("RTC_IO17", "rtc"),
+ ("Touch7", "other"),
+ ],
+ [
+ ("GP14", "gpio"),
+ ("ADC2_6", "analog"),
+ ("RTC_IO16", "rtc"),
+ ("Touch6", "other"),
+ ("HSPI_CLK", "spi"),
+ ],
+ [
+ ("GP12", "gpio"),
+ ("ADC2_5", "analog"),
+ ("RTC_IO15", "rtc"),
+ ("Touch5", "other"),
+ ("HSPI_MISO", "spi"),
+ ],
+ [
+ ("GND", "gnd"),
+ ],
+ [
+ ("GP13", "gpio"),
+ ("ADC2_4", "analog"),
+ ("RTC_IO14", "rtc"),
+ ("Touch4", "other"),
+ ("HSPI_MOSI", "spi"),
+ ],
+ [
+ ("VCC", "pwr"),
+ ],
+]
+
+
+right_header = [
+ [
+ ("GND", "gnd"),
+ ],
+ [
+ ("GP23", "gpio"),
+ ("VSPI_MOSI", "spi"),
+ ],
+ [
+ ("GP22", "gpio"),
+ ("SCL", "i2c"),
+ ],
+ [
+ ("GP1", "gpio"),
+ ("TXD_0", "uart"),
+ ],
+ [
+ ("GP3", "gpio"),
+ ("RXD_0", "uart"),
+ ],
+ [
+ ("GP21", "gpio"),
+ ("I2C_SCL", "i2c"),
+ ],
+ [
+ ("GND", "gnd"),
+ ],
+ [
+ ("GP19", "gpio"),
+ ("VSPI_MISO", "spi"),
+ ],
+ [
+ ("GP18", "gpio"),
+ ("VSPI_CLK", "spi"),
+ ],
+ [
+ ("GP5", "gpio"),
+ ("VSPI_CS0", "spi"),
+ ],
+ [
+ ("GP17", "gpio"),
+ ("TXD_2", "uart"),
+ ],
+ [
+ ("GP16", "gpio"),
+ ("RXD_2", "uart"),
+ ],
+ [
+ ("GP4", "gpio"),
+ ("ADC2_0", "adc"),
+ ("RTC_IO10", "rtc"),
+ ("Touch0", "other"),
+ ],
+ [
+ ("GP0", "gpio"),
+ ("ADC2_1", "adc"),
+ ("RTC_IO11", "rtc"),
+ ("Touch1", "other"),
+ ],
+ [
+ ("GP2", "gpio"),
+ ("ADC2_2", "adc"),
+ ("RTC_IO12", "rtc"),
+ ("Touch2", "other"),
+ ],
+ [
+ ("GP15", "gpio"),
+ ("ADC2_3", "adc"),
+ ("RTC_IO13", "rtc"),
+ ("Touch3", "other"),
+ ("HSPI_CS0", "spi"),
+ ],
+]
+
+
+# Text
+
+title = "LaskaKit ESP32-LPKit Pinout"
+
+# description = """Python tool kit to assist with
+# documentation of electronic hardware.
+# More info at pinout.readthedocs.io"""
diff --git a/esp32_lpkit/diagram.svg b/esp32_lpkit/diagram.svg
deleted file mode 100644
index 476071f..0000000
--- a/esp32_lpkit/diagram.svg
+++ /dev/null
@@ -1,6027 +0,0 @@
-
-
\ No newline at end of file
diff --git a/esp32_lpkit/pinout_diagram.py b/esp32_lpkit/pinout_diagram.py
deleted file mode 100644
index 259e711..0000000
--- a/esp32_lpkit/pinout_diagram.py
+++ /dev/null
@@ -1,129 +0,0 @@
-###########################################
-#
-# Example script to build a
-# pinout diagram. Includes basic
-# features and convenience classes.
-#
-###########################################
-
-from pinout.core import Group, Image
-from pinout.components.layout import Diagram
-from pinout.components.pinlabel import PinLabelGroup, PinLabel
-from pinout.components.text import TextBlock
-from pinout.components.legend import Legend
-
-
-# Import data for the diagram
-import data
-
-# Create a new diagram
-# The Diagram_2Rows class provides 2 panels,
-# 'panel_01' and 'panel_02', to insert components into.
-D_WIDTH = 1920
-D_HEIGHT = 1080
-diagram = Diagram(D_WIDTH, D_HEIGHT, "esp32_lpkit")
-
-
-# Add a stylesheet
-diagram.add_stylesheet("styles.css", embed=True)
-
-# Create a group to hold the pinout-diagram components.
-graphic = diagram.add(Group())
-
-# Add and embed an image
-image = Image("esp32_lpkit.png", embed=True)
-image.x = (diagram.width - image.width) // 2 # center the image\
-image.y = 32 * 4
-hardware = graphic.add(image)
-
-# Measure and record key locations with the hardware Image instance
-hardware.add_coord("3v3", 10, 81)
-hardware.add_coord("gnd", 221, 79)
-# Other (x,y) pairs can also be stored here
-hardware.add_coord("pin_pitch_v", 0, 23)
-hardware.add_coord("pin_pitch_h", 30, 0)
-hardware.add_coord("usb_power", 112, 610)
-hardware.add_coord("usup", 0, 476)
-hardware.add_coord("bat", 230, 485)
-
-# Create a single pin label
-graphic.add(
- PinLabel(
- content="USB-POWER",
- x=hardware.coord("usb_power").x,
- y=hardware.coord("usb_power").y,
- tag="pwr",
- body={"x": 100, "y": 30, "width": 100, "height": 30},
- leaderline={"direction": "vh"},
- )
-)
-
-
-graphic.add(
- PinLabel(
- content="uSup i2c",
- x=hardware.coord("usup").x,
- y=hardware.coord("usup").y,
- tag="i2c",
- scale=(-1,1),
- body={"x": 30, "y": 0, "width": 100, "height": 30},
- leaderline=None,
- )
-)
-
-graphic.add(
- PinLabel(
- content="battery connector",
- x=hardware.coord("bat").x,
- y=hardware.coord("bat").y,
- tag="pwr",
- body={"x": 30, "y": 0, "width": 150, "height": 30},
- leaderline=None,
- )
-)
-
-
-# Create pinlabels on the right header
-graphic.add(
- PinLabelGroup(
- x=hardware.coord("gnd").x,
- y=hardware.coord("gnd").y,
- pin_pitch=hardware.coord("pin_pitch_v", raw=True),
- label_start=(30, 0),
- label_pitch=(0, 23),
- labels=data.right_header,
- body={"height": 20, "width": 100},
- )
-)
-
-
-# Create pinlabels on the left header
-graphic.add(
- PinLabelGroup(
- x=hardware.coord("3v3").x,
- y=hardware.coord("3v3").y,
- pin_pitch=hardware.coord("pin_pitch_v", raw=True),
- label_start=(30, 0),
- label_pitch=(0, 23),
- scale=(-1, 1),
- labels=data.left_header,
- body={"height": 20, "width": 100},
- )
-)
-
-
-# Title
-title = TextBlock(data.title)
-title.x = 16 * 3
-title.y = 32 * 3
-diagram.add(title)
-
-
-# Create a legend
-legend = Legend(data.legend)
-legend.x = 32
-legend.y = 32 * 8
-diagram.add(legend)
-
-with open("diagram.svg", "w") as f:
- f.write(diagram.render())
diff --git a/espInk/ESPink.png b/espInk/ESPink.png
new file mode 100644
index 0000000..7975026
Binary files /dev/null and b/espInk/ESPink.png differ
diff --git a/espInk/data.json b/espInk/data.json
new file mode 100644
index 0000000..bd37903
--- /dev/null
+++ b/espInk/data.json
@@ -0,0 +1,273 @@
+{
+ "brdName": "ESPink",
+ "brdImgName": "./espInk/ESPink.png",
+ "D_WIDTH": 3180,
+ "D_HEIGHT": 1860,
+ "_comment7": "wid_shift = ((D_WIDTH-image.width) // 2) + 200, in this case (3180-619)//2-200 = 2670",
+ "wid_shift": 1480,
+ "hgt_shift": 128,
+ "title": "LaskaKit ESP32-LPKit",
+ "customCssFilepath": null,
+ "titleWidthShift": -430,
+ "titleHeightShift": 20,
+
+ "legend": [
+ {"label": "Analog", "tag": "analog"},
+ {"label": "Other", "tag": "other"},
+ {"label": "Ground", "tag": "gnd"},
+ {"label": "GPIO", "tag": "gpio"},
+ {"label": "Power", "tag": "pwr"},
+ {"label": "RTC", "tag": "rtc"},
+ {"label": "I2C", "tag": "i2c"},
+ {"label": "SPI", "tag": "spi"},
+ {"label": "UART", "tag": "uart"}
+ ],
+
+ "legendSPI": [
+ {"label": "CS - 46 ", "tag": "rtc"},
+ {"label": "MOSI - 3 ", "tag": "mosi"},
+ {"label": "SCK - 14 ", "tag": "scl"},
+ {"label": "MISO - 21", "tag": "sda"},
+ {"label": "3.3V - 47", "tag": "pwr"},
+ {"label": "GND", "tag": "gnd"}
+ ],
+
+ "legendI2C": [
+ {"label": "GND", "tag": "gnd"},
+ {"label": "3.3V - 47", "tag": "pwr"},
+ {"label": "SDA - 42", "tag": "sda"},
+ {"label": "SCL - 2 ", "tag": "scl"}
+ ],
+
+ "legendList": ["legendI2C", "legendSPI", "legend"],
+ "legendCoords": [{"x": -500, "y": 1075}, {"x": 850, "y": 550}, {"x": -1200, "y": 0}],
+
+
+ "_comment": ["Pinlabels. Each pin is an array of touples, with each touple being in the format of (TEXT, appearance)"],
+
+ "left_header": [
+ [
+ {"label": "3V3", "tag": "pwr"}
+ ],
+ [
+ {"label": "EN", "tag": "pwr"}
+ ],
+ [
+ {"label": "GPIO4", "tag": "gpio"},
+ {"label": "ADC1 CH3", "tag": "analog"},
+ {"label": "TOUCH 4", "tag": "other"},
+ {"label": "RTC_IO4", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO5", "tag": "gpio"},
+ {"label": "ADC1 CH4", "tag": "analog"},
+ {"label": "TOUCH 5", "tag": "other"},
+ {"label": "RTC_IO5", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO6", "tag": "gpio"},
+ {"label": "ADC1 CH5", "tag": "analog"},
+ {"label": "TOUCH 6", "tag": "other"},
+ {"label": "RTC_IO6", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO7", "tag": "gpio"},
+ {"label": "ADC1 CH6", "tag": "analog"},
+ {"label": "TOUCH 7", "tag": "other"},
+ {"label": "RTC_IO7", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO15", "tag": "gpio"},
+ {"label": "ADC2 CH4", "tag": "analog"},
+ {"label": "TOUCH 12", "tag": "other"},
+ {"label": "RTS_0", "tag": "spi"},
+ {"label": "RTC_IO15", "tag": "rtc"},
+ {"label": "RXD 1", "tag": "uart"}
+ ],
+ [
+ {"label": "GPIO16", "tag": "gpio"},
+ {"label": "ADC2 CH5", "tag": "analog"},
+ {"label": "CTS_0", "tag": "spi"},
+ {"label": "RTC_IO16", "tag": "rtc"},
+ {"label": "TXD 1", "tag": "uart"}
+ ],
+ [
+ {"label": "GPIO17", "tag": "gpio"},
+ {"label": "ADC2 CH6", "tag": "analog"},
+ {"label": "TXD 1", "tag": "spi"},
+ {"label": "RTC_IO17", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO18", "tag": "gpio"},
+ {"label": "ADC2 CH7", "tag": "analog"},
+ {"label": "RXD 1", "tag": "spi"},
+ {"label": "RTC_IO18", "tag": "rtc"},
+ {"label": "CLK_OUT3", "tag": "other"}
+ ],
+ [
+ {"label": "GPIO8", "tag": "gpio"},
+ {"label": "ADC1 CH7", "tag": "analog"},
+ {"label": "TOUCH 8", "tag": "other"},
+ {"label": "RTC_IO8", "tag": "rtc"},
+ {"label": "SDA", "tag": "i2c"}
+ ],
+ [
+ {"label": "GPIO19", "tag": "gpio"},
+ {"label": "ADC2 CH8", "tag": "analog"},
+ {"label": "RXD 2", "tag": "uart"},
+ {"label": "RTS 1", "tag": "spi"},
+ {"label": "RTC_IO19", "tag": "rtc"},
+ {"label": "CLK_OUT2", "tag": "other"},
+ {"label": "USB D+", "tag": "other"}
+ ],
+ [
+ {"label": "GPIO20", "tag": "gpio"},
+ {"label": "ADC2 CH9", "tag": "analog"},
+ {"label": "TXD 2", "tag": "uart"},
+ {"label": "RTS 1", "tag": "spi"},
+ {"label": "RTC_IO19", "tag": "rtc"},
+ {"label": "CLK_OUT2", "tag": "other"},
+ {"label": "USB D-", "tag": "other"}
+ ],
+ [
+ {"label": "GPIO3", "tag": "gpio"},
+ {"label": "ADC1 CH2", "tag": "analog"},
+ {"label": "TOUCH 3", "tag": "other"},
+ {"label": "RTC_IO3", "tag": "rtc"},
+ {"label": "JTAG", "tag": "other"}
+ ],
+ [
+ {"label": "GND", "tag": "gnd"}
+ ],
+ [
+ {"label": "VCC", "tag": "pwr"}
+ ]
+ ],
+
+ "right_header": [
+ [
+ {"label": "GND", "tag": "gnd"}
+ ],
+ [
+ {"label": "GPIO1", "tag": "gpio"},
+ {"label": "ADC1 CH0", "tag": "analog"},
+ {"label": "TOUCH 1", "tag": "other"},
+ {"label": "RTC_IO1", "tag": "rtc"}
+ ],
+ [
+ {"label": "GPIO43", "tag": "gpio"},
+ {"label": "CLK OUT1", "tag": "other"},
+ {"label": "TXD 0", "tag": "uart"}
+ ],
+ [
+ {"label": "GPIO44", "tag": "gpio"},
+ {"label": "CLK OUT2", "tag": "other"},
+ {"label": "RXD 0", "tag": "uart"}
+ ],
+ [
+ {"label": "GPIO41", "tag": "gpio"},
+ {"label": "MTDI", "tag": "other"}
+ ],
+ [
+ {"label": "GPIO40", "tag": "gpio"},
+ {"label": "CLK OUT2", "tag": "other"},
+ {"label": "MTDO", "tag": "other"},
+ {"label": "Pushbutton", "tag": "other"}
+ ],
+ [
+ {"label": "GPIO39", "tag": "gpio"},
+ {"label": "CLK OUT3", "tag": "other"},
+ {"label": "MTDCK", "tag": "other"}
+ ],
+ [
+ {"label": "If PSRAM = OFF", "tag": "pwr"},
+ {"label": "GPIO35", "tag": "gpio"},
+ {"label": "FSPIPW", "tag": "other"}
+ ]
+ ],
+
+ "_comment2": ["content, x, y, tag, scale, body, leaderline"],
+ "hwCoordiantes": [
+ {"name": "3v3", "x": 50, "y": 143},
+ {"name": "gnd", "x": 560, "y": 145},
+ {"name": "pin_pitch", "x": 0, "y": 51},
+ {"name": "usb_power", "x": 320, "y": 1435},
+ {"name": "usup", "x": 80, "y": 1140},
+ {"name": "bat", "x": 530, "y": 790},
+ {"name": "disp", "x": 570, "y": 1150},
+ {"name": "SPI", "x": 530, "y": 640}
+ ],
+
+ "_comment1": ["content, x, y, tag, scale, body, leaderline, #hwCoordiantes =[(\"3v3\", 10, 81), (\"3v3\", 10, 81), (\"gnd\", 221, 79), (\"pin_pitch_v\", 0, 23), (\"pin_pitch_h\", 30, 0), (\"usb_power\", 112, 610), (\"usup\", 0, 476), (\"bat\", 230, 485)]\n"],
+
+ "_comment4": ["Script has to search HW coordinates. PinLabels => PinLabelsData, and now contains a touple containing (hwCoordinates, search term, returned data index"],
+
+ "graphicPinLabelData": [
+ {
+ "pin": "USB-POWER",
+ "start_X": {"arr": "hwCoordiantes", "searchTerm": "usb_power"},
+ "start_Y": {"arr": "hwCoordiantes", "searchTerm": "usb_power"},
+ "tag": "pwr",
+ "scale": {"x": 1, "y": 1},
+ "body": {"x": 0, "y": 200, "width": 300, "height": 40},
+ "leaderline": {"direction": "vh"}
+ },
+ {
+ "pin": "μŠup i2c",
+ "start_X": {"arr": "hwCoordiantes", "searchTerm": "usup"},
+ "start_Y": {"arr": "hwCoordiantes", "searchTerm": "usup"},
+ "tag": "i2c",
+ "scale": {"x": -1,"y": -1},
+ "body": {"x": 100, "y": 0, "width": 200, "height": 40},
+ "leaderline": null
+ },
+ {
+ "pin": "Battery Connector",
+ "start_X": {"arr": "hwCoordiantes", "searchTerm": "bat", "index": 1},
+ "start_Y": {"arr": "hwCoordiantes", "searchTerm": "bat", "index": 2},
+ "tag": "pwr",
+ "scale": {"x": 1, "y": 1},
+ "body": {"x": 100, "y": 0, "width": 350, "height": 40},
+ "leaderline": null,
+ "pin": "Display Connector",
+ "start_X": {"arr": "hwCoordiantes", "searchTerm": "disp", "index": 1},
+ "start_Y": {"arr": "hwCoordiantes", "searchTerm": "disp", "index": 2},
+ "tag": "other",
+ "scale": {"x": 1, "y": 1},
+ "body": {"x": 100, "y": 0, "width": 400, "height": 40},
+ "leaderline": null
+ },
+ {
+ "pin": "μŠup SPI",
+ "start_X": {"arr": "hwCoordiantes", "searchTerm": "SPI", "index": 1},
+ "start_Y": {"arr": "hwCoordiantes", "searchTerm": "SPI", "index": 2},
+ "tag": "spi", "scale": {"x": 1, "y": 1},
+ "body": {"x": 100, "y": 0, "width": 210, "height": 40},
+ "leaderline": null
+ }
+ ],
+
+ "_comment3": ["Script has to search HW coordinates. PinLabelGroups => PinLabelGroupsData, and now contains a touple containing (hwCoordinates, search term, returned data index"],
+
+ "graphicPinLabelGroupsData": [
+ {
+ "start": {"arr": "hwCoordiantes", "searchTerm": "gnd"},
+ "pinPitch": {"arr": "hwCoordiantes", "searchTerm": "pin_pitch"},
+ "label_start": {"x": 50, "y": 0},
+ "label_pitch": {"x": 0, "y": 50},
+ "scale": {"x": 1, "y": 1},
+ "name": "right_header",
+ "size": {"height": 38, "width": 280}
+ },
+ {
+ "start": {"arr": "hwCoordiantes", "searchTerm": "3v3"},
+ "pinPitch": {"arr": "hwCoordiantes", "searchTerm": "pin_pitch"},
+ "label_start": {"x": 50, "y": 0},
+ "label_pitch": {"x": 0, "y": 50},
+ "scale": {"x": -1, "y": 1},
+ "name": "left_header",
+ "size": {"height": 38, "width": 200}
+ }
+
+ ]
+}
\ No newline at end of file
diff --git a/espInk/data.py b/espInk/data.py
new file mode 100644
index 0000000..8005d1f
--- /dev/null
+++ b/espInk/data.py
@@ -0,0 +1,228 @@
+#Names
+from sndhdr import whathdr
+
+brdName = "ESPink" #add board name here
+brdImgName = "/home/vik/PycharmProjects/pinouts/espInk/ESPink.png" #location of board .png
+
+
+D_WIDTH = 3180 #resulting diagram width
+D_HEIGHT = 1860 #resulting diagram height
+
+
+#certain labels don't generate properly, as the image gets moved by pinout_diagram.py. This calculates that same shift and allows it to be applied to pin labels
+from pinout.core import Group, Image
+image = Image(brdImgName, embed=True)
+wid_shift = ((D_WIDTH-image.width) // 2) +200 #image.x
+hgt_shift = 32 * 4 #image.y
+
+# Text
+title = "LaskaKit ESP32-LPKit Pinout"
+
+legend = [
+ ("Analog ", "analog"),
+ ("Other ", "other"),
+ ("Ground ", "gnd"),
+ ("GPIO ", "gpio"),
+ ("Power ", "pwr"),
+ ("RTC ", "rtc"),
+ ("I2C ", "i2c"),
+ ("SPI ", "spi"),
+ ("UART ", "uart"),
+]
+
+legendSPI = [
+ ("CS - 46 ", "rtc"),
+ ("MOSI - 3 ", "mosi"),
+ ("SCK - 14 ", "scl"),
+ ("MISO - 21", "sda"),
+ ("3.3V - 47", "pwr"),
+ ("GND", "gnd")
+]
+
+legendI2C = [
+ ("GND", "gnd"),
+ ("3.3V - 47", "pwr"),
+ ("SDA - 42", "sda"),
+ ("SCL - 2 ", "scl")
+]
+
+legendList = [legendI2C, legendSPI, legend]
+legendCoords = [(-390, 1080), (870, 520), (32-wid_shift, 32*8-hgt_shift)]
+
+
+# Pinlabels. Each pin is an array of touples, with each touple being in the format of (TEXT, appearance)
+
+left_header = [
+ [
+ ("3V3", "pwr"),
+ ],
+ [
+ ("EN", "pwr"),
+ ],
+ [
+ ("GP4", "gpio"),
+ ("ADC1 CH3", "analog"),
+ ("TOUCH 4", "other"),
+ ("RTC_IO4", "rtc")
+ ],
+ [
+ ("GP5", "gpio"),
+ ("ADC1 CH4", "analog"),
+ ("TOUCH 5", "other"),
+ ("RTC_IO5", "rtc")
+ ],
+ [
+ ("GP6", "gpio"),
+ ("ADC1 CH5", "analog"),
+ ("TOUCH 6", "other"),
+ ("RTC_IO6", "rtc")
+ ],
+ [
+ ("GP7", "gpio"),
+ ("ADC1 CH6", "analog"),
+ ("TOUCH 7", "other"),
+ ("RTC_IO7", "rtc")
+ ],
+ [
+ ("GP15", "gpio"),
+ ("ADC2 CH4", "analog"),
+ ("TOUCH 12", "other"),
+ ("RTS_0", "spi"),
+ ("RTC_IO15", "rtc"),
+ ("RXD 1", "uart")
+ ],
+ [
+ ("GP16", "gpio"),
+ ("ADC2 CH5", "analog"),
+ ("CTS_0", "spi"),
+ ("RTC_IO16", "rtc"),
+ ("TXD 1", "uart")
+ ],
+ [
+ ("GP17", "gpio"),
+ ("ADC2 CH6", "analog"),
+ ("TXD 1", "spi"),
+ ("RTC_IO17", "rtc")
+ ],
+ [
+ ("GP18", "gpio"),
+ ("ADC2 CH7", "analog"),
+ ("RXD 1", "spi"),
+ ("RTC_IO18", "rtc"),
+ ("CLK_OUT3", "other")
+ ],
+ [
+ ("GP8", "gpio"),
+ ("ADC1 CH7", "analog"),
+ ("TOUCH 8", "other"),
+ ("RTC_IO8", "rtc"),
+ ("SDA", "i2c")
+ ],
+ [
+ ("GP19", "gpio"),
+ ("ADC2 CH8", "analog"),
+ ("RXD 2", "uart"),
+ ("RTS 1", "spi"),
+ ("RTC_IO19", "rtc"),
+ ("CLK_OUT2", "other"),
+ ("USB D+", "other")
+ ],
+ [
+ ("GP20", "gpio"),
+ ("ADC2 CH9", "analog"),
+ ("TXD 2", "uart"),
+ ("RTS 1", "spi"),
+ ("RTC_IO19", "rtc"),
+ ("CLK_OUT2", "other"),
+ ("USB D-", "other")
+ ],
+ [
+ ("GP3", "gpio"),
+ ("ADC1 CH2", "analog"),
+ ("TOUCH 3", "other"),
+ ("RTC_IO3", "rtc"),
+ ("JTAG", "other")
+ ],
+ [
+ ("GND", "gnd"),
+ ],
+ [
+ ("VCC", "pwr"),
+ ]
+
+
+
+]
+
+right_header = [
+ [
+ ("GND", "gnd"),
+ ],
+ [
+ ("GP1", "gpio"),
+ ("ADC1 CH0", "analog"),
+ ("TOUCH 1", "other"),
+ ("RTC_IO1", "rtc"),
+ ],
+ [
+ ("GP43", "gpio"),
+ ("CLK OUT1", "other"),
+ ("TXD 0","uart")
+ ],
+ [
+ ("GP44", "gpio"),
+ ("CLK OUT2", "other"),
+ ("RXD 0", "uart")
+ ],
+ [
+ ("GP41", "gpio"),
+ ("MTDI", "other")
+ ],
+ [
+ ("GP40", "gpio"),
+ ("CLK OUT2", "other"),
+ ("MTDO", "other"),
+ ("Pushbutton", "other")
+ ],
+ [
+ ("GP39", "gpio"),
+ ("CLK OUT3", "other"),
+ ("MTDCK", "other")
+ ],
+ [
+ ("If PSRAM = OFF", "pwr"),
+ ("GP35", "gpio"),
+ ("FSPIPW", "other")
+ ],
+]
+
+def linear_search(data, target):
+ for tup in data:
+ if target in tup:
+ return tup
+ return None
+
+
+#Hardware coordinates, add your hardware in the format ("name", x, y)
+hwCoordiantes =[("3v3", 50, 145), ("3v3", 10, 81), ("gnd", 560, 145), ("pin_pitch_v", 0, 51), ("pin_pitch_h", 50, 0), ("usb_power", 320, 1435), ("usup", 80, 1140), ("bat", 530, 790), ("disp", 570, 1150), ("SPI", 530, 640)]
+
+#content, x, y, tag, scale, body, leaderline
+#hwCoordiantes =[("3v3", 10, 81), ("3v3", 10, 81), ("gnd", 221, 79), ("pin_pitch_v", 0, 23), ("pin_pitch_h", 30, 0), ("usb_power", 112, 610), ("usup", 0, 476), ("bat", 230, 485)]
+#linear_search(hwCoordiantes, "usb_power")
+graphicPinLabels = [("USB-POWER", linear_search(hwCoordiantes, "usb_power")[1], linear_search(hwCoordiantes, "usb_power")[2], "pwr", (1, 1), {"x": 0, "y": 200, "width": 200, "height": 40}, {"direction": "vh"}),
+ ("μŠup i2c", linear_search(hwCoordiantes, "usup")[1], linear_search(hwCoordiantes, "usup")[2], "i2c", (-1,1), {"x": 100, "y": 0, "width": 200, "height": 40}, None),
+ ("Battery Connector", linear_search(hwCoordiantes, "bat")[1], linear_search(hwCoordiantes, "bat")[2], "pwr", (1, 1), {"x": 100, "y": 0, "width": 250, "height": 40}, None),
+ ("Display Connector", linear_search(hwCoordiantes, "disp")[1], linear_search(hwCoordiantes, "disp")[2], "other", (1, 1), {"x": 100, "y": 0, "width": 300, "height": 40}, None),
+ ("μŠup SPI", linear_search(hwCoordiantes, "SPI")[1], linear_search(hwCoordiantes, "SPI")[2], "spi", (1, 1), {"x": 100, "y": 0, "width": 210, "height": 40}, None)
+
+ ]
+graphicPinLabelGroups = [(linear_search(hwCoordiantes, "gnd")[1], linear_search(hwCoordiantes, "gnd")[2], linear_search(hwCoordiantes, "pin_pitch_v"), (50, 0), (0, 50), (1, 1), right_header, {"height": 38, "width": 200}),
+ (linear_search(hwCoordiantes, "3v3")[1], linear_search(hwCoordiantes, "3v3")[2], linear_search(hwCoordiantes, "pin_pitch_v"),(50, 0), (0, 50), (-1, 1), left_header, {"height": 38, "width": 200})
+ ]
+
+
+# description = """Python tool kit to assist with
+# documentation of electronic hardware.
+# More info at pinout.readthedocs.io"""
+
+
diff --git a/espInk/diagram.svg b/espInk/diagram.svg
new file mode 100644
index 0000000..153d1bc
--- /dev/null
+++ b/espInk/diagram.svg
@@ -0,0 +1,5974 @@
+
+
\ No newline at end of file
diff --git a/esp32_lpkit/styles.css b/styles.css
similarity index 64%
rename from esp32_lpkit/styles.css
rename to styles.css
index e896830..4f541dc 100644
--- a/esp32_lpkit/styles.css
+++ b/styles.css
@@ -1,7 +1,7 @@
text {
font-family: Verdana, Georgia, sans-serif;
- font-size: 14px;
- font-weight: normal;
+ font-size: 30px;
+ font-weight: bold;
}
.pinlabel__leader{
@@ -17,6 +17,10 @@ text {
text-anchor: middle;
}
+.pinlabel__body{
+
+}
+
.i2c .pinlabel__body{
fill: rgb(0, 100, 173);
@@ -26,6 +30,9 @@ text {
}
.i2c .swatch__body {
fill: rgb(0, 100, 173);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
+ scale: (2, 2);
}
.pwr .pinlabel__body{
@@ -36,6 +43,8 @@ text {
}
.pwr .swatch__body {
fill: rgb(173, 0, 0);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.uart .pinlabel__body{
fill: rgb(182, 69, 176);
@@ -45,6 +54,8 @@ text {
}
.uart .swatch__body {
fill: rgb(182, 69, 176);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.gpio .pinlabel__body{
fill: rgb(160, 133, 26);
@@ -54,6 +65,8 @@ text {
}
.gpio .swatch__body {
fill: rgb(160, 133, 26);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.analog .pinlabel__body{
fill: rgb(32, 150, 165);
@@ -63,6 +76,8 @@ text {
}
.analog .swatch__body {
fill: rgb(32, 150, 165);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.gnd .pinlabel__body{
fill: rgb(0, 0, 0);
@@ -72,6 +87,8 @@ text {
}
.gnd .swatch__body {
fill: rgb(0, 0, 0);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.spi .pinlabel__body{
fill: rgb(151, 76, 23);
@@ -81,6 +98,8 @@ text {
}
.spi .swatch__body {
fill: rgb(151, 76, 23);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.touch .pinlabel__body{
fill: rgb(230, 87, 10);
@@ -100,6 +119,8 @@ text {
}
.rtc .swatch__body {
fill: rgb(100, 200, 10);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.other .pinlabel__body{
@@ -110,6 +131,8 @@ text {
}
.other .swatch__body {
fill: rgb(200, 200, 200);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
}
.panel__inner {
@@ -124,7 +147,7 @@ text {
}
.title {
- font-size: 32px;
+ font-size: 64px;
/* font-style: italic; */
}
@@ -138,3 +161,25 @@ text {
.panel--info .panel__inner{
fill: #f4f4f4;
}
+
+
+.scl .swatch__body {
+ fill: rgb(255, 255, 0);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
+ transform: translate(var(--varMoveSwatch),0px);
+}
+
+.sda .swatch__body {
+ fill: rgb(0, 0, 255);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
+ transform: translate(var(--varMoveSwatch),0px);
+}
+
+.mosi .swatch__body {
+ fill: rgb(255, 255, 255);
+ stroke: rgb(0, 0, 0);
+ stroke-width: 4;
+ transform: translate(var(--varMoveSwatch),0px);
+}