Compare commits

...

11 commits

Author SHA1 Message Date
TrevKnows
c741d3d80d Removed Blurred View
Removed blurred view for the QR Code reader.
2021-05-30 15:30:03 -04:00
Trevor Beaton
52bee9817a Version 1.12
Rasp.Pi Pico switch
GP11 & GP12
2021-05-27 16:05:51 -04:00
Trevor Beaton
f440dd0c2f Version 1.10.4
Updated image reference for better image tracking.
2021-02-14 12:58:57 -05:00
TrevKnows
3652db65d9
Merge pull request #10 from adafruit/Tarot-Card-Branch
Recent Update
2021-02-08 13:30:40 -05:00
Trevor Beaton
495f7d8480 Recent Update
Completed Tarot Card Reader feature
2021-02-08 13:19:39 -05:00
TrevKnows
c1b559825d ver-1.9.3 bugs removed
Bugs removed.
Py/Edge badge added
Monster Mask
Bluetooth animation added.
2020-03-24 01:48:34 -04:00
TrevKnows
cb4345b2d7 3D Letters R & S Added
Circuit Playground video for R & S is needed. Contact Collin for video links.
2020-03-09 12:08:49 -04:00
Trev_Knows
8fb31810c8 Added CPB and CLUE board
Fixed!
2020-02-19 16:42:25 -05:00
Trev_Knows
8b9468d197 New update
2020 Commit
2020-02-12 15:01:00 -05:00
Trev_Knows
6d77837710 Long over dues commit
Next we will be adding CPB and or, Monster M4Sk along with the new...CLUE!
2020-02-04 14:36:49 -05:00
Trev_Knows
9c5bce1cd2 Long overdue Commit
Functioning. -CPX overlay (present)
2020-01-07 15:27:43 -05:00
169 changed files with 26612 additions and 5112 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -8,11 +8,23 @@
/* Begin PBXBuildFile section */
290439F02292E34200979BAD /* BoardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 290439EF2292E34200979BAD /* BoardViewController.swift */; };
2917003925858C3900E39853 /* BoardViewController+Audio.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2917003825858C3900E39853 /* BoardViewController+Audio.swift */; };
293EC85925E8092C008EB6CA /* Teensy41BoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */; };
2948B61A25E6D82D0013781D /* CircleLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2948B61925E6D82D0013781D /* CircleLabel.swift */; };
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295049AB25E6996D003E7484 /* CurvedText.swift */; };
295049AE25E69AB0003E7484 /* BLMBoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */; };
29546B5B2585B51000002715 /* BoardViewController+HostingController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */; };
297574E025A612E4001991E7 /* SwiftUITarotCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */; };
29897A482569E8330080F4BF /* ARScenes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29897A472569E8330080F4BF /* ARScenes.swift */; };
29897A58256CA76F0080F4BF /* ARWorldAnchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29897A57256CA76F0080F4BF /* ARWorldAnchor.swift */; };
298FD3F62270B4D9007E2F4C /* QRViewController+GestureRec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298FD3F52270B4D9007E2F4C /* QRViewController+GestureRec.swift */; };
298FD3F82270B7A5007E2F4C /* QRViewController+Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298FD3F72270B7A5007E2F4C /* QRViewController+Video.swift */; };
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */; };
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */; };
29AA121D25A9717E0037003B /* ListOfTexts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AA121C25A9717E0037003B /* ListOfTexts.swift */; };
29B109C922933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */; };
29D096292559C71D0032654B /* ClickableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29D096282559C71D0032654B /* ClickableView.swift */; };
D515BADA21FF5826001E7079 /* Highlight SCNNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D515BAD921FF5826001E7079 /* Highlight SCNNode.swift */; };
D516FDB0222DB2D2004D151B /* Adafruit_QR_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D516FDAF222DB2D2004D151B /* Adafruit_QR_Tests.swift */; };
D54801CE217E12E700170412 /* hallowing_eye.mov in Resources */ = {isa = PBXBuildFile; fileRef = D54801CB217E118B00170412 /* hallowing_eye.mov */; };
D54E995B20E155DF0021A2E5 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D54E995A20E155DF0021A2E5 /* Extensions.swift */; };
D55B075B20FF8DD40066976C /* ViewController+Gesture Recognizers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */; };
@ -33,23 +45,6 @@
D5F2F4EE208E190E00B0790B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D5F2F4EC208E190E00B0790B /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
D516FD8F222482DD004D151B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D5F2F4D6208E190D00B0790B /* Project object */;
proxyType = 1;
remoteGlobalIDString = D5F2F4DD208E190D00B0790B;
remoteInfo = "Adafruit AR";
};
D516FDB2222DB2D2004D151B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D5F2F4D6208E190D00B0790B /* Project object */;
proxyType = 1;
remoteGlobalIDString = D5F2F4DD208E190D00B0790B;
remoteInfo = "Adafruit AR";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
D53C6F1A20D2B93C0051A030 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
@ -65,14 +60,23 @@
/* Begin PBXFileReference section */
290439EF2292E34200979BAD /* BoardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoardViewController.swift; sourceTree = "<group>"; };
2917003825858C3900E39853 /* BoardViewController+Audio.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+Audio.swift"; sourceTree = "<group>"; };
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Teensy41BoardOverlay.swift; sourceTree = "<group>"; };
2948B61925E6D82D0013781D /* CircleLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleLabel.swift; sourceTree = "<group>"; };
295049AB25E6996D003E7484 /* CurvedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurvedText.swift; sourceTree = "<group>"; };
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BLMBoardOverlay.swift; sourceTree = "<group>"; };
29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+HostingController.swift"; sourceTree = "<group>"; };
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUITarotCardView.swift; sourceTree = "<group>"; };
29897A472569E8330080F4BF /* ARScenes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARScenes.swift; sourceTree = "<group>"; };
29897A57256CA76F0080F4BF /* ARWorldAnchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARWorldAnchor.swift; sourceTree = "<group>"; };
298FD3F52270B4D9007E2F4C /* QRViewController+GestureRec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "QRViewController+GestureRec.swift"; sourceTree = "<group>"; };
298FD3F72270B7A5007E2F4C /* QRViewController+Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "QRViewController+Video.swift"; sourceTree = "<group>"; };
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PICOBoardOverlay.swift; sourceTree = "<group>"; };
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pi400Overlay.swift; sourceTree = "<group>"; };
29AA121C25A9717E0037003B /* ListOfTexts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOfTexts.swift; sourceTree = "<group>"; };
29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BoardViewController+Gesture Recognizers.swift"; sourceTree = "<group>"; };
29D096282559C71D0032654B /* ClickableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClickableView.swift; sourceTree = "<group>"; };
D515BAD921FF5826001E7079 /* Highlight SCNNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Highlight SCNNode.swift"; sourceTree = "<group>"; };
D516FD8A222482DC004D151B /* Adafruit ARTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Adafruit ARTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
D516FDAD222DB2D2004D151B /* Adafruit QR Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Adafruit QR Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
D516FDAF222DB2D2004D151B /* Adafruit_QR_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Adafruit_QR_Tests.swift; sourceTree = "<group>"; };
D516FDB1222DB2D2004D151B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D54801CB217E118B00170412 /* hallowing_eye.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = hallowing_eye.mov; sourceTree = "<group>"; };
D54E995A20E155DF0021A2E5 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+Gesture Recognizers.swift"; sourceTree = "<group>"; };
@ -96,20 +100,6 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D516FD87222482DC004D151B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D516FDAA222DB2D2004D151B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F2F4DB208E190D00B0790B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -134,6 +124,7 @@
isa = PBXGroup;
children = (
D515BAD921FF5826001E7079 /* Highlight SCNNode.swift */,
29897A57256CA76F0080F4BF /* ARWorldAnchor.swift */,
D55F682E20BF2CA3005219D9 /* FocusSquare.swift */,
D55F682F20BF2CA4005219D9 /* Utilities.swift */,
D55B076020FF99230066976C /* WorldPosition.swift */,
@ -156,20 +147,22 @@
isa = PBXGroup;
children = (
290439EF2292E34200979BAD /* BoardViewController.swift */,
297574DF25A612E4001991E7 /* SwiftUITarotCardView.swift */,
29A07E9625C0CB9F006219C9 /* PICOBoardOverlay.swift */,
293EC85825E8092C008EB6CA /* Teensy41BoardOverlay.swift */,
29A83D2425EEC3F60018BEAB /* Pi400Overlay.swift */,
295049AB25E6996D003E7484 /* CurvedText.swift */,
295049AD25E69AB0003E7484 /* BLMBoardOverlay.swift */,
2917003825858C3900E39853 /* BoardViewController+Audio.swift */,
2948B61925E6D82D0013781D /* CircleLabel.swift */,
29546B5A2585B51000002715 /* BoardViewController+HostingController.swift */,
29AA121C25A9717E0037003B /* ListOfTexts.swift */,
29897A472569E8330080F4BF /* ARScenes.swift */,
29B109C822933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift */,
);
path = "Board Scan View Controller";
sourceTree = "<group>";
};
D516FDAE222DB2D2004D151B /* Adafruit QR Tests */ = {
isa = PBXGroup;
children = (
D516FDAF222DB2D2004D151B /* Adafruit_QR_Tests.swift */,
D516FDB1222DB2D2004D151B /* Info.plist */,
);
path = "Adafruit QR Tests";
sourceTree = "<group>";
};
D53C6F1C20D2D1A70051A030 /* Frameworks */ = {
isa = PBXGroup;
children = (
@ -193,7 +186,6 @@
D5F2F4EC208E190E00B0790B /* LaunchScreen.storyboard */,
D5F2F4EF208E190E00B0790B /* Info.plist */,
D54801CD217E12C200170412 /* Video */,
D516FDAE222DB2D2004D151B /* Adafruit QR Tests */,
D5F2F4DF208E190D00B0790B /* Products */,
D53C6F1C20D2D1A70051A030 /* Frameworks */,
);
@ -203,8 +195,6 @@
isa = PBXGroup;
children = (
D5F2F4DE208E190D00B0790B /* Adafruit AR.app */,
D516FD8A222482DC004D151B /* Adafruit ARTests.xctest */,
D516FDAD222DB2D2004D151B /* Adafruit QR Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -217,6 +207,7 @@
D58A102B20FE6C39003B0E93 /* ViewController+Nodes.swift */,
D55B075C20FF934B0066976C /* ViewController+Audio.swift */,
D55B075A20FF8DD40066976C /* ViewController+Gesture Recognizers.swift */,
29D096282559C71D0032654B /* ClickableView.swift */,
29F7FDE62295B25600F15B0E /* Board Scan View Controller */,
291E63D9227C6E0E00F77AB5 /* QR Code View Controller */,
291E63DA227C8E9800F77AB5 /* Resources */,
@ -230,42 +221,6 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D516FD89222482DC004D151B /* Adafruit ARTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D516FD91222482DD004D151B /* Build configuration list for PBXNativeTarget "Adafruit ARTests" */;
buildPhases = (
D516FD86222482DC004D151B /* Sources */,
D516FD87222482DC004D151B /* Frameworks */,
D516FD88222482DC004D151B /* Resources */,
);
buildRules = (
);
dependencies = (
D516FD90222482DD004D151B /* PBXTargetDependency */,
);
name = "Adafruit ARTests";
productName = "Adafruit ARTests";
productReference = D516FD8A222482DC004D151B /* Adafruit ARTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
D516FDAC222DB2D2004D151B /* Adafruit QR Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D516FDB4222DB2D2004D151B /* Build configuration list for PBXNativeTarget "Adafruit QR Tests" */;
buildPhases = (
D516FDA9222DB2D2004D151B /* Sources */,
D516FDAA222DB2D2004D151B /* Frameworks */,
D516FDAB222DB2D2004D151B /* Resources */,
);
buildRules = (
);
dependencies = (
D516FDB3222DB2D2004D151B /* PBXTargetDependency */,
);
name = "Adafruit QR Tests";
productName = "Adafruit QR Tests";
productReference = D516FDAD222DB2D2004D151B /* Adafruit QR Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
D5F2F4DD208E190D00B0790B /* Adafruit AR */ = {
isa = PBXNativeTarget;
buildConfigurationList = D5F2F4F2208E190E00B0790B /* Build configuration list for PBXNativeTarget "Adafruit AR" */;
@ -292,20 +247,9 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Vanguard Logic LLC";
TargetAttributes = {
D516FD89222482DC004D151B = {
CreatedOnToolsVersion = 10.1;
LastSwiftMigration = 1010;
ProvisioningStyle = Automatic;
TestTargetID = D5F2F4DD208E190D00B0790B;
};
D516FDAC222DB2D2004D151B = {
CreatedOnToolsVersion = 10.1;
ProvisioningStyle = Automatic;
TestTargetID = D5F2F4DD208E190D00B0790B;
};
D5F2F4DD208E190D00B0790B = {
CreatedOnToolsVersion = 9.2;
ProvisioningStyle = Automatic;
@ -331,27 +275,11 @@
projectRoot = "";
targets = (
D5F2F4DD208E190D00B0790B /* Adafruit AR */,
D516FD89222482DC004D151B /* Adafruit ARTests */,
D516FDAC222DB2D2004D151B /* Adafruit QR Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D516FD88222482DC004D151B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D516FDAB222DB2D2004D151B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F2F4DC208E190D00B0790B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -384,61 +312,46 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D516FD86222482DC004D151B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D516FDA9222DB2D2004D151B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D516FDB0222DB2D2004D151B /* Adafruit_QR_Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D5F2F4DA208E190D00B0790B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D54E995B20E155DF0021A2E5 /* Extensions.swift in Sources */,
29AA121D25A9717E0037003B /* ListOfTexts.swift in Sources */,
297574E025A612E4001991E7 /* SwiftUITarotCardView.swift in Sources */,
D5F2F4E6208E190D00B0790B /* ViewController.swift in Sources */,
D55F683020BF2CA4005219D9 /* FocusSquare.swift in Sources */,
D5ABE2912146BB2A00AB8237 /* RootPageViewController.swift in Sources */,
29897A482569E8330080F4BF /* ARScenes.swift in Sources */,
D55B075D20FF934B0066976C /* ViewController+Audio.swift in Sources */,
D583C69D215BF2DB00256EB1 /* pageThree.swift in Sources */,
D55B076120FF99230066976C /* WorldPosition.swift in Sources */,
298FD3F62270B4D9007E2F4C /* QRViewController+GestureRec.swift in Sources */,
29D096292559C71D0032654B /* ClickableView.swift in Sources */,
29897A58256CA76F0080F4BF /* ARWorldAnchor.swift in Sources */,
D515BADA21FF5826001E7079 /* Highlight SCNNode.swift in Sources */,
29A07E9725C0CB9F006219C9 /* PICOBoardOverlay.swift in Sources */,
29A83D2525EEC3F60018BEAB /* Pi400Overlay.swift in Sources */,
295049AC25E6996D003E7484 /* CurvedText.swift in Sources */,
2948B61A25E6D82D0013781D /* CircleLabel.swift in Sources */,
D56ED488213EEC94000E62F0 /* QRViewController.swift in Sources */,
D55B075B20FF8DD40066976C /* ViewController+Gesture Recognizers.swift in Sources */,
290439F02292E34200979BAD /* BoardViewController.swift in Sources */,
29546B5B2585B51000002715 /* BoardViewController+HostingController.swift in Sources */,
298FD3F82270B7A5007E2F4C /* QRViewController+Video.swift in Sources */,
295049AE25E69AB0003E7484 /* BLMBoardOverlay.swift in Sources */,
D55F683120BF2CA4005219D9 /* Utilities.swift in Sources */,
D5F2F4E2208E190D00B0790B /* AppDelegate.swift in Sources */,
D58A102C20FE6C39003B0E93 /* ViewController+Nodes.swift in Sources */,
293EC85925E8092C008EB6CA /* Teensy41BoardOverlay.swift in Sources */,
29B109C922933CE9004D6D58 /* BoardViewController+Gesture Recognizers.swift in Sources */,
D56ED486213EE255000E62F0 /* MainViewController.swift in Sources */,
2917003925858C3900E39853 /* BoardViewController+Audio.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
D516FD90222482DD004D151B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D5F2F4DD208E190D00B0790B /* Adafruit AR */;
targetProxy = D516FD8F222482DD004D151B /* PBXContainerItemProxy */;
};
D516FDB3222DB2D2004D151B /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D5F2F4DD208E190D00B0790B /* Adafruit AR */;
targetProxy = D516FDB2222DB2D2004D151B /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
D5F2F4E7208E190D00B0790B /* Main.storyboard */ = {
isa = PBXVariantGroup;
@ -459,85 +372,6 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
D516FD92222482DD004D151B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2X94RM7457;
INFOPLIST_FILE = "Adafruit ARTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "Adafruit-Industries-LLC.Adafruit-ARTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Adafruit AR/Adafruit ARTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Adafruit AR.app/Adafruit AR";
};
name = Debug;
};
D516FD93222482DD004D151B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2X94RM7457;
INFOPLIST_FILE = "Adafruit ARTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "Adafruit-Industries-LLC.Adafruit-ARTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Adafruit AR/Adafruit ARTests-Bridging-Header.h";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Adafruit AR.app/Adafruit AR";
};
name = Release;
};
D516FDB5222DB2D2004D151B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2X94RM7457;
INFOPLIST_FILE = "Adafruit QR Tests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "Adafruit-Industries-LLC.Adafruit-QR-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Adafruit AR.app/Adafruit AR";
};
name = Debug;
};
D516FDB6222DB2D2004D151B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2X94RM7457;
INFOPLIST_FILE = "Adafruit QR Tests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "Adafruit-Industries-LLC.Adafruit-QR-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Adafruit AR.app/Adafruit AR";
};
name = Release;
};
D5F2F4F0208E190E00B0790B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -563,6 +397,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -588,7 +423,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -622,6 +457,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -641,7 +477,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@ -654,14 +490,16 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 2X94RM7457;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
);
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.12;
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
@ -674,14 +512,16 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = 2X94RM7457;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
);
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
IPHONEOS_DEPLOYMENT_TARGET = 14.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.12;
PRODUCT_BUNDLE_IDENTIFIER = "com.adafruit.adafruit-AR";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
@ -692,24 +532,6 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D516FD91222482DD004D151B /* Build configuration list for PBXNativeTarget "Adafruit ARTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D516FD92222482DD004D151B /* Debug */,
D516FD93222482DD004D151B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D516FDB4222DB2D2004D151B /* Build configuration list for PBXNativeTarget "Adafruit QR Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D516FDB5222DB2D2004D151B /* Debug */,
D516FDB6222DB2D2004D151B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D5F2F4D9208E190D00B0790B /* Build configuration list for PBXProject "Adafruit AR" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5F2F4DD208E190D00B0790B"
BuildableName = "Adafruit AR.app"
BlueprintName = "Adafruit AR"
ReferencedContainer = "container:Adafruit AR.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "NO"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D516FD89222482DC004D151B"
BuildableName = "Adafruit ARTests.xctest"
BlueprintName = "Adafruit ARTests"
ReferencedContainer = "container:Adafruit AR.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5F2F4DD208E190D00B0790B"
BuildableName = "Adafruit AR.app"
BlueprintName = "Adafruit AR"
ReferencedContainer = "container:Adafruit AR.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5F2F4DD208E190D00B0790B"
BuildableName = "Adafruit AR.app"
BlueprintName = "Adafruit AR"
ReferencedContainer = "container:Adafruit AR.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "A80A0774-8D69-4477-93F3-E114422EBB24"
type = "1"
version = "2.0">
</Bucket>

View file

@ -10,5 +10,13 @@
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>D5F2F4DD208E190D00B0790B</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

BIN
Adafruit AR/.DS_Store vendored

Binary file not shown.

View file

@ -24,25 +24,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
self.window?.rootViewController = vc
self.window?.makeKeyAndVisible()
print(#function)
return true
}
func applicationWillResignActive(_ application: UIApplication) {
print(#function)
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
print(#function)
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
print(#function)
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
print(#function)
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,43 @@
//
// Constants.swift
// Adafruit AR
//
// Created by Trevor Beaton on 11/21/20.
// Copyright © 2020 Adafruit. All rights reserved.
//
import Foundation
import ARKit
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/BLM_Display.scn")!
//MARK:- Tarot Cards
static let temperanceCardScene = SCNScene(named: "art.scnassets/temperanceCard.scn")!
static let starCardScene = SCNScene(named: "art.scnassets/starCard.scn")!
static let WOFCardScene = SCNScene(named: "art.scnassets/WOFCard.scn")!
static let judgementCardScene = SCNScene(named: "art.scnassets/judgementCard.scn")!
static let deathCardScene = SCNScene(named: "art.scnassets/deathCard.scn")!
static let hermitCardScene = SCNScene(named: "art.scnassets/hermitCard.scn")!
static let pentacleCardScene = SCNScene(named: "art.scnassets/pentacleCard.scn")!
// MARK:- Update 1.10.1
static let thmCardScene = SCNScene(named: "art.scnassets/Cards1.10/thmCard.scn")!
static let devilCardScene = SCNScene(named: "art.scnassets/Cards1.10/devilCard.scn")!
static let justiceCardScene = SCNScene(named: "art.scnassets/Cards1.10/justiceCard.scn")!
static let loversCardScene = SCNScene(named: "art.scnassets/Cards1.10/loversCard.scn")!
static let moonCardScene = SCNScene(named: "art.scnassets/Cards1.10/moonCard.scn")!
static let sunCardScene = SCNScene(named: "art.scnassets/Cards1.10/sunCard.scn")!
static let towerCardScene = SCNScene(named: "art.scnassets/Cards1.10/towerCard.scn")!
static let worldCardScene = SCNScene(named: "art.scnassets/Cards1.10/worldCard.scn")!
static let minervaText = SCNScene(named: "art.scnassets/textMinerva.scn")!
}

View file

@ -0,0 +1,53 @@
//
// BLMBoardOverlay.swift
// Adafruit AR
//
// Created by Trevor Beaton on 2/24/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import SwiftUI
struct BLMBoardOverlay: View {
@State private var ZAxisRotation = false
var foreverAnimation: Animation {
Animation.linear(duration: 5.0)
.repeatForever(autoreverses: false)
}
var body: some View {
ZStack{
CircleText(radius: 100, text: " BLACK L IVES M ATTER BLACK L IVES M ATTER ", kerning: 0)
}
// .rotation3DEffect(Angle.degrees(ZAxisRotation ? -180 : 0), axis: (x: 0, y: 0, z: 1))
// .animation(ZAxisRotation ? foreverAnimation : .default)
// .onAppear(){
// self.ZAxisRotation.toggle()
// }
// .rotationEffect(.degrees(ZAxisRotation ? 360: 0))
// .animation(ZAxisRotation ? foreverAnimation : .default)
// .onAppear(){
// self.ZAxisRotation.toggle()
// }
// .rotationEffect(Angle(degrees: ZAxisRotation ? 360 : 0))
// .animation(ZAxisRotation ? foreverAnimation : .none)
// .onAppear(){
// self.ZAxisRotation.toggle()
// }
}
}
struct BLMBoardOverlay_Previews: PreviewProvider {
static var previews: some View {
BLMBoardOverlay()
}
}

View file

@ -0,0 +1,358 @@
//
// BoardViewController+Audio.swift
// Adafruit AR
//
// Created by Trevor Beaton on 12/12/20.
// Copyright © 2020 Vanguard Logic LLC. All rights reserved.
//
import AVFoundation
extension BoardViewController {
func playTemperanceAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/when things are easy.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playStarAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/today why is more.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playDeathAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/use great caution.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playWOFAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/a good gauge.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playJudgementAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/if the spectrum is.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playHermitAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/filtering out noise.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playFourOfCoinAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/the best listeners.wav", ofType:nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playthmAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/footprints.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playtowerAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/misinformation.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playloversAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/just because there is.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playsunAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/make a megaphone.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playmoonAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/motion is noise.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playjusticeAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/not every container.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playworldAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/power to change.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playdevilAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/you've got the power.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playfoolAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/the process is more.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playpriestessAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/sometimes building a mistake.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playstrengthAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/showing up on time.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
func playmagicianAudio() {
let path = Bundle.main.path(forResource: "art.scnassets/wav/sometimes its not going.wav", ofType: nil)!
let url = URL(fileURLWithPath: path)
do {
audioPlayer = try AVAudioPlayer(contentsOf: url)
audioPlayer?.isMeteringEnabled = true
guard let audioPlayer = audioPlayer else { return }
audioPlayer.prepareToPlay()
audioPlayer.play()
} catch let error as NSError {
print(error.description)
}
}
}

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor B on 4/24/19.
// Copyright © 2019 Vanguard Logic LLC. All rights reserved.
// Copyright © 2019 Adafruit. All rights reserved.
//
import UIKit
@ -11,6 +11,7 @@ import ARKit
import SceneKit
extension BoardViewController {
//Gesture Recognizers & Actions

View file

@ -0,0 +1,229 @@
//
// BoardViewController+HostingControllers.swift
// Adafruit AR
//
// Created by Trevor Beaton on 12/12/20.
// Copyright © 2020 Vanguard Logic LLC. All rights reserved.
//
import ARKit
import SwiftUI
extension BoardViewController {
func arHostingController(for node: SCNNode, textForDialogue: [String]) {
// create a hosting controller with SwiftUI view
let arVC = UIHostingController(rootView: SwiftUITarotCardView(minervaDialogue: textForDialogue))
// Do this on the main thread
DispatchQueue.main.async {
arVC.willMove(toParent: self)
// make the hosting VC a child to the main view controller
self.addChildViewController(arVC)
// set the pixel size of the Card View
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(arVC.view)
// render the view on the plane geometry as a material
self.show(hostingVC: arVC, on: node)
}
}
func show(hostingVC: UIHostingController<SwiftUITarotCardView>, 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 arPICOHostingController(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.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)
// render the view on the plane geometry as a material
self.showOverlay(hostingVC: self.arVC, on: node)
// self.arVC.willMove(toParent: self)
self.arVC.didMove(toParent: self)
}
}
func showOverlay(hostingVC: UIHostingController<PICOBoardOverlay>, 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
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.blmVC.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.blmVC.view)
// render the view on the plane geometry as a material
self.showBLMOverlay(hostingVC: self.blmVC, on: node)
// self.arVC.willMove(toParent: self)
self.blmVC.didMove(toParent: self)
}
}
func showBLMOverlay(hostingVC: UIHostingController<BLMBoardOverlay>, 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 arTeensy41HostingController(for node: SCNNode) {
print(#function)
// 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.teensyVC.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.teensyVC.view)
// render the view on the plane geometry as a material
self.showTeensyOverlay(hostingVC: self.teensyVC, on: node)
// self.arVC.willMove(toParent: self)
self.teensyVC.didMove(toParent: self)
}
}
func showTeensyOverlay(hostingVC: UIHostingController<Teensy41BoardOverlay>, on node: SCNNode) {
print(#function)
DispatchQueue.main.async {
// 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 arpi400HostingController(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.pi400VC.view.frame = CGRect(x: 0, y: 0, width: 1000, height: 500)
// add the ar card view as a subview to the main view
self.view.addSubview(self.pi400VC.view)
// render the view on the plane geometry as a material
self.showpi400Overlay(hostingVC: self.pi400VC, on: node)
// self.arVC.willMove(toParent: self)
self.pi400VC.didMove(toParent: self)
}
}
func showpi400Overlay(hostingVC: UIHostingController<Pi400Overlay>, 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
}
}

View file

@ -0,0 +1,92 @@
//
// CircleLabel.swift
// Adafruit AR
//
// Created by Trevor Beaton on 2/24/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import Foundation
import SwiftUI
struct CircleText_Preview: PreviewProvider {
static var previews: some View {
CircleText(radius: 200, text: "Dwarves Foundation Looking for Golang, FE candidates")
}
}
//MARK: - CircleLabel
struct CircleText: View {
var radius: Double
var text: String
var kerning: CGFloat = 0.0
private var texts: [(offset: Int, element:Character)] {
return Array(text.enumerated())
}
@State var textSizes: [Int:Double] = [:]
var body: some View {
ZStack {
ForEach(self.texts, id: \.self.offset) { (offset, element) in
VStack {
Text(String(element))
.font(.title2)
.bold()
.foregroundColor(Color.yellow)
.kerning(self.kerning)
.background(Sizeable())
.onPreferenceChange(WidthPreferenceKey.self, perform: { size in
self.textSizes[offset] = Double(size)
})
Spacer()
}
.rotationEffect(self.angle(at: offset))
}
}
.rotationEffect(-self.angle(at: self.texts.count-1)/2)
.frame(width: 230, height: 230, alignment: .center)
}
private func angle(at index: Int) -> Angle {
guard let labelSize = textSizes[index] else {return .radians(0)}
let percentOfLabelInCircle = labelSize / radius.perimeter
let labelAngle = 2 * Double.pi * percentOfLabelInCircle
let totalSizeOfPreChars = textSizes.filter{$0.key < index}.map{$0.value}.reduce(0,+)
let percenOfPreCharInCircle = totalSizeOfPreChars / radius.perimeter
let angleForPreChars = 2 * Double.pi * percenOfPreCharInCircle
return .radians(angleForPreChars + labelAngle)
}
}
extension Double {
var perimeter: Double {
return self * 2 * .pi
}
}
//Get size for label helper
struct WidthPreferenceKey: PreferenceKey {
typealias Value = CGFloat
static var defaultValue = CGFloat(0)
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
value = nextValue()
}
}
struct Sizeable: View {
var body: some View {
GeometryReader { geometry in
Color.clear
.preference(key: WidthPreferenceKey.self, value: geometry.size.width)
}
}
}

View file

@ -0,0 +1,26 @@
//
// CurvedText.swift
// Adafruit AR
//
// Created by Trevor Beaton on 2/24/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import SwiftUI
struct CurvedText: View {
var body: some View {
RoundedRectangle(cornerRadius: 1, style: .continuous)
.fill(Color.clear)
.frame(width: 200, height: 200)
.border(Color.gray, width: 2)
.position(x: 250, y: 250)
}
}
struct CurvedText_Previews: PreviewProvider {
static var previews: some View {
CurvedText()
}
}

View file

@ -0,0 +1,66 @@
//
// ListOfTexts.swift
// Adafruit AR
//
// Created by Trevor Beaton on 1/9/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import Foundation
struct ListOfTexts {
//MARK:- Text For Update #3
static let foolText = ["Ah! Looks like you have a tarot card!","Ah yes. The Fool Card.","Some new beginnings also brings struggle, but just remember...","The process is more important than the end result of goals.","That was fun! Do you have another?", ""]
static let priestessText = ["Hehe! Looks like you have a tarot card!","Hmmm....The Priestess Card.","Trust your instinct...even if you build mistakes.", "Sometime building a mistake...is better than not building at all.","That was fun! Do you have another?", ""]
static let strengthText = ["Ah! Looks like you have a tarot card!","Ah yes. The Strength Card.","You will be called upon to show up...", "Showing up on time, is just as important as arriving prepared.","That was fun! Do you have another?", ""]
static let magicianText = ["Ah! Looks like you have a tarot card!","Hmmm. The Magician Card.","This card has a way of changing your mood for the better! But...","Sometimes it's not going to change...unless you do.","That was fun! Do you have another?", ""]
static let chariotText = ["Ah! Looks like you have a tarot card!","Ah yes. The Chariot Card.","Now is a time to go for what you really want.", "There may be many obstacles in your path but if you stay focused, you'll be successful!","That was fun! Do you have another?", ""]
static let emperorText = ["Ah! Looks like you have a tarot card!"," The Emperor Card.","This card represents a powerful leader who demands respect and authority.","You create law and order by applying principles or guidelines to a specific situation.","That was fun! Do you have another?", ""]
static let empressText = ["Ah! Looks like you have a tarot card!","Ah yes. The Empress Card.","This card signifies a strong connection to your creative expressions.", "Connect with your senses through taste, touch, sound, smell and sight.","That was fun! Do you have another?", ""]
static let heirophantText = ["Ah! Looks like you have a tarot card!","Ah yes. The Hierophant Card.","This card represents a necessity to follow existing conventions and rules.","Rather than breaking norms, be familiar with different traditions and beliefs.","That was fun! Do you have another?", ""]
//MARK:- Text For Update #2
static let tHMText = ["Ah! Looks like you have a tarot card!","The card of The Hanged Man.","Only you can release the power within.", "Footprints are not always reliable...make your own!","That was fun! Do you have another?", ""]
static let towerText = ["Ah! Looks like you have a tarot card!","The card of the Tower.","Be very mindful of your safety.", "Misinformation...is more dangerous than no information.","That was fun! Do you have another?", ""]
static let loversText = ["Ah! Looks like you have a tarot card!","The card of the Lovers!"," This card represents seeking balance behind the gates within.", "Just because there is a gate...doesn't mean it locked...","That was fun! Do you have another?", ""]
static let sunText = ["Ah! Looks like you have a tarot card!","Ah card of the Sun!"," You will find that people are drawn to the happy vibes and positive energy you are giving out.", "Why not make a megaphone! To whisper into.","That was fun! Do you have another?", ""]
static let justiceText = ["Ah! Looks like you have a tarot card!","The card of Justice!","Think about your actions towards others. ", "Not every container is static free...","That was fun! Do you have another?", ""]
static let moonText = ["Ah! Looks like you have a tarot card!","The card of the Moon!","This card tells me that you should pay attention to your dreams!", "Motion is noise. Stay still when possible.","That was fun! Do you have another?", ""]
static let worldText = ["Ah! Looks like you have a tarot card!","The card of the Hermit!","Looks like you will have the world at your feet!", "The power to change, is not the power to charge...","That was fun! Do you have another?", ""]
static let devilText = ["Ah! Looks like you have a tarot card!","Oh! The Devil Card!","You control of your own destiny and are not bound by anything.", "You've got the power!...as long as it doesn't go off the rails...","That was fun! Do you have another?", ""]
//MARK:- Text For Update #1
static let temperanceText = ["Ah! Looks like you have a tarot card!","Hoho! This is the card of Temperance.","When things are easy, prepare for the hard things...", "...be sure to keep balance in life.","That was fun! Do you have another?", ""]
static let starText = ["Ah! Looks like you have a tarot card!","Hmmm...This is the Star card!", "Today, why is more important than what.","That was fun! Do you have another?", ""]
static let deathText = ["Ah! Looks like you have a tarot card!","Oh! The Death Card.","Dont fear! This card symbolizes the end of a long journey.", "Use great caution with things at their lifespan.","That was fun! Do you have another?", ""]
static let WOFText = ["Ah! Looks like you have a tarot card!","This card is the Wheel Of Fortune!","A good gauge, can also be a bind.", "As the wheel of fortune turns, expect some setbacks.","That was fun! Do you have another?", ""]
static let judgementText = ["Ah! Looks like you have a tarot card!","Hmmm...This is card of Judgement!","If the spectrum is crowded, move to another!", "If you find yourself at a crossroads, trust your judgement and know that youre on the right path.","That was fun! Do you have another?", ""]
static let hermitText = ["Ah! Looks like you have a tarot card!","The card of the Hermit!","At times, we filter out noise for clarity...", "...filtering out noise is the start, not the end.","That was fun! Do you have another?", ""]
static let fourOfCoinText = ["Ah! Looks like you have a tarot card!","Ah...The Four Of Coin.","The best listeners hear the best things...","Fortune comes to those who listen.","That was fun! Do you have another?", ""]
}

View file

@ -0,0 +1,371 @@
//
// PICOBoardOverlay.swift
// Adafruit AR
//
// Created by Trevor Beaton on 1/26/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import SwiftUI
struct Data: Identifiable {
let id = UUID()
let value: String
let prefix: String
let fgColor: Color
let bgcolor: Color
let prefix2: String
let bgColor2: Color
let prefix3: String
let bgColor3: Color
let prefix4: String
let bgColor4: Color
let prefix5: String
let bgColor5: Color
}
struct PICOBoardOverlay: View {
@State private var viewY = 0
@State private var debugY = 0
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)
]
ZStack{
//Border
RoundedRectangle(cornerRadius: 1, style: .continuous)
.fill(Color.clear)
.frame(width: 167, height: 272)
.border(Color.gray, width: 2)
.position(x: 250, y: CGFloat(viewY))
//.position(x: 250, y: 250)
pintOutDEBUGStruct()
.position(x: 250, y: CGFloat(debugY))
HStack{
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: 13.4, alignment: .trailing)
}
.position(x: -161, y: CGFloat(viewY))
//.offset(x: -245, y: 25)
}
}
.onAppear(perform: {
if UIDevice.current.userInterfaceIdiom == .phone {
//iPhone
viewY = 217
debugY = 370
}else {
//iPad
viewY = 250
debugY = 400
}
})
.rotationEffect(.degrees(-180))
}
}
struct pintOutDEBUGStruct: View {
var body: some View {
VStack(alignment: .trailing){
Text("SWCLK")
.font(.system(size: 7))
.fontWeight(.black)
.foregroundColor(.black)
.background(Color.gray)
.padding(0.2)
Text("GND")
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(Color.white)
.background(Color.black)
.padding(0.2)
Text("SWDI0")
.font(.system(size: 7))
.fontWeight(.black)
.foregroundColor(Color.black)
.background(Color.gray)
.padding(0.2)
}
.rotationEffect(.degrees(-90))
}
}
struct pintOutStruct: View {
let value: String
let prefix: String
let fgcolor: Color
let bgcolor: Color
let prefix2: String
let bgColor2: Color
let prefix3: String
let bgColor3: Color
let prefix4: String
let bgColor4: Color
let prefix5: String
let bgColor5: Color
var body: some View {
HStack(spacing: 4.0){
Text(value)
.font(.system(size: 8))
.fontWeight(.semibold)
.foregroundColor(.white)
.multilineTextAlignment(.trailing)
.background(Color.gray)
Text(prefix)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgcolor)
// .font(.custom("Helvetica Neue", size: 10))
Text(prefix2)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor2)
// .font(.custom("Helvetica Neue", size: 10))
Text(prefix3)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor3)
Text(prefix4)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor4)
Text(prefix5)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor5)
}
}
}
struct pintOutStruct2: View {
let value: String
let prefix: String
let fgcolor: Color
let bgcolor: Color
let prefix2: String
let bgColor2: Color
let prefix3: String
let bgColor3: Color
let prefix4: String
let bgColor4: Color
let prefix5: String
let bgColor5: Color
var body: some View {
HStack(spacing: 4.0){
Text(prefix5)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor5)
Text(prefix4)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor4)
.cornerRadius(25)
Text(prefix3)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor3)
Text(prefix2)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgColor2)
Text(prefix)
.font(.system(size: 8))
.fontWeight(.black)
.foregroundColor(fgcolor)
.background(bgcolor)
Text(value)
.font(.system(size: 8))
.fontWeight(.semibold)
.foregroundColor(.white)
.multilineTextAlignment(.trailing)
.foregroundColor(.black)
.background(Color.gray)
}
}
}
struct PICOBoardOverlay_Previews: PreviewProvider {
static var previews: some View {
PICOBoardOverlay()
.previewDevice(PreviewDevice(rawValue: "iPad Pro (11-inch) (2nd generation)"))
.previewDisplayName("iPhone 11 Max")
}
}

View file

@ -0,0 +1,314 @@
//
// PICOBoardOverlay.swift
// Adafruit AR
//
// Created by Trevor Beaton on 1/26/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import SwiftUI
struct pi400Data: Identifiable {
let id = UUID()
let pinOutLabel: String
let pinOutBGcolor: Color
let pinOutFGcolor: Color
let pinOutLabel2: String
let pinOutBGcolor2: Color
let pinOutFGcolor2: Color
let GPIONumber: String
let circleColor: Color
}
struct Pi400Overlay: View {
@State private var viewY = 0
@State private var debugY = 0
var body: some View {
let pi400DataFirstRow = [
pi400Data(pinOutLabel: "5V", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
pi400Data(pinOutLabel: "5V", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 14", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(TXD)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "8", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 15", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(RXD)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "10", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 18", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_CLK", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "12", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 23", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "16", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 24", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "18", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 25", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "22", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 8", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(CE0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "24", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 7", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(CE1)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "26", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 1", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(ID_SC)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "28", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 12", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(PWM0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "32", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 16", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "36", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 20", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_DIN", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "38", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 21", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_OUT", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "40", circleColor: .yellow),
]
let pi400DataSecondRow = [
pi400Data(pinOutLabel: "3V3", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
pi400Data(pinOutLabel: "GPIO 2", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SDA)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "3", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 3", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SCL)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "5", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 4", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(GPCLK0)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "7", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 17", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "11", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 27", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "13", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 22", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "15", circleColor: .yellow),
pi400Data(pinOutLabel: "3V3", pinOutBGcolor: Color(#colorLiteral(red: 1, green: 0.3383003439, blue: 0.348613691, alpha: 1)), pinOutFGcolor: .white, pinOutLabel2: "Power", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .red),
pi400Data(pinOutLabel: "GPIO 10", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(MOSI)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "19", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 9", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(MISO)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "21", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 11", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(SCLK)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "23", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black),
pi400Data(pinOutLabel: "GPIO 0", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(ID_SC)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "27", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 5", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "29", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 6", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "31", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 13", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "(PWM1)", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "33", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 19", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "PCM_FS", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "35", circleColor: .yellow),
pi400Data(pinOutLabel: "GPIO 26", pinOutBGcolor: Color(#colorLiteral(red: 0.9994240403, green: 0.9855536819, blue: 0, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "37", circleColor: .yellow),
pi400Data(pinOutLabel: "Ground", pinOutBGcolor: Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)), pinOutFGcolor: .black, pinOutLabel2: "", pinOutBGcolor2: .clear, pinOutFGcolor2: .blue, GPIONumber: "", circleColor: .black)
]
VStack{
HStack() {
ForEach(pi400DataFirstRow) { (pinout) in
pi400GPIOUpperRow(pinOutLabel: pinout.pinOutLabel, pinOutBGcolor: pinout.pinOutBGcolor, pinOutFGcolor: pinout.pinOutFGcolor, pinOutLabel2: pinout.pinOutLabel2, pinOutBGcolor2: pinout.pinOutBGcolor2, pinOutFGcolor2: pinout.pinOutFGcolor2, GPIONumber: pinout.GPIONumber, circleColor: pinout.circleColor)
}
.frame(width: 12, height: 40)
}
.position(x: 0, y: -50)
HStack() {
ForEach(pi400DataSecondRow) { (pinout) in
pi400GPIOLowerRow(pinOutLabel: pinout.pinOutLabel, pinOutBGcolor: pinout.pinOutBGcolor, pinOutFGcolor: pinout.pinOutFGcolor, pinOutLabel2: pinout.pinOutLabel2, pinOutBGcolor2: pinout.pinOutBGcolor2, pinOutFGcolor2: pinout.pinOutFGcolor2, GPIONumber: pinout.GPIONumber, circleColor: pinout.circleColor)
}
.frame(width: 12, height: 40)
}
.position(x: 0, y: 25)
}
.onAppear(perform: {
if UIDevice.current.userInterfaceIdiom == .phone {
//iPhone
viewY = 220
}else {
//iPad
viewY = 255
}
})
.fixedSize(horizontal: true, vertical: true)
// .rotationEffect(.degrees(-90))
}
struct pi400GPIOUpperRow: View {
let pinOutLabel: String
let pinOutBGcolor: Color
let pinOutFGcolor: Color
let pinOutLabel2: String
let pinOutBGcolor2: Color
let pinOutFGcolor2: Color
let GPIONumber: String
let circleColor: Color
var body: some View {
VStack{
VStack{
Text(pinOutLabel)
.foregroundColor(pinOutFGcolor)
.font(.system(size: 8))
.fontWeight(.bold)
.frame(width: 35, height: 10)
.background(pinOutBGcolor)
Text(pinOutLabel2)
.foregroundColor(pinOutFGcolor)
.font(.system(size: 6))
.fontWeight(.medium)
.frame(width: 35, height: 10)
.background(pinOutBGcolor)
}
.rotationEffect(.degrees(-90))
//Circle Group
ZStack {
//Circle
Circle()
.foregroundColor(circleColor)
//Text within the circle
Text(GPIONumber)
.font(.system(size: 10))
.fontWeight(.regular)
}
.frame(width: 15, height: 15)
.padding(.top, 5)
// Rectangle()
// .frame(width: 2, height: 70)
}
}
}
struct pi400GPIOLowerRow: View {
let pinOutLabel: String
let pinOutBGcolor: Color
let pinOutFGcolor: Color
let pinOutLabel2: String
let pinOutBGcolor2: Color
let pinOutFGcolor2: Color
let GPIONumber: String
let circleColor: Color
var body: some View {
VStack{
//Circle Group
ZStack {
//Circle
Circle()
.foregroundColor(circleColor)
//Text within the circle
Text(GPIONumber)
.font(.system(size: 10))
.fontWeight(.medium)
}
.frame(width: 15, height: 15)
.padding(.bottom, 5)
VStack{
Text(pinOutLabel)
.foregroundColor(pinOutFGcolor)
.font(.system(size: 8))
.fontWeight(.bold)
.frame(width: 35, height: 10)
.background(pinOutBGcolor)
Text(pinOutLabel2)
.foregroundColor(pinOutFGcolor)
.font(.system(size: 6))
.fontWeight(.medium)
.frame(width: 35, height: 10)
.background(pinOutBGcolor)
}
.rotationEffect(.degrees(-90))
}
}
}
struct Pi400Overlay_Previews: PreviewProvider {
static var previews: some View {
Pi400Overlay()
.previewDevice(PreviewDevice(rawValue: "iPad Pro (11-inch) (2nd generation)"))
.previewDisplayName("iPad Pro (11-inch) (2nd generation)")
}
}
}

View file

@ -0,0 +1,97 @@
import SwiftUI
import UIKit
import AVFoundation
@available(iOS 13.0, *)
struct SwiftUITarotCardView: View {
let minervaDialogue : [String]
@State var displayText = ""
@State private var introTextOpacity = 0.0
func minervaSpeech() {
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[0]
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[1]
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[2]
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[3]
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[4]
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
self.displayText = self.minervaDialogue[5]
}
}
}
}
}
}
}
var body: some View {
ZStack {
ZStack {
if #available(iOS 14.0, *) {
Text(displayText)
.foregroundColor(.white)
.font(.title)
.fontWeight(.bold)
.transition(.opacity)
.rotationEffect(.degrees(-180))
.offset(x: 0, y: -200)
.onAppear(perform: {
minervaSpeech()
})
}
}
}
}
struct SwiftUITarotCardView_Previews: PreviewProvider {
@available(iOS 13.0.0, *)
static var previews: some View {
SwiftUITarotCardView(minervaDialogue: [""])
}
}
}

View file

@ -0,0 +1,195 @@
//
// PICOBoardOverlay.swift
// Adafruit AR
//
// Created by Trevor Beaton on 1/26/21.
// Copyright © 2021 Vanguard Logic LLC. All rights reserved.
//
import SwiftUI
struct Teensy41BoardOverlay: View {
@State private var viewY = 0
@State private var debugY = 0
var body: some View {
let data = [
Data(value: "",prefix:"Vin (3.6 to 5.5 Volts)", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "",prefix:"3.3V (250 mA max)", fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "23", prefix: "A9", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CRX1", bgColor2: Color(#colorLiteral(red: 1, green: 0.6997302593, blue: 0.8755037922, alpha: 1)), prefix3: "MCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "22", prefix: "A8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CTX1", bgColor2: Color(#colorLiteral(red: 1, green: 0.6997302593, blue: 0.8755037922, alpha: 1)), prefix3: " ", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "21", prefix: "A7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX5", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "BCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "20", prefix: "A6", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX5", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "LRCLK1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "19", prefix: "A5", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "SCL", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "18", prefix: "A4", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "SDA", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "17", prefix: "A3", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX4", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "SDA1", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "16", prefix: "A2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX4", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "SCL1", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "15", prefix: "A1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "RX3", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "S/PDIF IN", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "14", prefix: "A0", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "TX3", bgColor2: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix3: "S/PDIF OUT", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "13", prefix: "(LED)", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "SCK", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: " ", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "41",prefix:"A17", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "", bgColor2:.clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "40",prefix:"A16", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "", bgColor2:.clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "39", prefix: "A15", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "MISO1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "OUT1A", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "38", prefix: "A14", fgColor: .black, bgcolor: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)), prefix2: "CS1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "IN1", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "37", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "CS", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "36", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "CS", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "35", prefix: "TX8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "34", prefix: "RX8", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.8178200382, green: 0.6525374868, blue: 1, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "33", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "MCLK2", bgColor3: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)), prefix4: "", bgColor4: .clear,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)))
]
let data2 = [
Data(value: "",prefix:"GND", fgColor: .white, bgcolor: .black,prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "0",prefix:"RX1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: "CS1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "CRX2", bgColor3: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "1",prefix:"TX1", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: "MISO1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "CTX2", bgColor3: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "2",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "3",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "LRCLK2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "4",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "BCLK2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "5",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "IN2", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "6",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1D", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "7",prefix:"RX2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1A", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "8",prefix:"TX2", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "IN1", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "9",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: " ", bgColor2: .clear, prefix3: " ", bgColor3: .clear, prefix4: "OUT1C", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "10",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "CS", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "OUT1D", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "11",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "MOSI", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "CTX1", bgColor4: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1)) ,prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "12",prefix:" ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2:.clear, prefix3: "MISO", bgColor3: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix4: "MQSL", bgColor4: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "",prefix:"3.3V",fgColor: .white, bgcolor: .red, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "", bgColor5: .clear),
Data(value: "24", prefix: "A10", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "TX6", bgColor2: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix3: "SCL2", bgColor3: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "25", prefix: "A11", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "RX6", bgColor2: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix3: "SDA2", bgColor3: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix4: "PWM", bgColor4: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "26", prefix: "A12", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "MOSI1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9411764741, green: 0.4980392158, blue: 0.3529411852, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "27", prefix: "A13", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.9568627477, green: 0.6588235497, blue: 0.5450980663, alpha: 1)), prefix2: "SCK1", bgColor2: Color(#colorLiteral(red: 0.721568644, green: 0.8862745166, blue: 0.5921568871, alpha: 1)), prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.9411764741, green: 0.4980392158, blue: 0.3529411852, alpha: 1)),prefix5: "", bgColor5: .clear),
Data(value: "28", prefix: "RX7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "29", prefix: "TX7", fgColor: .black, bgcolor: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)), prefix2: " ", bgColor2: .clear, prefix3: "", bgColor3: Color(#colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1)), prefix4: "", bgColor4: Color(#colorLiteral(red: 0.7311126544, green: 0.6819911648, blue: 0.9686274529, alpha: 1)),prefix5: "PWM", bgColor5: Color(#colorLiteral(red: 1, green: 0.7205477193, blue: 0.5445609691, alpha: 1))),
Data(value: "30", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "CRX3", bgColor5: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1))),
Data(value: "31", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "CTX3", bgColor5: Color(#colorLiteral(red: 1, green: 0.7170018578, blue: 0.7933105978, alpha: 1))),
Data(value: "32", prefix: " ", fgColor: .black, bgcolor: .clear, prefix2: "", bgColor2: .clear, prefix3: "", bgColor3: .clear, prefix4: "", bgColor4: .clear,prefix5: "OUT1B", bgColor5: Color(#colorLiteral(red: 0.9764705896, green: 0.850980401, blue: 0.5490196347, alpha: 1)))
]
ZStack{
//Border
RoundedRectangle(cornerRadius: 1, style: .continuous)
.fill(Color.clear)
.frame(width: 140, height: 282.5)
.border(Color.gray, width: 2)
.position(x: 250, y: CGFloat(viewY))
HStack{
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: 150, height: 11.8, alignment: .leading)
}
.position(x: 395, y: CGFloat(viewY))
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: 11.8, alignment: .trailing)
}
.position(x: -148, y: CGFloat(viewY))
}
}
.onAppear(perform: {
if UIDevice.current.userInterfaceIdiom == .phone {
//iPhone
viewY = 220
}else {
//iPad
viewY = 255
}
})
.rotationEffect(.degrees(-180))
}
}
struct Teensy41BoardOverlay_Previews: PreviewProvider {
static var previews: some View {
Teensy41BoardOverlay()
.previewDevice(PreviewDevice(rawValue: "iPhone 12 Pro Max"))
.previewDisplayName("iPhone 12 Pro Max")
}
}

View file

@ -0,0 +1,98 @@
//
// ClickableView.swift
// Adafruit AR
//
// Created by Trevor Beaton on 11/9/20.
// Copyright © 2020 Adafruit. All rights reserved.
//
import UIKit
@IBDesignable
final class ClickableView: UIButton {
let degrees = 180.0
override init(frame: CGRect) {
super.init(frame: frame)
self.addTarget(self, action: #selector(objectTapped(_:)), for: .touchUpInside)
setupViews()
//self.backgroundColor = .red
setupButtonStyle()
self.setTitle("Tap me", for: .normal)
self.setTitle("Pressed + Hold", for: .highlighted)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func awakeFromNib() {
setupButtonStyle()
}
func setupButtonStyle(){
let radians = CGFloat(degrees * .pi / 180)
// translate
var transform = CATransform3DMakeTranslation(0, 0, 0)
// rotate
transform = CATransform3DRotate(transform, radians, 0.0, 0.0, 1.0)
// apply the transforms
self.layer.transform = transform
self.layer.backgroundColor = UIColor.clear.cgColor
self.layer.borderColor = UIColor.cyan.cgColor
self.titleLabel?.font = UIFont(name: "Avenir", size: 30)
self.layer.borderWidth = 4.0
self.layer.cornerRadius = self.layer.bounds.size.width / 2
// self.layer.transform = CATransform3DMakeTranslation(90, 50, 0)
// self.layer.button.addTarget(self, action: #selector(buttonAction), for: .touchUpInside)
//self.layer.transform = CATransform3DMakeRotation(radians, 0.0, 0.0, 1.0)
}
let contentView: UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: 25, height: 25))
view.layer.borderWidth = 3.0
// view.layer.backgroundColor = UIColor.clear.cgColor
view.layer.borderColor = UIColor.red.cgColor
//view.alpha = 0.2
view.isOpaque = false
view.backgroundColor = UIColor(white: 0, alpha: 0)
return view
}()
let contentViewdos: UIView = {
let view = UIView(frame: CGRect(x: 0, y: -20, width: 25, height: 25))
view.layer.borderWidth = 3.0
view.transform = CGAffineTransform(translationX: 0, y: -25)
// view.layer.backgroundColor = UIColor.clear.cgColor
view.layer.borderColor = UIColor.red.cgColor
//view.alpha = 0.2
view.isOpaque = false
view.backgroundColor = UIColor(white: 0, alpha: 0)
return view
}()
func setupViews() {
self.addSubview(contentView)
self.addSubview(contentViewdos)
}
/// Detects Which Object Was Tapped
///
/// - Parameter sender: UIButton
@objc func objectTapped(_ sender: UIButton){
print("Object With Tag \(tag)")
}
}

View file

@ -6,14 +6,19 @@
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
//
import Foundation
import ARKit
import UIKit
class MainViewController: UIViewController {
class MainViewController: UIViewController, ARSCNViewDelegate {
let appVersion = Bundle.main.infoDictionary!["CFBundleShortVersionString"]
@IBOutlet weak var boardView: ARSCNView!
@IBOutlet weak var qrModeIcon: UIButton!
@IBOutlet weak var qrLabel: UILabel!
@ -32,6 +37,15 @@ class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
versionString()
let scene = SCNScene()
// Set the view's delegate
boardView.delegate = self
boardView.session.delegate = self as? ARSessionDelegate
boardView.scene = scene
}

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor B on 4/24/19.
// Copyright © 2019 Vanguard Logic LLC. All rights reserved.
// Copyright © 2019 Adafruit. All rights reserved.
//
import UIKit

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor Beaton on 9/4/18.
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
// Copyright © 2018 Adafruit. All rights reserved.
//
import UIKit
@ -369,7 +369,7 @@ class QRViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet weak var qrInfoDisplayButton: UIButton!
@IBOutlet weak var addedBlurEffect: UIVisualEffectView!
//@IBOutlet weak var addedBlurEffect: UIVisualEffectView!
@IBOutlet weak var touchLightButton: UIButton!
@ -380,7 +380,7 @@ class QRViewController: UIViewController, ARSCNViewDelegate {
// Interface Builder Actions
@IBAction func qrInfoButtonAction(_ sender: UIButton) {
animateOut()
addedBlurEffect.isUserInteractionEnabled = false
// addedBlurEffect.isUserInteractionEnabled = false
}
@IBAction func qrInfoIcon(_ sender: UIButton) {
@ -408,11 +408,11 @@ class QRViewController: UIViewController, ARSCNViewDelegate {
qrCodeInfoDisplay.layer.cornerRadius = 10
addedBlurEffect.isUserInteractionEnabled = false
// addedBlurEffect.isUserInteractionEnabled = false
effect = addedBlurEffect.effect
// effect = addedBlurEffect.effect
addedBlurEffect.effect = nil
// addedBlurEffect.effect = nil
registerTapRecognizer()
@ -504,7 +504,7 @@ class QRViewController: UIViewController, ARSCNViewDelegate {
qrCodeInfoDisplay.alpha = 0
UIView.animate(withDuration: 0.4) {
self.addedBlurEffect.effect = self.effect
// self.addedBlurEffect.effect = self.effect
self.qrCodeInfoDisplay.alpha = 1
self.qrCodeInfoDisplay.transform = CGAffineTransform.identity
}
@ -515,14 +515,14 @@ class QRViewController: UIViewController, ARSCNViewDelegate {
self.qrCodeInfoDisplay.transform = CGAffineTransform.init(scaleX: 1.3, y: 1.3)
self.qrCodeInfoDisplay.alpha = 0
self.addedBlurEffect.effect = nil
// self.addedBlurEffect.effect = nil
}) { (success:Bool) in
for subview in self.addedBlurEffect.subviews {
if subview is UIVisualEffectView {
subview.removeFromSuperview()
}
}
// for subview in self.addedBlurEffect.subviews {
// if subview is UIVisualEffectView {
// subview.removeFromSuperview()
// }
// }
}
}

View file

@ -0,0 +1,26 @@
import UIKit
import ARKit
import SceneKit
class ARWorldAnchor: ARAnchor {
init(column0: SIMD4<Float> = [1, 0, 0, 0],
column1: SIMD4<Float> = [0, 1, 0, 0],
column2: SIMD4<Float> = [0, 0, 1, 0],
column3: SIMD4<Float> = [0, 0, 0, 1]) {
let transform = simd_float4x4(columns: (column0,
column1,
column2,
column3))
let worldAnchor = ARAnchor(name: "World Anchor", transform: transform)
super.init(anchor: worldAnchor)
}
required init(anchor: ARAnchor) {
super.init(anchor: anchor)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
fatalError("Hasn't been implemented yet...")
}
}

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor Beaton on 7/18/18.
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
// Copyright © 2018 Adafruit. All rights reserved.
//
import UIKit

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor Beaton on 7/18/18.
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
// Copyright © 2018 Adafruit. All rights reserved.
//
import UIKit

View file

@ -3,7 +3,7 @@
// Adafruit AR
//
// Created by Trevor Beaton on 7/17/18.
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
// Copyright © 2018 Adafruit. All rights reserved.
//

View file

@ -2,7 +2,7 @@
// Adafruit AR
//
// Created by Trevor Beaton on 4/23/18.
// Copyright © 2018 Vanguard Logic LLC. All rights reserved.
// Copyright © Adafruit. All rights reserved.
//
import ARKit

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,40 +0,0 @@
//
// Adafruit_QR_Tests.swift
// Adafruit QR Tests
//
// Created by Trevor Beaton on 3/4/19.
// Copyright © 2019 Vanguard Logic LLC. All rights reserved.
//
import XCTest
@testable import Adafruit_AR
class Adafruit_QR_Tests: XCTestCase {
var qrCodeLink: QRViewController!
override func setUp() {
qrCodeLink = QRViewController()
qrCodeLink.functionToTest()
}
override func tearDown() {
qrCodeLink = nil
}
func videoIsTested() {
XCTAssertEqual(qrCodeLink.productsLoaded, 2, "Test")
}
}

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

Binary file not shown.

View file

@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -1,13 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "CPX-QRCode_v2.jpg"
"filename" : "CPX-QRCode_v2.jpg",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"width" : 0.20000000000000001

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "Screen Shot 2021-01-10 at 11.16.53 PM.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"width" : 0.20000000000000001
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

88
Assets.xcassets/Photos.arresourcegroup/Contents.json Executable file → Normal file
View file

@ -1,9 +1,15 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"resources" : [
{
"filename" : "backBLM.arreferenceimage"
},
{
"filename" : "ChariotCard.arreferenceimage"
},
{
"filename" : "CPX-QRCode_v2.arreferenceimage"
},
@ -13,20 +19,98 @@
{
"filename" : "CrickitQRCode_v2.arreferenceimage"
},
{
"filename" : "DevilCard.arreferenceimage"
},
{
"filename" : "EmperorCard.arreferenceimage"
},
{
"filename" : "EmpressCard.arreferenceimage"
},
{
"filename" : "fist.arreferenceimage"
},
{
"filename" : "FOCCard.arreferenceimage"
},
{
"filename" : "FoolCard.arreferenceimage"
},
{
"filename" : "GC-3.arreferenceimage"
},
{
"filename" : "HallowingQRcode_v2.arreferenceimage"
},
{
"filename" : "HeirophantCard.arreferenceimage"
},
{
"filename" : "HermitCard.arreferenceimage"
},
{
"filename" : "JudgementCard.arreferenceimage"
},
{
"filename" : "JusticeCard.arreferenceimage"
},
{
"filename" : "LoversCard.arreferenceimage"
},
{
"filename" : "MagicianCard.arreferenceimage"
},
{
"filename" : "MoonCard.arreferenceimage"
},
{
"filename" : "NeoTrellis_v2.arreferenceimage"
},
{
"filename" : "pi400.arreferenceimage"
},
{
"filename" : "pico4.arreferenceimage"
},
{
"filename" : "picoBoard.arreferenceimage"
},
{
"filename" : "portal2.arreferenceimage"
},
{
"filename" : "PriestessCard.arreferenceimage"
},
{
"filename" : "pyportal.arreferenceimage"
},
{
"filename" : "StarCard.arreferenceimage"
},
{
"filename" : "StrengthCard.arreferenceimage"
},
{
"filename" : "SunCard.arreferenceimage"
},
{
"filename" : "teensy.arreferenceimage"
},
{
"filename" : "TemperanceCard.arreferenceimage"
},
{
"filename" : "THMCard.arreferenceimage"
},
{
"filename" : "TowerCard.arreferenceimage"
},
{
"filename" : "WOFCard.arreferenceimage"
},
{
"filename" : "WorldCard.arreferenceimage"
}
]
}

Some files were not shown because too many files have changed in this diff Show more