Compare commits
2 Commits
ded055a790
...
e4821b3c6f
Author | SHA1 | Date |
---|---|---|
Siwat Sirichai | e4821b3c6f | |
Siwat Sirichai | 88734ec168 |
4
app.py
4
app.py
|
@ -9,8 +9,8 @@ import kuukar.kuukar_environment as kuukar_environment
|
|||
|
||||
from kuukar.kuukar_config import SERIAL_MCU, SERIAL_DRV
|
||||
|
||||
mcu = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_MCU)
|
||||
drv = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_DRV)
|
||||
mcu = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_MCU, sleep_tune=0.001)
|
||||
drv = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_DRV, sleep_tune=0.001)
|
||||
sensors = kuukar_sensors.sensors(mcu)
|
||||
leds = kuukar_leds.leds(mcu)
|
||||
motion = kuukar_motion.motion(mcu, drv, leds, sensors)
|
||||
|
|
|
@ -79,5 +79,5 @@ class leds:
|
|||
print(leds.__blink_func(self.__get_time(), duration))
|
||||
time.sleep(0.05)
|
||||
if self.__get_time() > duration:
|
||||
flashing = False
|
||||
self.flashing = False
|
||||
break
|
||||
|
|
|
@ -110,6 +110,7 @@ class motion:
|
|||
while True:
|
||||
if self.roaming:
|
||||
self.__roam_handle()
|
||||
time.sleep(0.3)
|
||||
|
||||
def __roam_handle(self):
|
||||
sensitivity = 35
|
||||
|
@ -149,5 +150,4 @@ class motion:
|
|||
self.turn(-turn_speed, 1)
|
||||
self.drive(drive_speed)
|
||||
if not self.roaming:
|
||||
self.stop()
|
||||
time.sleep(0.3)
|
||||
self.stop()
|
Loading…
Reference in New Issue