mirror of
https://gitlab.ewi.tudelft.nl/ee2l1/2025-2026/A.K.03.git
synced 2025-12-12 16:00:56 +01:00
Continued that
This commit is contained in:
parent
ae2e2e56d1
commit
1655982316
@ -1,13 +1,5 @@
|
|||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
|
||||||
"cell_type": "markdown",
|
|
||||||
"metadata": {},
|
|
||||||
"source": [
|
|
||||||
"\n",
|
|
||||||
"[Table of Contents](0_Table_of_Contents.ipynb)"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
|
|||||||
0
student_code/.editorconfig
Normal file
0
student_code/.editorconfig
Normal file
@ -1,4 +1,5 @@
|
|||||||
from serial import Serial
|
from serial import Serial
|
||||||
|
#from Manual.KITT_Simulator.serial_simulator import Serial
|
||||||
|
|
||||||
|
|
||||||
class KITT:
|
class KITT:
|
||||||
@ -37,7 +38,7 @@ class KITT:
|
|||||||
def send_command(self, command):
|
def send_command(self, command):
|
||||||
# Send the command string over the serial connection
|
# Send the command string over the serial connection
|
||||||
self.serial.write(command)
|
self.serial.write(command)
|
||||||
print(command)
|
#print(command)
|
||||||
|
|
||||||
def set_speed(self, speed):
|
def set_speed(self, speed):
|
||||||
# Send the motor speed command using send_command
|
# Send the motor speed command using send_command
|
||||||
|
|||||||
@ -79,7 +79,10 @@ if __name__ == "__main__":
|
|||||||
def close_btn_func():
|
def close_btn_func():
|
||||||
car.stop_beacon()
|
car.stop_beacon()
|
||||||
car.stop()
|
car.stop()
|
||||||
car.close()
|
try:
|
||||||
|
car.close()
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
root.destroy()
|
root.destroy()
|
||||||
|
|
||||||
close_btn = tk.Button(root, text="Close", command=close_btn_func)
|
close_btn = tk.Button(root, text="Close", command=close_btn_func)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user