summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--I2C/I2C.xcodeproj/project.pbxproj563
-rw-r--r--I2C/I2C.xcodeproj/project.xcworkspace/contents.xcworkspacedata7
-rw-r--r--I2C/I2C.xcodeproj/project.xcworkspace/xcuserdata/nsrddyn.xcuserdatad/UserInterfaceState.xcuserstatebin38407 -> 0 bytes
-rw-r--r--I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist56
-rw-r--r--I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcschemes/xcschememanagement.plist14
-rw-r--r--I2C/I2C/Assets.xcassets/AccentColor.colorset/Contents.json11
-rw-r--r--I2C/I2C/Assets.xcassets/AppIcon.appiconset/Contents.json35
-rw-r--r--I2C/I2C/Assets.xcassets/Contents.json6
-rw-r--r--I2C/I2C/ContentView.swift17
-rw-r--r--I2C/I2C/I2CApp.swift10
-rw-r--r--I2C/I2C/Preview Content/Preview Assets.xcassets/Contents.json6
-rw-r--r--I2C/I2CTests/I2CTests.swift17
-rw-r--r--I2C/I2CUITests/I2CUITests.swift42
-rw-r--r--I2C/I2CUITests/I2CUITestsLaunchTests.swift33
-rw-r--r--README.md4
-rw-r--r--bin/__pycache__/source.cpython-313.pycbin5737 -> 0 bytes
-rw-r--r--bin/display.c27
-rw-r--r--bin/i2c.py5
-rw-r--r--bin/main.py109
-rw-r--r--bin/source.py106
-rw-r--r--webGUI/index.html (renamed from webconsole/index.html)14
-rw-r--r--webGUI/main.mjs1
-rw-r--r--webGUI/pages/stats.html14
-rw-r--r--webGUI/styles.css32
-rw-r--r--webconsole/main.js0
-rw-r--r--webconsole/styles.css8
26 files changed, 194 insertions, 943 deletions
diff --git a/I2C/I2C.xcodeproj/project.pbxproj b/I2C/I2C.xcodeproj/project.pbxproj
deleted file mode 100644
index cbc3848..0000000
--- a/I2C/I2C.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,563 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 77;
- objects = {
-
-/* Begin PBXContainerItemProxy section */
- C9D669792CDF68E50085062E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = C9D669602CDF68E30085062E /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = C9D669672CDF68E30085062E;
- remoteInfo = I2C;
- };
- C9D669832CDF68E50085062E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = C9D669602CDF68E30085062E /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = C9D669672CDF68E30085062E;
- remoteInfo = I2C;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- C9D669682CDF68E30085062E /* I2C.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = I2C.app; sourceTree = BUILT_PRODUCTS_DIR; };
- C9D669782CDF68E50085062E /* I2CTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = I2CTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- C9D669822CDF68E50085062E /* I2CUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = I2CUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFileSystemSynchronizedRootGroup section */
- C9D6696A2CDF68E30085062E /* I2C */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- path = I2C;
- sourceTree = "<group>";
- };
- C9D6697B2CDF68E50085062E /* I2CTests */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- path = I2CTests;
- sourceTree = "<group>";
- };
- C9D669852CDF68E50085062E /* I2CUITests */ = {
- isa = PBXFileSystemSynchronizedRootGroup;
- path = I2CUITests;
- sourceTree = "<group>";
- };
-/* End PBXFileSystemSynchronizedRootGroup section */
-
-/* Begin PBXFrameworksBuildPhase section */
- C9D669652CDF68E30085062E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D669752CDF68E50085062E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D6697F2CDF68E50085062E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- C9D6695F2CDF68E30085062E = {
- isa = PBXGroup;
- children = (
- C9D6696A2CDF68E30085062E /* I2C */,
- C9D6697B2CDF68E50085062E /* I2CTests */,
- C9D669852CDF68E50085062E /* I2CUITests */,
- C9D669692CDF68E30085062E /* Products */,
- );
- sourceTree = "<group>";
- };
- C9D669692CDF68E30085062E /* Products */ = {
- isa = PBXGroup;
- children = (
- C9D669682CDF68E30085062E /* I2C.app */,
- C9D669782CDF68E50085062E /* I2CTests.xctest */,
- C9D669822CDF68E50085062E /* I2CUITests.xctest */,
- );
- name = Products;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- C9D669672CDF68E30085062E /* I2C */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C9D6698C2CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2C" */;
- buildPhases = (
- C9D669642CDF68E30085062E /* Sources */,
- C9D669652CDF68E30085062E /* Frameworks */,
- C9D669662CDF68E30085062E /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- fileSystemSynchronizedGroups = (
- C9D6696A2CDF68E30085062E /* I2C */,
- );
- name = I2C;
- packageProductDependencies = (
- );
- productName = I2C;
- productReference = C9D669682CDF68E30085062E /* I2C.app */;
- productType = "com.apple.product-type.application";
- };
- C9D669772CDF68E50085062E /* I2CTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C9D6698F2CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2CTests" */;
- buildPhases = (
- C9D669742CDF68E50085062E /* Sources */,
- C9D669752CDF68E50085062E /* Frameworks */,
- C9D669762CDF68E50085062E /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- C9D6697A2CDF68E50085062E /* PBXTargetDependency */,
- );
- fileSystemSynchronizedGroups = (
- C9D6697B2CDF68E50085062E /* I2CTests */,
- );
- name = I2CTests;
- packageProductDependencies = (
- );
- productName = I2CTests;
- productReference = C9D669782CDF68E50085062E /* I2CTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- C9D669812CDF68E50085062E /* I2CUITests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C9D669922CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2CUITests" */;
- buildPhases = (
- C9D6697E2CDF68E50085062E /* Sources */,
- C9D6697F2CDF68E50085062E /* Frameworks */,
- C9D669802CDF68E50085062E /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- C9D669842CDF68E50085062E /* PBXTargetDependency */,
- );
- fileSystemSynchronizedGroups = (
- C9D669852CDF68E50085062E /* I2CUITests */,
- );
- name = I2CUITests;
- packageProductDependencies = (
- );
- productName = I2CUITests;
- productReference = C9D669822CDF68E50085062E /* I2CUITests.xctest */;
- productType = "com.apple.product-type.bundle.ui-testing";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- C9D669602CDF68E30085062E /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = 1;
- LastSwiftUpdateCheck = 1610;
- LastUpgradeCheck = 1610;
- TargetAttributes = {
- C9D669672CDF68E30085062E = {
- CreatedOnToolsVersion = 16.1;
- };
- C9D669772CDF68E50085062E = {
- CreatedOnToolsVersion = 16.1;
- TestTargetID = C9D669672CDF68E30085062E;
- };
- C9D669812CDF68E50085062E = {
- CreatedOnToolsVersion = 16.1;
- TestTargetID = C9D669672CDF68E30085062E;
- };
- };
- };
- buildConfigurationList = C9D669632CDF68E30085062E /* Build configuration list for PBXProject "I2C" */;
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = C9D6695F2CDF68E30085062E;
- minimizedProjectReferenceProxies = 1;
- preferredProjectObjectVersion = 77;
- productRefGroup = C9D669692CDF68E30085062E /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- C9D669672CDF68E30085062E /* I2C */,
- C9D669772CDF68E50085062E /* I2CTests */,
- C9D669812CDF68E50085062E /* I2CUITests */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- C9D669662CDF68E30085062E /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D669762CDF68E50085062E /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D669802CDF68E50085062E /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- C9D669642CDF68E30085062E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D669742CDF68E50085062E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- C9D6697E2CDF68E50085062E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- C9D6697A2CDF68E50085062E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = C9D669672CDF68E30085062E /* I2C */;
- targetProxy = C9D669792CDF68E50085062E /* PBXContainerItemProxy */;
- };
- C9D669842CDF68E50085062E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = C9D669672CDF68E30085062E /* I2C */;
- targetProxy = C9D669832CDF68E50085062E /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- C9D6698A2CDF68E50085062E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- 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;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu17;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 18.1;
- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- C9D6698B2CDF68E50085062E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- 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;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = YES;
- GCC_C_LANGUAGE_STANDARD = gnu17;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 18.1;
- LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
- MTL_ENABLE_DEBUG_INFO = NO;
- MTL_FAST_MATH = YES;
- SDKROOT = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- C9D6698D2CDF68E50085062E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_ASSET_PATHS = "\"I2C/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_KEY_CFBundleDisplayName = "I2C Controller";
- INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
- INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
- INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchScreen_Generation = YES;
- INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDarkContent;
- INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2C;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = YES;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- C9D6698E2CDF68E50085062E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_ASSET_PATHS = "\"I2C/Preview Content\"";
- ENABLE_PREVIEWS = YES;
- GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_KEY_CFBundleDisplayName = "I2C Controller";
- INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
- INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
- INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchScreen_Generation = YES;
- INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDarkContent;
- INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
- INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2C;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = YES;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
- C9D669902CDF68E50085062E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- GENERATE_INFOPLIST_FILE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 18.1;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2CTests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = NO;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/I2C.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/I2C";
- };
- name = Debug;
- };
- C9D669912CDF68E50085062E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- GENERATE_INFOPLIST_FILE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 18.1;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2CTests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = NO;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/I2C.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/I2C";
- };
- name = Release;
- };
- C9D669932CDF68E50085062E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- GENERATE_INFOPLIST_FILE = YES;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2CUITests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = NO;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_TARGET_NAME = I2C;
- };
- name = Debug;
- };
- C9D669942CDF68E50085062E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
- GENERATE_INFOPLIST_FILE = YES;
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = nsrddyn.I2CUITests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_EMIT_LOC_STRINGS = NO;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_TARGET_NAME = I2C;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- C9D669632CDF68E30085062E /* Build configuration list for PBXProject "I2C" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C9D6698A2CDF68E50085062E /* Debug */,
- C9D6698B2CDF68E50085062E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- C9D6698C2CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2C" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C9D6698D2CDF68E50085062E /* Debug */,
- C9D6698E2CDF68E50085062E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- C9D6698F2CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2CTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C9D669902CDF68E50085062E /* Debug */,
- C9D669912CDF68E50085062E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- C9D669922CDF68E50085062E /* Build configuration list for PBXNativeTarget "I2CUITests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- C9D669932CDF68E50085062E /* Debug */,
- C9D669942CDF68E50085062E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = C9D669602CDF68E30085062E /* Project object */;
-}
diff --git a/I2C/I2C.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/I2C/I2C.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 919434a..0000000
--- a/I2C/I2C.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "self:">
- </FileRef>
-</Workspace>
diff --git a/I2C/I2C.xcodeproj/project.xcworkspace/xcuserdata/nsrddyn.xcuserdatad/UserInterfaceState.xcuserstate b/I2C/I2C.xcodeproj/project.xcworkspace/xcuserdata/nsrddyn.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 1bc2255..0000000
--- a/I2C/I2C.xcodeproj/project.xcworkspace/xcuserdata/nsrddyn.xcuserdatad/UserInterfaceState.xcuserstate
+++ /dev/null
Binary files differ
diff --git a/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
deleted file mode 100644
index cdf9fd2..0000000
--- a/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Bucket
- uuid = "E25B4326-8E67-45A7-85E6-44F99F067B3F"
- type = "1"
- version = "2.0">
- <Breakpoints>
- <BreakpointProxy
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
- <BreakpointContent
- uuid = "CDFF4D12-343E-452F-9711-F46A454AB787"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "I2C/ContentView.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "12"
- endingLineNumber = "12"
- landmarkName = "body"
- landmarkType = "24">
- </BreakpointContent>
- </BreakpointProxy>
- <BreakpointProxy
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
- <BreakpointContent
- uuid = "D2C0A7B9-3CCF-4EDE-B649-263CFF06097B"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "I2CUITests/I2CUITests.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "19"
- endingLineNumber = "19"
- landmarkName = "I2CUITests"
- landmarkType = "3">
- </BreakpointContent>
- </BreakpointProxy>
- <BreakpointProxy
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
- <BreakpointContent
- uuid = "6C3E354D-791E-455C-800E-B7B183E2E52D"
- shouldBeEnabled = "Yes"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "I2C/I2CApp.swift"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "8"
- endingLineNumber = "8"
- landmarkName = "body"
- landmarkType = "24">
- </BreakpointContent>
- </BreakpointProxy>
- </Breakpoints>
-</Bucket>
diff --git a/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcschemes/xcschememanagement.plist b/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index c90753b..0000000
--- a/I2C/I2C.xcodeproj/xcuserdata/nsrddyn.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,14 +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>SchemeUserState</key>
- <dict>
- <key>I2C.xcscheme_^#shared#^_</key>
- <dict>
- <key>orderHint</key>
- <integer>0</integer>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/I2C/I2C/Assets.xcassets/AccentColor.colorset/Contents.json b/I2C/I2C/Assets.xcassets/AccentColor.colorset/Contents.json
deleted file mode 100644
index eb87897..0000000
--- a/I2C/I2C/Assets.xcassets/AccentColor.colorset/Contents.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "colors" : [
- {
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/I2C/I2C/Assets.xcassets/AppIcon.appiconset/Contents.json b/I2C/I2C/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 2305880..0000000
--- a/I2C/I2C/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "platform" : "ios",
- "size" : "1024x1024"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "dark"
- }
- ],
- "idiom" : "universal",
- "platform" : "ios",
- "size" : "1024x1024"
- },
- {
- "appearances" : [
- {
- "appearance" : "luminosity",
- "value" : "tinted"
- }
- ],
- "idiom" : "universal",
- "platform" : "ios",
- "size" : "1024x1024"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/I2C/I2C/Assets.xcassets/Contents.json b/I2C/I2C/Assets.xcassets/Contents.json
deleted file mode 100644
index 73c0059..0000000
--- a/I2C/I2C/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/I2C/I2C/ContentView.swift b/I2C/I2C/ContentView.swift
deleted file mode 100644
index 6d0448d..0000000
--- a/I2C/I2C/ContentView.swift
+++ /dev/null
@@ -1,17 +0,0 @@
-import SwiftUI
-
-struct ContentView: View {
- let options = ["CPU INFO", "CPU UPTIME", "SPEECH TRANSCRIBER", "NOTES"]
- var body: some View {
- VStack {
- Button(
- RoundedRectangle(cornerRadius: 25)
- .fill(Color.red)
- )
- }
- }
-}
-
-#Preview {
- ContentView()
-}
diff --git a/I2C/I2C/I2CApp.swift b/I2C/I2C/I2CApp.swift
deleted file mode 100644
index b70050f..0000000
--- a/I2C/I2C/I2CApp.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-import SwiftUI
-
-@main
-struct I2CApp: App {
- var body: some Scene {
- WindowGroup {
- ContentView()
- }
- }
-}
diff --git a/I2C/I2C/Preview Content/Preview Assets.xcassets/Contents.json b/I2C/I2C/Preview Content/Preview Assets.xcassets/Contents.json
deleted file mode 100644
index 73c0059..0000000
--- a/I2C/I2C/Preview Content/Preview Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/I2C/I2CTests/I2CTests.swift b/I2C/I2CTests/I2CTests.swift
deleted file mode 100644
index 24b0e07..0000000
--- a/I2C/I2CTests/I2CTests.swift
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// I2CTests.swift
-// I2CTests
-//
-// Created by nsrddyn on 09/11/2024.
-//
-
-import Testing
-@testable import I2C
-
-struct I2CTests {
-
- @Test func example() async throws {
- // Write your test here and use APIs like `#expect(...)` to check expected conditions.
- }
-
-}
diff --git a/I2C/I2CUITests/I2CUITests.swift b/I2C/I2CUITests/I2CUITests.swift
deleted file mode 100644
index a98bb08..0000000
--- a/I2C/I2CUITests/I2CUITests.swift
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// I2CUITests.swift
-// I2CUITests
-//
-// Created by nsrddyn on 09/11/2024.
-
-import XCTest
-
-final class I2CUITests: XCTestCase {
-
- override func setUpWithError() throws {
- // Put setup code here. This method is called before the invocation of each test method in the class.
-
- // In UI tests it is usually best to stop immediately when a failure occurs.
- continueAfterFailure = false
-
- // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
- }
-
- override func tearDownWithError() throws {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- }
-
- @MainActor
- func testExample() throws {
- // UI tests must launch the application that they test.
- let app = XCUIApplication()
- app.launch()
-
- // Use XCTAssert and related functions to verify your tests produce the correct results.
- }
-
- @MainActor
- func testLaunchPerformance() throws {
- if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
- // This measures how long it takes to launch your application.
- measure(metrics: [XCTApplicationLaunchMetric()]) {
- XCUIApplication().launch()
- }
- }
- }
-}
diff --git a/I2C/I2CUITests/I2CUITestsLaunchTests.swift b/I2C/I2CUITests/I2CUITestsLaunchTests.swift
deleted file mode 100644
index 71a0020..0000000
--- a/I2C/I2CUITests/I2CUITestsLaunchTests.swift
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// I2CUITestsLaunchTests.swift
-// I2CUITests
-//
-// Created by nsrddyn on 09/11/2024.
-//
-
-import XCTest
-
-final class I2CUITestsLaunchTests: XCTestCase {
-
- override class var runsForEachTargetApplicationUIConfiguration: Bool {
- true
- }
-
- override func setUpWithError() throws {
- continueAfterFailure = false
- }
-
- @MainActor
- func testLaunch() throws {
- let app = XCUIApplication()
- app.launch()
-
- // Insert steps here to perform after app launch but before taking a screenshot,
- // such as logging into a test account or navigating somewhere in the app
-
- let attachment = XCTAttachment(screenshot: app.screenshot())
- attachment.name = "Launch Screen"
- attachment.lifetime = .keepAlways
- add(attachment)
- }
-}
diff --git a/README.md b/README.md
index fa04791..7746d4e 100644
--- a/README.md
+++ b/README.md
@@ -2,4 +2,6 @@
A application to control an I2C display on RPI.
This application should represent a multi-use software with features ranging from a bus line analyser, bus delay analiser, an generative AI command line, weather reports, note's saving and much more.
-This is a starter project with the goal of expanded everything later on to let's say an e-ink display or small LCD. \ No newline at end of file
+This is a starter project with the goal of expanded everything later on to let's say an e-ink display or small LCD.
+
+18/11/2024 migrating to C for the main code \ No newline at end of file
diff --git a/bin/__pycache__/source.cpython-313.pyc b/bin/__pycache__/source.cpython-313.pyc
deleted file mode 100644
index 79aee1d..0000000
--- a/bin/__pycache__/source.cpython-313.pyc
+++ /dev/null
Binary files differ
diff --git a/bin/display.c b/bin/display.c
new file mode 100644
index 0000000..51a0873
--- /dev/null
+++ b/bin/display.c
@@ -0,0 +1,27 @@
+#include <gtk/gtk.h>
+
+static void activate(GtkApplication *app, gpointer user_data) {
+ // Create a new application window
+ GtkWidget *window = gtk_application_window_new(app);
+ gtk_window_set_title(GTK_WINDOW(window), "I2C CONTROLLER");
+ gtk_window_set_default_size(GTK_WINDOW(window), 400, 200);
+
+ // Show the window
+ gtk_window_present(GTK_WINDOW(window));
+}
+
+int main(int argc, char *argv[]) {
+ // Create a new GtkApplication
+ GtkApplication *app = gtk_application_new("com.example.GTK4Test", G_APPLICATION_FLAGS_NONE);
+
+ // Connect the activate signal
+ g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
+
+ // Run the application
+ int status = g_application_run(G_APPLICATION(app), argc, argv);
+
+ // Clean up
+ g_object_unref(app);
+
+ return status;
+} \ No newline at end of file
diff --git a/bin/i2c.py b/bin/i2c.py
index 75a3509..1afb219 100644
--- a/bin/i2c.py
+++ b/bin/i2c.py
@@ -1,4 +1,4 @@
-from smbus import SMBus
+from smbus2 import SMBus
from time import sleep
ALIGN_FUNC = {"left": "ljust", "right": "rjust", "center": "center"}
@@ -63,3 +63,6 @@ class LCD(object):
def clear(self):
self.write(CLEAR_DISPLAY)
+
+ def read(self):
+ self._read_i2c_block_data
diff --git a/bin/main.py b/bin/main.py
index 2231547..921082f 100644
--- a/bin/main.py
+++ b/bin/main.py
@@ -1,9 +1,106 @@
-import tk
-import source as main
+import time
+import os
+import speech_recognition as speech
+import sounddevice
+import i2c as LCD
+from gpiozero import CPUTemperature
-source = main()
+ERROR_BAD_REQUEST = "400 Bad Request"
+ERROR_UNAUTHORIZED = "401 Unauthorized"
+ERROR_NOT_FOUND = "404 Not Found"
+ERROR_TIMEOUT = "408 Request Timeout"
-display = tk.Tk()
-display.title("Kasper")
+lcd = LCD
+cpu_temp = CPUTemperature()
+recognizer = speech.Recognizer()
+microphone = speech.Microphone()
-display.mainloop() \ No newline at end of file
+
+def display_cpu_info():
+ lcd.clear()
+ while True:
+ load = os.getloadavg()[0]
+ temperature = cpu_temp.temperature
+ lcd.clear()
+ lcd.display_text(f"CPU Load:i {load}", 1)
+ lcd.display_text(f"Temp: {temperature:}C", 2)
+ time.sleep(5)
+
+
+def display_uptime():
+ lcd.clear()
+ with open("/proc/uptime") as f:
+ uptime_seconds = float(f.readline().split()[0])
+ uptime_str = time.strftime("%H:%M:%S", time.gmtime(uptime_seconds))
+ lcd.clear()
+ lcd.display_text(f"Uptime: {uptime_str}", 1, "center")
+
+
+def recognize_speech():
+ lcd.clear()
+ try:
+ with microphone as source:
+ recognizer.adjust_for_ambient_noise(source)
+ print("Listening...")
+ audio = recognizer.listen(source)
+ text = recognizer.recognize_google(audio)
+ lcd.clear()
+ lcd.display_text(text, 1)
+ print("Speech recognized:", text)
+ except speech.UnknownValueError:
+ lcd.display_text(ERROR_BAD_REQUEST, 1)
+ print(ERROR_BAD_REQUEST)
+ except speech.RequestError:
+ lcd.display_text(ERROR_UNAUTHORIZED, 1)
+ print(ERROR_UNAUTHORIZED)
+
+
+def save_notes():
+ PRINT_REQUEST = True
+ EXIT_CODES = ["stop", "break", "quit", "exit"]
+ if PRINT_REQUEST == True:
+ while True:
+ OUTPUT = input()
+ print(OUTPUT)
+ lcd.display_text(OUTPUT, 1)
+ time.sleep(2)
+ for i in EXIT_CODES:
+ if OUTPUT == i:
+ PRINT_REQUEST == False
+
+
+OPTIONS = {
+ "CPU_INFO": display_cpu_info(),
+ "UPTIME": display_uptime(),
+ "SPEECH_TRANSCRIBER": recognize_speech(),
+ "NOTES": save_notes(),
+}
+
+
+def main():
+ lcd.clear()
+ print("WELCOME TO THE I2C COMMAND LINE CENTER")
+ print("Options:", ", ".join(OPTIONS.keys()))
+
+ while True:
+ user_input = input("Enter command: ").upper()
+ action = OPTIONS.get(user_input)
+
+ if action:
+ action()
+ else:
+ lcd.display_text(ERROR_NOT_FOUND, 1)
+ print(ERROR_NOT_FOUND)
+
+
+def destroy():
+ lcd.clear()
+ os.system("cls" if os.name == "nt" else "clear")
+
+
+if __name__ == "__main__":
+ os.system("cls" if os.name == "nt" else "clear")
+ try:
+ main()
+ except KeyboardInterrupt:
+ destroy()
diff --git a/bin/source.py b/bin/source.py
deleted file mode 100644
index 485cc03..0000000
--- a/bin/source.py
+++ /dev/null
@@ -1,106 +0,0 @@
-import time
-import os
-import speech_recognition as speech
-import sounddevice
-import i2c as LCD
-from gpiozero import CPUTemperature
-
-ERROR_BAD_REQUEST = "400 Bad Request"
-ERROR_UNAUTHORIZED = "401 Unauthorized"
-ERROR_NOT_FOUND = "404 Not Found"
-ERROR_TIMEOUT = "408 Request Timeout"
-
-lcd = LCD
-cpu_temp = CPUTemperature()
-recognizer = speech.Recognizer()
-microphone = speech.Microphone()
-
-
-def display_cpu_info():
- lcd.clear()
- while True:
- load = os.getloadavg()[0] # 1-minute load average
- temperature = cpu_temp.temperature
- lcd.clear()
- lcd.display_text(f"CPU Load:i {load}", 1)
- lcd.display_text(f"Temp: {temperature:}C", 2)
- time.sleep(5)
-
-
-def display_uptime():
- lcd.clear()
- with open("/proc/uptime") as f:
- uptime_seconds = float(f.readline().split()[0])
- uptime_str = time.strftime("%H:%M:%S", time.gmtime(uptime_seconds))
- lcd.clear()
- lcd.display_text(f"Uptime: {uptime_str}", 1, "center")
-
-
-def recognize_speech():
- lcd.clear()
- try:
- with microphone as source:
- recognizer.adjust_for_ambient_noise(source)
- print("Listening...")
- audio = recognizer.listen(source)
- text = recognizer.recognize_google(audio)
- lcd.clear()
- lcd.display_text(text, 1)
- print("Speech recognized:", text)
- except speech.UnknownValueError:
- lcd.display_text(ERROR_BAD_REQUEST, 1)
- print(ERROR_BAD_REQUEST)
- except speech.RequestError:
- lcd.display_text(ERROR_UNAUTHORIZED, 1)
- print(ERROR_UNAUTHORIZED)
-
-
-def save_notes():
- PRINT_REQUEST = True
- EXIT_CODES = ['stop', 'break', 'quit', 'exit']
- if PRINT_REQUEST == True:
- while True:
- OUTPUT = input()
- print(OUTPUT)
- lcd.display_text(OUTPUT, 1)
- time.sleep(2)
- for i in EXIT_CODES:
- if OUTPUT == i:
- PRINT_REQUEST == False
-
-
-
-OPTIONS = {
- "CPU_INFO": display_cpu_info(),
- "UPTIME": display_uptime(),
- "SPEECH_TRANSCRIBER": recognize_speech(),
- "NOTES": save_notes(),
-}
-
-
-def main():
- lcd.clear()
- print("WELCOME TO THE I2C COMMAND LINE CENTER")
- print("Options:", ", ".join(OPTIONS.keys()))
-
- while True:
- user_input = input("Enter command: ").upper()
- action = OPTIONS.get(user_input)
-
- if action:
- action()
- else:
- lcd.display_text(ERROR_NOT_FOUND, 1)
- print(ERROR_NOT_FOUND)
-
-
-def destroy():
- lcd.clear()
- os.system("cls" if os.name == "nt" else "clear")
-
-
-if __name__ == "__main__":
- try:
- main()
- except KeyboardInterrupt:
- destroy()
diff --git a/webconsole/index.html b/webGUI/index.html
index 33b4ee9..eb12eca 100644
--- a/webconsole/index.html
+++ b/webGUI/index.html
@@ -13,13 +13,19 @@
<nav class="navigation">
<p>I2C MODES</p>
- <button>STATS</button>
- <button>AI</button>
- <button>TOOLS</button>
- <button>MORE</button>
+ <a href="" class="CPU_INFO">CPU Information</a>
+ <a href="" class="recources">Recources</a>
+ <a href="" class="speech_trans">Speech Transcriber</a>
+ <a href="" class="notes">Display a message</a>
+ <a href="" class="general">General Tools</a>
+
</nav>
</body>
+<footer>
+
+</footer>
+
</html> \ No newline at end of file
diff --git a/webGUI/main.mjs b/webGUI/main.mjs
new file mode 100644
index 0000000..c7464e5
--- /dev/null
+++ b/webGUI/main.mjs
@@ -0,0 +1 @@
+let modes = ["STATS", ""] \ No newline at end of file
diff --git a/webGUI/pages/stats.html b/webGUI/pages/stats.html
new file mode 100644
index 0000000..8fdbb74
--- /dev/null
+++ b/webGUI/pages/stats.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>STATS - CONSOLE</title>
+</head>
+
+<body>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/webGUI/styles.css b/webGUI/styles.css
new file mode 100644
index 0000000..eefc162
--- /dev/null
+++ b/webGUI/styles.css
@@ -0,0 +1,32 @@
+body {
+ background-color: rgba(0, 10, 30, 1);
+ text-decoration: none;
+ color: white;
+ font: sans-serif;
+}
+
+body button a {
+ border-radius: 10px;
+ text-decoration: none;
+}
+
+a {
+ text-decoration: none;
+ color: wheat;
+}
+
+.navigation {
+ max-width: fit-content;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.navigation a {
+ display: block;
+
+ background-color: rgba(0, 0, 0, 1);
+ border-radius: 10px;
+ border: none;
+ padding: 10px;
+ min-width: 100px;
+}
diff --git a/webconsole/main.js b/webconsole/main.js
deleted file mode 100644
index e69de29..0000000
--- a/webconsole/main.js
+++ /dev/null
diff --git a/webconsole/styles.css b/webconsole/styles.css
deleted file mode 100644
index a940b10..0000000
--- a/webconsole/styles.css
+++ /dev/null
@@ -1,8 +0,0 @@
-body {
- background-color: teal;
-}
-
-.navigation button {
- background-color: none;
- border: none;
-}