Skip to content

Commit

Permalink
fix: Added copyright notice on the servo_control.c file
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrominatel committed Nov 28, 2024
1 parent 05332ea commit 962b2d8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <stdio.h>
#include <math.h>
#include "freertos/FreeRTOS.h"
Expand All @@ -15,14 +21,13 @@ static const char *TAG = "Servo Control";
static uint16_t calibration_value_0 = 30; // Real 0 degree angle
uint16_t calibration_value_180 = 195; // Real 0 degree angle


// Task to test the servo
static void servo_test_task(void *arg)
{
ESP_LOGI(TAG, "Servo Test Task");
while (1) {
// Set the angle of the servo
for(int i = calibration_value_0; i <= calibration_value_180; i += 1) {
for (int i = calibration_value_0; i <= calibration_value_180; i += 1) {
iot_servo_write_angle(LEDC_LOW_SPEED_MODE, 0, i);
vTaskDelay(20 / portTICK_PERIOD_MS);
}
Expand Down

0 comments on commit 962b2d8

Please sign in to comment.