r/ArduinoHelp • u/Cosplay_Pappy • 22d ago
Bluepad32 end curly bracket error
/r/esp32projects/comments/1xp1ubo/bluepad32_end_curly_bracket_error/I hope someone can help with this. I’ve been trying to use Bluepad32 to pair a ps5 controller with my esp32-s3. I need it to control a music player and four servos. My code is fine and has all closed curly brackets, but the verify output keeps telling me I need an ending curly brackets after input at the very end of my code. I think it has to do with the FreeRTOS file.
I have no idea how to fix this. Please help! I’ve been trying to fix this for several days. If I add the curly bracket to the FreeRTOS file, it just breaks more.
1
Upvotes
View all comments
Show parent comment
1
u/gm310509 18d ago
Unfortunately I am not going to research each of those libraries to find out what they do (assuming I even could find the exact same ones that you are using) and try to figure out what your program is doing....
.... But I will hazard a guess that the answer is most of them.
You need to work out what libraries you actually need and include just those headers files that pertain to that library. Usually there is just one or two and they will include th le needed dependencies.
By listing that many, all you are probably doing is just slowing down the compilation process because the compiler has to examine all of that, including any files that the ones you have listed include and figure out what it relevant and what is not.
But assuming everything else is correct, the compiler will likely be able to manage that process and produce the "correct" result. Note that "correct" means a program that does what you told it to do - which is absolutely definitely not necessarily the same as what you want it to do, unless your instructions are aligned with what you want.
To use an analogy you have given someone a very large stack of paper and told them to find the page with the heading that says "XYZ". You know that that page is right in the middle, but you don't tell them that, you just give them the whole gigantic stack and expect them to figure it out. That is what you are doing by listing all of those include files. The job can still be done, it is just requires more effort.