diff --git a/src/Dezibot.cpp b/src/Dezibot.cpp index ef2e950..d26052d 100644 --- a/src/Dezibot.cpp +++ b/src/Dezibot.cpp @@ -1,18 +1,11 @@ -// -// Created by Anton Jacker on 24.11.23. -// - #define SDA_PIN 1 #define SCL_PIN 2 #include "Dezibot.h" -#include -#include #include #define GPIO_LED 48 -Dezibot::Dezibot():multiColorLight(){}; void Dezibot::begin(void) { Wire.begin(SDA_PIN,SCL_PIN); diff --git a/src/Dezibot.h b/src/Dezibot.h index bff4f9d..7a3a094 100644 --- a/src/Dezibot.h +++ b/src/Dezibot.h @@ -1,6 +1,6 @@ /** * @file Dezibot.h - * @author your name (you@domain.com) + * @author Hans Haupt, Jens Wagner, Anina Morgner, Anton Jacker, Saskia Dübener * @brief * @version 0.1 * @date 2023-11-19 @@ -32,22 +32,6 @@ public: InfraredLight infraredLight; Display display; void begin(void); -/* -Display display -IRCommuncation irCommuncation (beinhaltet Kommuniaktion / Annhärung...) -Battery battery -Extension extension -WiFi wifi //wie wird WiFi geschrieben? - -//nur lesender Zugriff, in dieser Klasse sind andere Instanzen mit dem Dezibotinterface gekapselt -Friends friends -OperatingSystem operatingSystem -USBCommunication usbCommunication -Button button -//nicht unique, initzial Dezibot -String robotName - -*/ }; #endif //Dezibot_h \ No newline at end of file diff --git a/src/colorDetection/ColorDetection.cpp b/src/colorDetection/ColorDetection.cpp index 3bcc0ef..b41bb16 100644 --- a/src/colorDetection/ColorDetection.cpp +++ b/src/colorDetection/ColorDetection.cpp @@ -1,7 +1,6 @@ #include "ColorDetection.h" void ColorDetection::begin(void){ - Wire.begin(I2C_MASTER_SDA_IO,I2C_MASTER_SCL_IO); ColorDetection::configure(VEML_CONFIG{.mode = AUTO,.enabled = true,.exposureTime=MS40}); }; void ColorDetection::configure(VEML_CONFIG config){ diff --git a/src/colorDetection/ColorDetection.h b/src/colorDetection/ColorDetection.h index 45244a2..6fd284b 100644 --- a/src/colorDetection/ColorDetection.h +++ b/src/colorDetection/ColorDetection.h @@ -1,3 +1,14 @@ +/** + * @file ColorDetecion.h + * @author Hans Haupt + * @brief Class that controls the colorsensor (VEML6040) of the dezibot. + * @version 0.1 + * @date 2024-06-01 + * + * @copyright Copyright (c) 2024 + * + */ + #ifndef ColorDetection_h #define ColorDetection_h #include diff --git a/src/infraredLight/InfraredLED.cpp b/src/infraredLight/InfraredLED.cpp index b0a6a2f..7298603 100644 --- a/src/infraredLight/InfraredLED.cpp +++ b/src/infraredLight/InfraredLED.cpp @@ -1,9 +1,7 @@ #include "InfraredLight.h" #define pwmSpeedMode LEDC_LOW_SPEED_MODE -#define fooPin 13 -#define footimer LEDC_TIMER_0 -#define foochannel LEDC_CHANNEL_0 + InfraredLED::InfraredLED(uint8_t pin,ledc_timer_t timer, ledc_channel_t channel){ this->ledPin = pin; this->timer = timer; @@ -53,7 +51,7 @@ void InfraredLED::setState(bool state){ }; void InfraredLED::sendFrequency(uint16_t frequency){ - // ledc_set_freq(pwmSpeedMode,timer,frequency); + ledc_set_freq(pwmSpeedMode,timer,frequency); ledc_set_duty(pwmSpeedMode,channel,512); ledc_update_duty(pwmSpeedMode,channel); }; \ No newline at end of file diff --git a/src/motionDetection/MotionDetection.cpp b/src/motionDetection/MotionDetection.cpp index b675e28..3d8df61 100644 --- a/src/motionDetection/MotionDetection.cpp +++ b/src/motionDetection/MotionDetection.cpp @@ -1,6 +1,6 @@ #include "MotionDetection.h" -MotionDetection::MotionDetection(){//:handler(FSPI){ +MotionDetection::MotionDetection(){ handler = new SPIClass(FSPI); }; diff --git a/src/multiColorLight/MultiColorLight.cpp b/src/multiColorLight/MultiColorLight.cpp index cecfc9d..57b4743 100644 --- a/src/multiColorLight/MultiColorLight.cpp +++ b/src/multiColorLight/MultiColorLight.cpp @@ -6,7 +6,7 @@ MultiColorLight::MultiColorLight():rgbLeds(ledAmount,ledPin){ void MultiColorLight::begin(void){ rgbLeds.begin(); - this->turnOffLeds(); + this->turnOffLed(); }; void MultiColorLight::setLed(uint8_t index , uint32_t color){