From b5257f84a6c98b55db651567e0371881397d2eb2 Mon Sep 17 00:00:00 2001 From: Lucas Oskorep Date: Tue, 7 Jun 2022 19:18:54 -0400 Subject: [PATCH] Initial commit --- .idea/MacroPadApp.iml | 8 +++++ .idea/inspectionProfiles/Project_Default.xml | 15 ++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/modules.xml | 8 +++++ TestWritingToDevice.py | 29 +++++++++++++++++++ 5 files changed, 66 insertions(+) create mode 100644 .idea/MacroPadApp.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 TestWritingToDevice.py diff --git a/.idea/MacroPadApp.iml b/.idea/MacroPadApp.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/MacroPadApp.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..cd5f7ab --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ 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 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..268d9f8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/TestWritingToDevice.py b/TestWritingToDevice.py new file mode 100644 index 0000000..1179e7f --- /dev/null +++ b/TestWritingToDevice.py @@ -0,0 +1,29 @@ +from serial import Serial +import serial.tools.list_ports as port_list + +ports = list(port_list.comports()) + +#Windows code for figuring out which port to grab + +for port in ports: + if "DF60BCA" in port.hwid and port.pid == 33032: + print("FOUND MACROPAD!") + ser = Serial(port.name) + ser.write(b"hello!\n") + line = ser.readline() + print(line) + print(line.decode("utf-8")) + line = ser.readline() + print(line) + print(line.decode("utf-8")) + line = ser.readline() + print(line) + print(line.decode("utf-8")) + line = ser.readline() + print(line) + print(line.decode("utf-8")) + + ser.close() + + +