summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdellah El Morabit <nsrddyn@gmail.com>2024-11-29 23:54:15 +0100
committerAbdellah El Morabit <nsrddyn@gmail.com>2024-11-29 23:54:15 +0100
commit35b476a90b585186161ab91ef9b73d029a2ee834 (patch)
tree8306c308aa921de6881123a083002249976a7dcd
parentfdd3b103bb209045123693cd60149b951c7b2be8 (diff)
made the first form of a practicle gui
-rw-r--r--.idea/.gitignore3
-rw-r--r--.idea/I2C.iml8
-rw-r--r--.idea/inspectionProfiles/profiles_settings.xml6
-rw-r--r--.idea/misc.xml4
-rw-r--r--.idea/modules.xml8
-rw-r--r--.idea/vcs.xml6
-rw-r--r--source/.DS_Storebin0 -> 6148 bytes
-rw-r--r--source/__pycache__/hardware_driver.cpython-313.pycbin0 -> 12187 bytes
-rw-r--r--source/main.py41
9 files changed, 76 insertions, 0 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
1# Default ignored files
2/shelf/
3/workspace.xml
diff --git a/.idea/I2C.iml b/.idea/I2C.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/.idea/I2C.iml
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<module type="PYTHON_MODULE" version="4">
3 <component name="NewModuleRootManager">
4 <content url="file://$MODULE_DIR$" />
5 <orderEntry type="inheritedJdk" />
6 <orderEntry type="sourceFolder" forTests="false" />
7 </component>
8</module> \ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
1<component name="InspectionProjectProfileManager">
2 <settings>
3 <option name="USE_PROJECT_PROFILE" value="false" />
4 <version value="1.0" />
5 </settings>
6</component> \ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..23231ce
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<project version="4">
3 <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13" project-jdk-type="Python SDK" />
4</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..71e35f1
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<project version="4">
3 <component name="ProjectModuleManager">
4 <modules>
5 <module fileurl="file://$PROJECT_DIR$/.idea/I2C.iml" filepath="$PROJECT_DIR$/.idea/I2C.iml" />
6 </modules>
7 </component>
8</project> \ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<project version="4">
3 <component name="VcsDirectoryMappings">
4 <mapping directory="" vcs="Git" />
5 </component>
6</project> \ No newline at end of file
diff --git a/source/.DS_Store b/source/.DS_Store
new file mode 100644
index 0000000..2b35964
--- /dev/null
+++ b/source/.DS_Store
Binary files differ
diff --git a/source/__pycache__/hardware_driver.cpython-313.pyc b/source/__pycache__/hardware_driver.cpython-313.pyc
new file mode 100644
index 0000000..d6c84ad
--- /dev/null
+++ b/source/__pycache__/hardware_driver.cpython-313.pyc
Binary files differ
diff --git a/source/main.py b/source/main.py
new file mode 100644
index 0000000..62e47b2
--- /dev/null
+++ b/source/main.py
@@ -0,0 +1,41 @@
1from PySide6.QtWidgets import QApplication, QLabel, QMainWindow, QPushButton, QLabel, QVBoxLayout, QWidget
2from PySide6.QtCore import Qt
3from hardware_driver import lcd
4import sys
5
6
7L = lcd()
8
9class mainWindow(QMainWindow):
10 def __init__(self):
11 super().__init__()
12 self.setWindowTitle("I2C CONTROLLER")
13 self.setGeometry(200,100,800,300)
14 self.mainUI()
15
16 def mainUI(self):
17 central_widget = QWidget(self)
18 self.setCentralWidget(central_Widget)
19
20 self.label = QLabel("CONNECTED TO I2C DEVICE", self)
21 self.label.setAlignment(Qt.AlignCenter)
22
23 self.button = QPushButton("Clear Screen", self)
24 self.button.clicked.connect(self.clear_screen)
25
26 layout = QVBoxLayout()
27 layout.addWidget(self.label)
28 layout.addWidget(self.button)
29
30 central_widget.setLayout(layout)
31
32 def clear_screen():
33 lcd.clear()
34 self.label.setText("Cleared the LCD screen", self)
35
36if __name__ == "__main__":
37 app = QApplication(sys.argv)
38 window = mainWindow()
39 window.show()
40 sys.exit(app.exec())
41