Control Chain Protocol


#1

After I bought the Control Chain Shield for an Arduino Uno, i´m trying to get into setting things up with the Control Chain Protocol to build some diy controllers for the Mod.
Thing is, i ran into some problems related to not understanding how to program the protocol.

I know how to set up the Arduino and how to get it to do what i intended.
I was also able to run the Control Chain Examples “Button” and “Pot” and get them working with the pedalboard inside the Mod.
Then i ordered some displays, an old wah pedal case and other controlers like buttons,pot´s and other sensors.
I really cannot figure out how to set up anything else then the two examples.

Is there some kind of documentation how to set up the code, or do you have more examplecode, like how to set up a display, or how to light an LED showing if an effect is switched on?

I have read the documentation an github and the wiki, but i wasn´t even able to understand the examples with the documentation.

Maybe some of you have more experience with coding the control chain and could give me a hint :slight_smile:


#2

Unfortunately the Arduino library is not providing the “feedback callback” yet. Although the Arduino library doesn’t have this API yet, the callback is already implemented on the cc-slave which is the library used by the Arduino library. It’s just a matter to write the wrapper on the Arduino side.

I hope to have time to work on this soon.


#3

So if i understand the problem you decribed right, this is an issue for both, the LED and the display feedback?


#4

It’s actually not an issue, it’s a feature that need to be implemented. The callback will provide you information as assignment, unassignment and update events. You decide how to use these information to light up a LED or write on displays.


#5

@Radinhio the library now supports events callback. Please check the updated button example: https://github.com/moddevices/cc-arduino-lib/blob/master/examples/Button/Button.ino#L74


#6

Hey Ricardo,
thanks for the reply.
Now, that i´m back from the holidays i will immediately check out the new features.
I´m going to let you know how everything works!


#7

Event feedback is a cool feature, however: You’re providing the assignment object… How do I identify the corresponding actuator?


#8

The assignment object has the actuator_id var.


#9

Ok, I see that this is set by cc_actuator_new. So my hope is, that pa = cc.newActuator(cc_actuator_config_t*); calls that routine and I can use pa->id;


#10

You can use pa->id, the id is a field of actuator object.

What information from the actuator object you need in the event callback function?


#11

I have four footswitches with corresponding duo colour LEDs and I need to match between them, lighting them based on assignment->val. Basically like you did in your button demo.


#12

So I think you have all the information you need in the assignment object or I’m missing something?