diff --git a/kuukar_collision.py b/kuukar_collision.py index d674fcc..5978fbc 100644 --- a/kuukar_collision.py +++ b/kuukar_collision.py @@ -1,5 +1,5 @@ class collision: def __init__(self, board) -> None: - + self.board = board def collision_handle(self): pass \ No newline at end of file diff --git a/kuukar_config.py b/kuukar_config.py index b7cf994..1a564b2 100644 --- a/kuukar_config.py +++ b/kuukar_config.py @@ -1,8 +1,12 @@ -COLLISION_DETECTOR_PIN = 2 -LEDS_DATA_PIN = 3 +SERIAL_DRIVER_BOARD = "/dev/serial/by-id/..." MOTOR_FL_F = 4 MOTOR_FL_R = 5 MOTOR_FR_F = 6 -MOTOR_FL_R = 7 +MOTOR_FR_R = 7 MOTOR_R_F = 8 -MOTOR_R_R = 9 \ No newline at end of file +MOTOR_R_R = 9 + +SERIAL_AUX_BOARD = "/dev/serial/by-id/..." +COLLISION_DETECTOR_PIN = 2 +LEDS_DATA_PIN = 3 +DHT22_PIN = 5 diff --git a/kuukar_cv.py b/kuukar_cv.py index ef3701d..16893f7 100644 --- a/kuukar_cv.py +++ b/kuukar_cv.py @@ -1,3 +1,15 @@ +from kuukar_lcd import lcd +from kuukar_leds import leds +from kuukar_noise import noise + class cv: + def __init__(self, lcd: lcd, leds: leds, noise: noise) -> None: + self.lcd = lcd + self.leds = leds + self.noise = noise + def capture_image(self): + pass def detectFace(self, image): + pass + def handle_face_detected(self): pass \ No newline at end of file diff --git a/kuukar_lcd.py b/kuukar_lcd.py index e69de29..415cd3b 100644 --- a/kuukar_lcd.py +++ b/kuukar_lcd.py @@ -0,0 +1,26 @@ +class lcd: + def __init__(self) -> None: + pass + + def keke_uwu(self): + pass + + def keke_hurt(self): + pass + + def takina_noise(self): + pass + + def play_video(self,filename: str) -> None: + pass + + def pause_video(self) -> None: + pass + + def resume_video(self) -> None: + pass + + + def stop_video(self) -> None: + pass + \ No newline at end of file diff --git a/kuukar_leds.py b/kuukar_leds.py index e35688a..a55140d 100644 --- a/kuukar_leds.py +++ b/kuukar_leds.py @@ -1,2 +1,3 @@ class leds: - pass \ No newline at end of file + def __init__(self, board, led_pin: int) -> None: + self.board = board \ No newline at end of file diff --git a/kuukar_motion.py b/kuukar_motion.py index e69de29..134634e 100644 --- a/kuukar_motion.py +++ b/kuukar_motion.py @@ -0,0 +1,29 @@ +from kuukar_config import MOTOR_FL_F, MOTOR_FL_R, MOTOR_FR_F, MOTOR_FR_R, MOTOR_R_F, MOTOR_R_R +from kuukar_leds import leds +from kuukar_sensors import sensors +from telemetrix import telemetrix + +class motion: + def __init__(self, driver: telemetrix.Telemetrix, led: leds, sensors: sensors) -> None: + self.driver = driver + self.leds = leds + self.sensors = sensors + + drive_pins = [MOTOR_FL_F,MOTOR_FL_R,MOTOR_FR_F,MOTOR_FR_R,MOTOR_R_F,MOTOR_R_R] + for drive_pin in drive_pins: + self.driver.set_pin_mode_digital_output(drive_pin) + + def forward(self, speed: int): + self.driver.digital_write(MOTOR_FL_F,1) + def turn(self, speed: int, angle: float): + pass + def backward(self, speed: int): + pass + def stop(self): + pass + def roam_start(self): + pass + def roam_stop(self): + pass + def roam_loop(self): + pass \ No newline at end of file diff --git a/kuukar_noise.py b/kuukar_noise.py index e69de29..1096cdd 100644 --- a/kuukar_noise.py +++ b/kuukar_noise.py @@ -0,0 +1,2 @@ +class noise(): + pass \ No newline at end of file diff --git a/kuukar_sensors.py b/kuukar_sensors.py index e69de29..60b0af3 100644 --- a/kuukar_sensors.py +++ b/kuukar_sensors.py @@ -0,0 +1,4 @@ +class sensors: + def __init__(self, board, driver) -> None: + self.board = board + self.driver = driver \ No newline at end of file diff --git a/kuukar_temperature.py b/kuukar_temperature.py index f8bdcbc..049f130 100644 --- a/kuukar_temperature.py +++ b/kuukar_temperature.py @@ -1,2 +1,19 @@ +import threading +from time import sleep +from kuukar_lcd import lcd +from kuukar_leds import leds +from kuukar_noise import noise +from kuukar_sensors import sensors + + class temperature: - pass \ No newline at end of file + def __init__(self, lcd: lcd, leds: leds, sensors: sensors, noise: noise) -> None: + self.lcd = lcd + self.leds = leds + self.sensors = sensors + self.noise = noise + threading.Thread(target=self.temperature_checker).start() + + def temperature_checker(self): + while True: + sleep(5) \ No newline at end of file diff --git a/kuukar_voice.py b/kuukar_voice.py index e69de29..7af04df 100644 --- a/kuukar_voice.py +++ b/kuukar_voice.py @@ -0,0 +1,12 @@ +from kuukar_lcd import lcd +from kuukar_leds import leds +from kuukar_noise import noise + + +class voice: + def __init__(self, lcd: lcd, leds: leds, noise: noise) -> None: + self.lcd = lcd + self.leds = leds + self.noise = noise + def handle_voice_prompt(self, command): + pass \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 195ca31..5021e60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ telemetrix-rpi-pico +telemetrix pyaudio \ No newline at end of file