Multiple functions with single Arduino Shield?

Just plumbing the depths here, before I start to try and wrap my head around how to do it. I’ve got two Arduino Shields, and am planning on following the tutorial for the expression pedal conversion with at least one of them. I am not super familiar with that architecture, so forgive me if this sounds like a silly question, but I’m just going to phrase it this way, 'cause that’s how I understand it.

Is it possible to use one Arduino Shield for multiple functions? Perhaps have a Shield with one or two buttons and also an expression pedal input? Is it just something to change in the coding part of it? 'Cause it seems like there’s a lot of options to solder or pin things to, and I’m just curious if I could have that much more functionality out of one device. Especially when working with the premium of space on my pedalboard.

2 Likes

I am, of course, taking a harder look at the tutorials and seeing that even the expression pedal one talks about having multiple TRS jacks, so I think I’m a step closer to answering my own question.

1 Like

I’m also seeing the posts about the expression pedal hardware piece being worked on, and I’m very intrigued by that.

1 Like

One really fast piece of advice: use Arduino IDE version 1.6.13 (or around that) since it seems that something got broken on the Control Chain Arduino library with newer Arduino IDE versions and we still didn’t manage to fix it.

Definitely. It all depends on the code. It’s actually a super good idea in order to be economic about the resources available on the board.

Understood. The little bit more research I’m doing makes me wonder one more thing: is there easily accessible code for using rotary encoders, similar to what’s on the Duo already?

1 Like

Look at this:

https://playground.arduino.cc/Main/RotaryEncoders/

1 Like

Here you have an example of that already with the MOD Control Chain library: https://github.com/moddevices/cc-arduino-lib/tree/master/examples/Pot

1 Like

So here’s the end goal for these two projects (assuming I can figure out the Arduino side of it.) Probably going to add an LED for the button as well. If I were crazy, I guess, I could do some RGB LED with it as I have a few left over from a project, but all the colors are multiple voltages, and I haven’t even finished these projects yet.

The top two knobs on the large pedal are the rotary encoders in question.


3 Likes

Looking good :slight_smile:
Keep sharing your advances on them both

Riffing off the topic of multiple functions — I’m curious if it’s possible to assign a function per page to an arduino shield input, or if they’re single-function only. Similarly, if it’s possible to send data, like the LCD UI strings, over the connection. It would be lovely to have a little box that added another three or four encoders with a secondary display to the Dwarf — either for more complex pedalboards, or just for e.g. being able to fit all the parameters of a compressor or such on screen at once.

2 Likes

Maybe this page will help you out :wink:

So, you can have multiple mappings for a single control, but I’m not seeing any paging messages, so I’m guessing that you haven’t implemented that? It looks like it would be relatively easy to implement paging into the protocol as an optional feature, possibly by using the existing modes functionality, or by adding an additional paged bit (or byte, if you’re byte-aligned). It looks like the assignment request handles the string for an actuator name, units, and initial value, but it’s not clear how persistence of value across reboots is managed, unless it’s just by replaying the assignment. I guess devices are required to handle their own catch vs jump logic internally.

I don’t see a generic message to send data from the host to the device, for instance to identify the current page or provide any other status feedback. That’s a shame — in addition to paging, I could see this being useful for things like VU meters or peak indicators. That said, it would be trivial to add a paging message and a data output message to the existing spec. The latter could show up as a CV port on the host.

It’s not clear from the documentation how many bytes of accuracy actuators can actually support from this — I’m assuming four, given the length of the values, but the system only supports 1 byte worth of defined steps?

Also, a note — while it’s nice to have a pointer to the documentation, “RTFM” is a pretty 90’s way of interacting with customers, especially for what is not the clearest protocol spec I’ve ever read.

2 Likes

I will save this one. The Control Chain protocol has works/improvements planned to kick in really soon. We want to take the kick/needs for the Expression Pedal release to pay attention to it.

2 Likes

The return channel would really open up a lot of possibilities too — it could even just be appended to the data request command, so you keep the same polling structure on the host. You’d need to add an additional structure to each of the device description and control assignment messages. Given this, you could, for instance, build an 8x8 CV I/O interface sampled at about 1.2kHz (running the serial line flat out). I’m assuming you’ve got a somewhat lower polling rate — the spec doesn’t say. Assuming it’s optimized for human interfaces, I can’t see the polling rate being much lower than 100Hz, and that’s still pretty viable for CV for some purposes, and just fine for hardware meters and UI elements.

Unrelated, it’s not clear from the spec if the scale points list in the control assignment is intended to e.g. provide a list of strings for a control that’s selecting between different named modes. If so, great — that’s something I’ve been wanting to see in the on-pedal UI too. Some explanation of both this and the “steps” part of the device description — possibly some worked examples — would go a long way toward making this documentation more useful.

5 Likes

I’m also pretty interested in this, as I’d like to build Arduino controllers as well.

3 Likes

Managed to get the code compiled to Shield, but then plugged into my Duo and it didn’t show up. I know there’s a troubleshooting guide, but I’m now very much in the deep end of my knowledge gap. I’m assuming I should probably figure out Linux for that process…

1 Like

what is the Arduino IDE version that you are using?

I’m using Atom 1.58 with PlatformIO (plugin, ver 5.2.5).

This example is for an analog pot (as it variable resistor), whereas a rotary encoder is a ‘digital’ thing, firing up electrical signal with every small turn of a knob, like continuous knobs on the MOD Dwarf itself. It requires more hassle than just hooking up a pot to an analog pin of Arduino. @ozymandias, with a right library implementing an encoder, you can use it with the Arduino shield, the choice to make is what events to emulate with a turn of an encoder. Continuous control, as implemented in the Control Chain library won’t do, I guess, 'cos it has min and max values, and the encoder is continuous. I’d think of repetitive pressing of one switch while turning left and of another switch while turning right… Let’s exchange some ideas on this.

3 Likes

Looking forward to it! Keep us posted!

2 Likes