yash Is there any reference for using I2C devices with Bela?

plenty of scattered information around this forum, but each I2C device is different so it's hard to produce a comprehensive guide. In your case it should be simple enough to update the provided arduino library so that it works on Linux.
I gave it a try, including a Bela example. Try this: https://github.com/giuliomoro/DFRobot_VisualRotaryEncoder . This builds but it's obviously untested as I don't have the sensor in my possession.

Simply download the project as a zip and drop it on your Bela IDE, that will create a new project with the relevant files. Then start from the example code in render.cpp .

It works!!! Thank you so much! My C skills are still in the early stages, I didn't really know where to start with transferring a library and that.
It doesn't seem to be detecting the button state though.
Will keep this thread updated with my progress with regard to the encoder.

    yash It doesn't seem to be detecting the button state though.

    I think that may be the hardware's or the Arduino library's or the wiring's fault. Did you have a chance to verify if it detects button state correctly when using the library on Arduino?

    Haven't had a chance to test it with an Arduino (currently don't have access to one).
    Although I tried to integrate the code into my project and I keep getting this error here,

    Segmentation fault
    make: *** [runide] Error 139
    Makefile:613: recipe for target 'runide' failed

    My project currently has render.cpp, DFRobot_VisualRotaryEncoder.cpp (which i had to include because without it none of the functions from the library were recognized) and my DSP source code. I have attached the render.cpp file here as I believe the problem would be in there (again, not 100% sure),

    https://github.com/yashiquechalil/SD_Masters_share/blob/main/render.cpp

    I see you have some homegrown solution there for Trill support, which makes troubleshooting harder on my side, why don't you get the latest version of rnbo.example.bela which has built-in support for multiple Trill devices and then reapply your changes for the DFRobot_VisualRotaryEncoder on top of that? Then troubleshooting would be easier.

    If you want to give it a quick try, you can also see if gdb (the GNU debugger) can help you with that. Start by stopping the program in the IDE and then in the console at the bottom of the IDE, run the following commands, replacing PROJECT_NAME with your project's name:

    cd projects/PROJECT_NAME;
    gdb -ex run --args PROJECT_NAME;

    the program will now run in the console at the bottom of the IDE, inside the debugger. It should stop when it receives the segmentation fault, printing something like:

    Thread 3 "bela-audio" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb63b0450 (LWP 4271)]
    0x000579d4 in render (context=0x758a8 , userData=0x0)
        at /root/Bela/projects/basic/render.cpp:42

    that should tell you the line number at which the issue occurred and you can type backtrace to show how that function got called. It may be that the error is inside one of the RNBO functions, but that it is caused by the fact that you are passing invalid data to it. Once you are done with debugging, type quit to exit the debugger. You can now make edits to your files and rebuild and run the project again. Note that you always should start the program from the IDE's button after each file change so that it gets rebuild. Restarting gdb in the console will not - by itself -rebuild the program.

    Thank you for the quick response Giuliomoro! I really appreciate your help!
    I didn't realize that I was using an older version of the rnbo example code. Now that I have the updated one, I'm a bit confused by trill's location and size link to the parameters.
    I'm using trill craft for this, So each note is linked to 1/30 inputs on trill craft.
    I handled this earlier in my code by using the param number for note and the value for velocity. Is there any document that covers the render.cpp code in the rnbo example?

    alt text
    So all the notes are set as individual parameters through which the velocity is sent from each of trill crafts touch input

    I've tried to get around this but haven't succeeded yet. I added a print line to display the value in the sendOnChange function, but it fails to print anything.
    When I attempted to print from render it was continuously printing 0.000.

    alt text

    I am still struggling to figure out the output for location and size for trill craft. :/