un0038998 / ESPNOW_Car

This repository contains code and diagram for ESPNOW RC Car using esp32
MIT License
36 stars 13 forks source link

Receiver code issue #1

Open Clacquin opened 3 weeks ago

Clacquin commented 3 weeks ago
C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino: In function 'void setUpPinModes()': C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino:161:3: error: 'ledcSetup' was not declared in this scope 161 ledcSetup(rightMotorPWMSpeedChannel, PWMFreq, PWMResolution); ^~~~~ C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino:163:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 163 ledcAttachPin(enableRightMotor, rightMotorPWMSpeedChannel); ^~~~~ ledcAttach C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino: In function 'void setup()': C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino:184:28: error: invalid conversion from 'void ()(const uint8_t, const uint8_t, int)' {aka 'void ()(const unsigned char, const unsigned char, int)'} to 'esp_now_recv_cb_t' {aka 'void ()(const esp_now_recv_info, const unsigned char*, int)'} [-fpermissive] 184 esp_now_register_recv_cb(OnDataRecv); ^~~~~~
void ()(const uint8_t, const uint8_t, int) {aka void ()(const unsigned char, const unsigned char, int)}

In file included from C:\Users\mclacqui\AppData\Local\Temp.arduinoIDE-unsaved2024819-12280-ld9coh.lcqn\sketch_sep19a\sketch_sep19a.ino:1: C:\Users\mclacqui\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-b6b4727c58\esp32/include/esp_wifi/include/esp_now.h:157:54: note: initializing argument 1 of 'esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t)' 157 | esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb); | ~~~~~~^~

exit status 1

Compilation error: 'ledcSetup' was not declared in this scope

lianshengleo27 commented 5 days ago

probably need to change your ESP32 board from 3.0.x to 2.0.17, as it is what I have done