Skip to content

Commit 1aeaac3

Browse files
committed
feat: brake method
mod: increased uart baud
1 parent a1bae8a commit 1aeaac3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

arduino_alvik.py

+7
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,13 @@ def drive(self, linear_velocity: float, angular_velocity: float, linear_unit: st
290290
self.packeter.packetC2F(ord('V'), linear_velocity, angular_velocity)
291291
uart.write(self.packeter.msg[0:self.packeter.msg_size])
292292

293+
def brake(self):
294+
"""
295+
Brakes the robot
296+
:return:
297+
"""
298+
self.drive(0, 0)
299+
293300
def get_drive_speed(self, linear_unit: str = 'mm/s', angular_unit: str = 'deg/s') -> (float, float):
294301
"""
295302
Returns linear and angular velocity of the robot

uart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
_UART_ID = 1
55
_TX_PIN = 43
66
_RX_PIN = 44
7-
_BAUDRATE = 115200
7+
_BAUDRATE = 460800
88
_BITS = 8
99
_PARITY = None
1010
_STOP = 1

0 commit comments

Comments
 (0)