does anybody know how to build arduino with cmake?
The reason I want to do this is I want to build arduino with raylib
So I can use the arduino as an interface for a game controller
If anybody knows how to build raylib in the arduino IDE that's fine too but the first solution would be better for me
8 Replies
🫢
Just to clarify, do you mean running raylib on the Arduino (which is not possible) or are you just trying to use the Arduino as a controller input for a raylib game on your PC?
the latter
I've seen some github libraries but they are 8 years old and I don't know how to use .cmake files to add the toolchain
https://a9183756-gh.github.io/Arduino-CMake-Toolchain/
I think I'll try this
In that case the arduino doesn't have to know about the existence of raylib and I'd keep the projects separate. Here is a template repo for building arduino with cmake https://github.com/arduino-cmake/Arduino-CMake-NG.git
GitHub
GitHub - arduino-cmake/Arduino-CMake-NG: CMake-Based framework for ...
CMake-Based framework for Arduino platforms. Contribute to arduino-cmake/Arduino-CMake-NG development by creating an account on GitHub.
ok
I recently made a controller that works on multiple games, i did it by writing a sketch that reads the joystick and button values and outputs it in serial and then you can use c# to read this and use a controller emulator (i used vigembus which can emulate xbox 360 controllers with c#) to get inputs
ty