Hi i need your help with my code I don't know what i did wrong.
An error message saying: 30:15: error: a function-definition is not allowed here before '{' token
void setup(){
37:14: error: a function-definition is not allowed here before '{' token
void loop(){
Please can you help me anyone
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#define LED_RED GPIO_NUM_5
#define LED_BLUE GPIO_NUM_4
void task_LED_RED(void *param);
void app_main(void) {
xTaskCreate(task_LED_RED, "task_RED", 1, NULL, 3, NULL);
}
void task_LED_RED(void *param) {
void setup(){
const int resolution = 13;
const int freq_hz_red = 1;
const int ledChannel_red = 0;
}
void loop(){
for(int dutyCycle = 0; dutyCycle <= 255; dutyCycle++){
ledcWrite(ledChannel_red, dutyCycle);
delay(15);
}
for(int dutyCycle = 255; dutyCycle >= 0; dutyCycle--){
ledcWrite(ledChannel_red, dutyCycle);
delay(15);
}
}
}