Compare commits
No commits in common. "Added-Raspberry-Pi-Pico-W-Pinout-" and "master" have entirely different histories.
Added-Rasp
...
master
BIN
.DS_Store
vendored
|
|
@ -38,7 +38,6 @@
|
|||
D58A102C20FE6C39003B0E93 /* ViewController+Nodes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58A102B20FE6C39003B0E93 /* ViewController+Nodes.swift */; };
|
||||
D5ABE2912146BB2A00AB8237 /* RootPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */; };
|
||||
D5AD52C42136E617007A373F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D5AD52C32136E617007A373F /* Assets.xcassets */; };
|
||||
D5B022B3287D0CBF00598D5E /* PicoWOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B022B2287D0CBF00598D5E /* PicoWOverlay.swift */; };
|
||||
D5F2F4E2208E190D00B0790B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F2F4E1208E190D00B0790B /* AppDelegate.swift */; };
|
||||
D5F2F4E4208E190D00B0790B /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = D5F2F4E3208E190D00B0790B /* art.scnassets */; };
|
||||
D5F2F4E6208E190D00B0790B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F2F4E5208E190D00B0790B /* ViewController.swift */; };
|
||||
|
|
@ -91,7 +90,6 @@
|
|||
D58A102B20FE6C39003B0E93 /* ViewController+Nodes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+Nodes.swift"; sourceTree = "<group>"; };
|
||||
D5ABE2902146BB2A00AB8237 /* RootPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootPageViewController.swift; sourceTree = "<group>"; };
|
||||
D5AD52C32136E617007A373F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
D5B022B2287D0CBF00598D5E /* PicoWOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PicoWOverlay.swift; sourceTree = "<group>"; };
|
||||
D5F2F4DE208E190D00B0790B /* Adafruit AR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Adafruit AR.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D5F2F4E1208E190D00B0790B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
D5F2F4E3208E190D00B0790B /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = "<group>"; };
|
||||
|
|
@ -152,7 +150,6 @@
|
|||
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */,
|
||||
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */,
|
||||
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */,
|
||||
D5B022B2287D0CBF00598D5E /* PicoWOverlay.swift */,
|
||||
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */,
|
||||
295049AB25E6996D003E7484 /* CurvedText.swift */,
|
||||
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */,
|
||||
|
|
@ -336,7 +333,6 @@
|
|||
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */,
|
||||
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */,
|
||||
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */,
|
||||
D5B022B3287D0CBF00598D5E /* PicoWOverlay.swift in Sources */,
|
||||
2948B61A25E6D82D0013781D /* CircleLabel.swift in Sources */,
|
||||
D56ED488213EEC94000E62F0 /* QRViewController.swift in Sources */,
|
||||
D55B075B20FF8DD40066976C /* ViewController+Gesture Recognizers.swift in Sources */,
|
||||
|
|
@ -494,7 +490,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
|
@ -503,7 +499,7 @@
|
|||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.13;
|
||||
MARKETING_VERSION = 1.12;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
|
|
@ -516,7 +512,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
DEVELOPMENT_TEAM = 2X94RM7457;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
|
@ -525,7 +521,7 @@
|
|||
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.13;
|
||||
MARKETING_VERSION = 1.12;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
|
|
|
|||
BIN
Adafruit AR/.DS_Store
vendored
|
|
@ -14,7 +14,7 @@ struct ARScenes {
|
|||
static let minervaScene = SCNScene(named: "art.scnassets/Minerva.scn")!
|
||||
|
||||
static let circuitPlaygroundLabelScene = SCNScene(named: "art.scnassets/CPX_Displays.scn")!
|
||||
static let blmLabelScene = SCNScene(named: "art.scnassets/TestPlane.scn")!
|
||||
static let blmLabelScene = SCNScene(named: "art.scnassets/BLM_Display.scn")!
|
||||
|
||||
//MARK:- Tarot Cards
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ extension BoardViewController {
|
|||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.arVC.view.frame = CGRect(x: 0, y: -13, width: 510, height: 500)
|
||||
self.arVC.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.arVC.view)
|
||||
|
|
@ -98,45 +98,6 @@ extension BoardViewController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
func arPICOWHostingController(for node: SCNNode) {
|
||||
// Do this on the main thread
|
||||
DispatchQueue.main.async {
|
||||
|
||||
// make the hosting VC a child to the main view controller
|
||||
// self.addChildViewController(self.arVC)
|
||||
|
||||
// set the pixel size of the Card View
|
||||
self.picoWVC.view.frame = CGRect(x: 0, y: -20, width: 510, height: 510)
|
||||
|
||||
// add the ar card view as a subview to the main view
|
||||
self.view.addSubview(self.picoWVC.view)
|
||||
|
||||
// render the view on the plane geometry as a material
|
||||
self.showPicoWOverlay(hostingVC: self.picoWVC, on: node)
|
||||
|
||||
self.picoWVC.didMove(toParent: self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
func showPicoWOverlay(hostingVC: UIHostingController<PicoWOverlay>, on node: SCNNode) {
|
||||
// create a new material
|
||||
let material = SCNMaterial()
|
||||
|
||||
// this allows the card to render transparent parts the right way
|
||||
hostingVC.view.isOpaque = false
|
||||
|
||||
// set the diffuse of the material to the view of the Hosting View Controller
|
||||
material.diffuse.contents = hostingVC.view
|
||||
material.lightingModel = .constant
|
||||
// Set the material to the geometry of the node (plane geometry)
|
||||
node.geometry?.materials = [material]
|
||||
|
||||
hostingVC.view.backgroundColor = UIColor.clear
|
||||
}
|
||||
|
||||
|
||||
func arBLMHostingController(for node: SCNNode) {
|
||||
// Do this on the main thread
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
let blmVC = UIHostingController(rootView: BLMBoardOverlay())
|
||||
let teensyVC = UIHostingController(rootView: Teensy41BoardOverlay())
|
||||
let pi400VC = UIHostingController(rootView: Pi400Overlay())
|
||||
let picoWVC = UIHostingController(rootView: PicoWOverlay())
|
||||
|
||||
|
||||
func removeContentController(content: UIViewController) {
|
||||
|
|
@ -55,9 +54,6 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
var minervaPartsLoaded = false
|
||||
|
||||
|
||||
// Test
|
||||
var picoPinout = SCNNode()
|
||||
|
||||
//MARK:- Tarot Cards
|
||||
|
||||
var starCard = SCNNode()
|
||||
|
|
@ -498,7 +494,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
ARObject.position = SCNVector3(planeNode.position.x, planeNode.position.y, planeNode.position.z )
|
||||
ARObject.scale = SCNVector3(x: size.x, y: size.y, z: size.z)
|
||||
// ARObject.eulerAngles.x = -.pi / 2
|
||||
ARObject.eulerAngles.x = -.pi / 2
|
||||
|
||||
planeNode.addChildNode(ARObject)
|
||||
|
||||
|
|
@ -533,7 +529,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
print("Function: \(#function),File: \(#file),Line: \( #line)")
|
||||
_ = SCNMaterial()
|
||||
|
||||
let plane = SCNPlane(width: imageReferenceAnchor.referenceImage.physicalSize.width + 1, height: imageReferenceAnchor.referenceImage.physicalSize.height + 1)
|
||||
let plane = SCNPlane(width: imageReferenceAnchor.referenceImage.physicalSize.width + 0.5, height: imageReferenceAnchor.referenceImage.physicalSize.height + 0.5)
|
||||
|
||||
plane.firstMaterial?.diffuse.contents = UIColor(white: 0, alpha: 0)
|
||||
|
||||
|
|
@ -605,7 +601,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
let planeNode = SCNNode(geometry: plane)
|
||||
planeNode.eulerAngles.x = -.pi / 2
|
||||
//planeNode.position = SCNVector3(x: 0, y: 0, z: 0)
|
||||
|
||||
node.addChildNode(planeNode)
|
||||
|
||||
switch (imageAnchor.referenceImage.name) {
|
||||
|
|
@ -1775,7 +1771,7 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
arHostingController(for: planeNode, textForDialogue: ListOfTexts.heirophantText)
|
||||
|
||||
//MARK: - PICO
|
||||
//MARK:- PICO
|
||||
case "pico4":
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized PICO Board.")
|
||||
|
|
@ -1786,19 +1782,6 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
|
||||
self.arPICOHostingController(for: planeNode)
|
||||
}
|
||||
|
||||
//MARK: PICO-W
|
||||
case "pico-wRef":
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized PICO Board.")
|
||||
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.arPICOWHostingController(for: planeNode)
|
||||
}
|
||||
|
||||
//MARK:- Teensy
|
||||
case "teensy":
|
||||
DispatchQueue.main.async {
|
||||
|
|
@ -1840,26 +1823,15 @@ class BoardViewController: UIViewController, ARSCNViewDelegate {
|
|||
// _ = restartImageTracking
|
||||
//removeContentController(content: blmVC)
|
||||
|
||||
|
||||
|
||||
|
||||
DispatchQueue.main.async {
|
||||
print("Recognized BLM Board.")
|
||||
// self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
//
|
||||
// self.ARObjectToScene(ARObject: self.picoPinout, ARScene: ARScenes.blmLabelScene, planeNode: node, size: SCNVector3(0.5,0.5,0.5))
|
||||
//
|
||||
|
||||
// picoPinout
|
||||
|
||||
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
self.ARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
self.arBLMHostingController(for: planeNode)
|
||||
self.SwiftUIARPlaneAnchor(imageReferenceAnchor: imageAnchor, mainNode: node)
|
||||
|
||||
|
||||
self.arBLMHostingController(for: planeNode)
|
||||
|
||||
}
|
||||
case "cpx":
|
||||
|
|
|
|||
|
|
@ -39,6 +39,92 @@ struct PICOBoardOverlay: View {
|
|||
|
||||
var body: some View {
|
||||
|
||||
let data = [Data(value: "40",prefix:"VBUS", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "39", prefix: "VSYS", fgColor: .white, bgcolor: .red,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "38", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "37", prefix: "3V3_EN", fgColor: .black, bgcolor: .gray, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "36", prefix: "3V3", fgColor: .white, bgcolor: .red, prefix2: "300 mA Max", bgColor2: .black, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "35", prefix: "ADC_VREF", fgColor: .black, bgcolor: .orange, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "34", prefix: "GP28", fgColor: .black, bgcolor: .yellow, prefix2: "PWM6A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "GP28_A2", bgColor5: .orange),
|
||||
|
||||
Data(value: "33", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "32", prefix: "GP27",fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D01", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "GP26_A0", bgColor5: .orange),
|
||||
|
||||
Data(value: "31", prefix: "GP26", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "GP27_A0", bgColor5: .orange),
|
||||
|
||||
Data(value: "30", prefix: "RUN/RESET", fgColor: .black, bgcolor: .gray, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "29", prefix: "GP22", fgColor: .black, bgcolor: .yellow, prefix2: "PWM3A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "28", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "27", prefix: "GP21", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "26", prefix: "GP20", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "25", prefix: "GP19", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "24", prefix: "GP18", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "23", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "22", prefix: "GP17", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "21", prefix: "GP16", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1)))
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let data2 = [Data(value: "1",prefix:"GP0", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "2",prefix:"GP1", fgColor: .black, bgcolor: .yellow, prefix2: "PWM0B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "3", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "4",prefix:"GP2", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "5",prefix:"GP3", fgColor: .black, bgcolor: .yellow, prefix2: "PWM1B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "6",prefix:"GP4", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "7", prefix: "GP5", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "8",prefix:"GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear ,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "9",prefix:"GP6", fgColor: .black, bgcolor: .yellow, prefix2: "PWM3A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "10", prefix: "GP7", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D00", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "11", prefix: "GP8", fgColor: .black, bgcolor: .yellow, prefix2: "PWM4A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "12", prefix: "GP9", fgColor: .black, bgcolor: .yellow, prefix2: "PWM4B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "13", prefix: "GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "14", prefix: "GP10", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "SCK1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "15", prefix: "GP11", fgColor: .black, bgcolor: .yellow, prefix2: "PWM2A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "DI0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX1", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "16", prefix: "GP12", fgColor: .black, bgcolor: .yellow, prefix2: "PWM5B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "D01", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "TX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "17", prefix: "GP13", fgColor: .black, bgcolor: .yellow, prefix2: "PWM6B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS1", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SCL0", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "RX0", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "18", prefix: "GND", fgColor: .white, bgcolor: .black, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
|
||||
|
||||
Data(value: "19", prefix: "GP14", fgColor: .black, bgcolor: .yellow, prefix2: "PWM7A", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "CS0", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "SDA1", bgColor4: Color(#colorLiteral(red: 0.8072112728, green: 0.6713793157, blue: 0.9686274529, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 0.9098039269, green: 0.4784313738, blue: 0.6431372762, alpha: 1))),
|
||||
|
||||
Data(value: "20", prefix: "GP15", fgColor: .black, bgcolor: .yellow, prefix2: "PWM7B", bgColor2: Color(#colorLiteral(red: 0.3326305836, green: 0.9686274529, blue: 0.6167510894, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear)
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
|
@ -48,45 +134,36 @@ struct PICOBoardOverlay: View {
|
|||
RoundedRectangle(cornerRadius: 1, style: .continuous)
|
||||
.fill(Color.clear)
|
||||
.frame(width: 167, height: 272)
|
||||
.border(Color.clear, width: 2)
|
||||
.border(Color.gray, width: 2)
|
||||
.position(x: 250, y: CGFloat(viewY))
|
||||
//.position(x: 250, y: 250)
|
||||
|
||||
// pintOutDEBUGStruct()
|
||||
// .position(x: 250, y: CGFloat(debugY))
|
||||
pintOutDEBUGStruct()
|
||||
.position(x: 250, y: CGFloat(debugY))
|
||||
|
||||
|
||||
|
||||
HStack{
|
||||
|
||||
VStack {
|
||||
Image("PicoPinoutFinal")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 600, height: 395, alignment: .center)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
ForEach(data) { (pinout) in
|
||||
pintOutStruct(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 170, height: 13.5, alignment: .leading)
|
||||
}
|
||||
|
||||
|
||||
// VStack(alignment: .leading) {
|
||||
// ForEach(data) { (pinout) in
|
||||
// pintOutStruct(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
// }
|
||||
// .frame(width: 170, height: 13.5, alignment: .leading)
|
||||
// }
|
||||
//
|
||||
// .position(x: 418, y: CGFloat(viewY))
|
||||
// //.offset(x: 245, y: 23.8)
|
||||
//
|
||||
// VStack(alignment: .trailing) {
|
||||
// ForEach(data2) { (pinout) in
|
||||
// pintOutStruct2(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
// }
|
||||
// .frame(width: 150, height: 1, alignment: .trailing)
|
||||
//
|
||||
// }
|
||||
// .position(x: -161, y: CGFloat(viewY))
|
||||
// //.offset(x: -245, y: 25)
|
||||
|
||||
.position(x: 418, y: CGFloat(viewY))
|
||||
//.offset(x: 245, y: 23.8)
|
||||
|
||||
VStack(alignment: .trailing) {
|
||||
ForEach(data2) { (pinout) in
|
||||
pintOutStruct2(value: pinout.value, prefix: pinout.prefix, fgcolor: pinout.fgColor, bgcolor: pinout.bgcolor, prefix2: pinout.prefix2, bgColor2: pinout.bgColor2, prefix3: pinout.prefix3, bgColor3: pinout.bgColor3, prefix4: pinout.prefix4, bgColor4: pinout.bgColor4, prefix5: pinout.prefix5, bgColor5: pinout.bgColor5)
|
||||
}
|
||||
.frame(width: 150, height: 13.4, alignment: .trailing)
|
||||
|
||||
}
|
||||
.position(x: -161, y: CGFloat(viewY))
|
||||
//.offset(x: -245, y: 25)
|
||||
}
|
||||
}
|
||||
.onAppear(perform: {
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
//
|
||||
// PicoWOverlay.swift
|
||||
// Adafruit AR
|
||||
//
|
||||
// Created by Trevor Beaton on 7/11/22.
|
||||
// Copyright © 2022 Vanguard Logic LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct PicoWOverlay: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image("PicoWPinout1")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 600, height: 360, alignment: .center)
|
||||
|
||||
}
|
||||
.rotationEffect(.degrees(-180))
|
||||
}
|
||||
}
|
||||
|
||||
struct PicoWOverlay_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
PicoWOverlay()
|
||||
}
|
||||
}
|
||||
BIN
Adafruit AR/art.scnassets/.DS_Store
vendored
|
Before Width: | Height: | Size: 858 KiB |
|
Before Width: | Height: | Size: 926 KiB |
BIN
Assets.xcassets/.DS_Store
vendored
BIN
Assets.xcassets/Photos.arresourcegroup/.DS_Store
vendored
|
|
@ -70,9 +70,6 @@
|
|||
{
|
||||
"filename" : "pi400.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "pico-wRef.arreferenceimage"
|
||||
},
|
||||
{
|
||||
"filename" : "pico4.arreferenceimage"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "pico-wRefT14.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"width" : 0.20000000000000001
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.9 MiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoPinout20201.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 926 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoPinoutFinal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 926 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoWPinout.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Assets.xcassets/PicoWPinout.imageset/PicoWPinout.png
vendored
|
Before Width: | Height: | Size: 906 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "PicoWPinout1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 924 KiB |