diff --git a/kuukar/kuukar.py b/kuukar/kuukar.py index 7e0d435..38212c5 100644 --- a/kuukar/kuukar.py +++ b/kuukar/kuukar.py @@ -11,7 +11,7 @@ class kuukar: def __init__(self) -> None: self.mcu = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_MCU, sleep_tune=0.001) self.drv = telemetrix_rpi_pico.TelemetrixRpiPico(com_port=SERIAL_DRV, sleep_tune=0.001) - self.sensors = kuukar_sensors.sensors(self.mcu, self.drv) + self.sensors = kuukar_sensors.sensors(self.mcu) self.leds = kuukar_leds.leds(self.mcu) self.motion = kuukar_motion.motion(self.mcu, self.drv, self.leds, self.sensors) self.lcd = kuukar_lcd.lcd(self.motion, self.sensors) diff --git a/kuukar/kuukar_sensors.py b/kuukar/kuukar_sensors.py index 13d7565..e3b27a7 100644 --- a/kuukar/kuukar_sensors.py +++ b/kuukar/kuukar_sensors.py @@ -12,12 +12,11 @@ class sensors: __humidity = 0 __brightness = 0 - def __init__(self, mcu: telemetrix_rpi_pico.TelemetrixRpiPico, drv: telemetrix_rpi_pico.TelemetrixRpiPico) -> None: + def __init__(self, mcu: telemetrix_rpi_pico.TelemetrixRpiPico) -> None: self.mcu = mcu - self.drv = mrv - self.drv.set_pin_mode_analog_input(SONAR_1_ADC_PIN, 10, self.__sonar_callback) - self.drv.set_pin_mode_analog_input(SONAR_2_ADC_PIN, 10, self.__sonar_callback) - self.drv.set_pin_mode_analog_input(SONAR_3_ADC_PIN, 10, self.__sonar_callback) + self.mcu.set_pin_mode_analog_input(SONAR_1_ADC_PIN, 10, self.__sonar_callback) + self.mcu.set_pin_mode_analog_input(SONAR_2_ADC_PIN, 10, self.__sonar_callback) + self.mcu.set_pin_mode_analog_input(SONAR_3_ADC_PIN, 10, self.__sonar_callback) self.mcu.set_pin_mode_dht(DHT22_PIN, self.__dht22_callback) self.mcu.set_pin_mode_analog_input(LIGHT_ANALOG_PIN, 0, self.__light_sensor_callback)