Notifications
Clear all

ESP32 code error

4 Posts
4 Users
1 Reactions
1,432 Views
 Gee
(@gee)
Member
Joined: 4 years ago
Posts: 29
Topic starter  

Hi everyone, I recently watched the Dronebot Workshop episode on the Ps3 controller and ESP32. I went to the page accompanying the episode, copied and pasted the code. When I try to compile I get errors. I tried each project and same , compile errors, like (' ledcSetup ' was not declared in this scope ) or ('PS3 controller' has no member named ' event ' ) very frustrating. Has anyone else tried these projects and had the same issues? any help would be appreciated.  Gee



   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 7 years ago
Posts: 1183
 

The issue may be the PS3 library itself. It hasn't been updated for 5 years and is likely incompatible with ESP32 Boards Manager 3.

I just tried one of the example sketches included with the library (the PS3 Accelerometer example). It also failed to compile, with similar errors to the ones you described. 

It may be possible to compile it under Boards Manager 2. The article I have about converting BM2 code explains how to set up an independent BM2 installation.

I also note you have an LEDCSetup error; this has also changed format with Boards Manager 3.

😎

Bill


"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@aliarifat)
Member
Joined: 2 years ago
Posts: 119
 

Posted by: @gee

Hi everyone, I recently watched the Dronebot Workshop episode on the Ps3 controller and ESP32. I went to the page accompanying the episode, copied and pasted the code. When I try to compile I get errors. I tried each project and same , compile errors, like (' ledcSetup ' was not declared in this scope ) or ('PS3 controller' has no member named ' event ' ) very frustrating. Has anyone else tried these projects and had the same issues? any help would be appreciated.  Gee

 

Sounds like the library installation was not done properly.

 



   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 7 years ago
Posts: 1064
 

@aliarifat

Since Bill is getting errors as well using BM3, I'd have to agree with Bill that it is a library problem not an installation problem since it used to work before BM3. And the fact that the library hasn't been updated in 5 years also points in that direction. If @gee can put together a BM2 installation he may find that it works. I tried the code back when Bill first published the video and it worked fine. Haven't looked at it since, but would expect it would fail for me as well now using BM3.


SteveG, a.k.a. CodeCage


   
ReplyQuote