Continued that

This commit is contained in:
Nicholas Stănescu 2025-11-28 09:13:38 +01:00
parent bba5a2b5f7
commit 7304c1e147
4 changed files with 6 additions and 10 deletions

View File

@ -1,13 +1,5 @@
{ {
"cells": [ "cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![book header](pictures/header.png)\n",
"[Table of Contents](0_Table_of_Contents.ipynb)"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},

View File

View 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

View File

@ -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)