aboutsummaryrefslogtreecommitdiffstats
path: root/System/Pendulum/initialize_system.py
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-02-18 12:41:51 -0600
committerMatt Strapp <matt@mattstrapp.net>2022-02-18 12:41:51 -0600
commit1337de59b712c30c447b2b45de9ec54ecd6d8ea4 (patch)
tree6c0fc73eeee869bd01392a849fc547a2552cb919 /System/Pendulum/initialize_system.py
parentChange git repo to organization repos (diff)
downloadee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar.gz
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar.bz2
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar.lz
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar.xz
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.tar.zst
ee4511w-1337de59b712c30c447b2b45de9ec54ecd6d8ea4.zip
Hopefully get the system able to be packaged
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'System/Pendulum/initialize_system.py')
-rw-r--r--System/Pendulum/initialize_system.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/System/Pendulum/initialize_system.py b/System/Pendulum/initialize_system.py
new file mode 100644
index 0000000..38b7134
--- /dev/null
+++ b/System/Pendulum/initialize_system.py
@@ -0,0 +1,18 @@
+# This file should be run on system startup. It will initialize the linear position to the center so that all tests originate from a proper position.
+# The center is found by using the hardware limit switches
+from system import System
+import RPi.GPIO as GPIO
+
+# Main program
+print("Got to init")
+sys = System()
+sys.initialize()
+GPIO.cleanup()
+
+
+##debug version
+#print("alive")
+#sys = System()
+#limit_negative_pin = 19
+#while(1):
+# print(GPIO.input(limit_negative_pin)) \ No newline at end of file