Porting ControlChain to ESP8266

I’m trying to use the Arduino ControlChain shield with an ESP8266 (instead of an Arduino Uno). I’ve managed to build the Arduino example on the ESP8266 (replacing the Timer functions with ESP8266 equivalents etc). However, now I am running into issues with Handshaking – the ESP8266 seems to send out the correct handshake, but for some reason the Mod Duo doesn’t like it and doesn’t respond as expected.

It would be much easier to do this with a debuggable ControlChain master. I’ve taken a look at the code on GitHub. Is there any way to run a simple ControlChain master on Linux or Mac for debugging purposes?

1 Like

Yes.
Here are the steps to build and install:

git clone https://github.com/moddevices/cc-master.git
cd cc-master
./waf configure --prefix=/usr
./waf build
./waf install

After install execute:

export LIBCONTROLCHAIN_DEBUG=2
controlchaind /dev/ttyACM0 -f


Note that you have the option to debug it directly on the MOD:

ssh root@192.168.51.1
systemctl stop controlchaind
export LIBCONTROLCHAIN_DEBUG=1 # use 2 for verbose debug
controlchaind /dev/ttyACM0 -f

Great, thank you! It was actually enough for me to just debug directly on the MOD Duo. Instead of the last command you proposed, I just used controlchaind.run, which seems to work very nicely.

I’ve created a pull request to add this information to the GitHub repository:

Spoiler alert :wink: I actually got it to work with the ESP8266, now I’ll work on an extended example.

1 Like

A little update.

I managed to use an iPad as a Wifi Control Chain controller today. I implemented this by using the ESP8266 to talk to the Control Chain and also open up a Wifi OSC connection to TouchOSC running on my iPad. (I chose OSC merely because TouchOSC is the only suitable dashboard-like app I could find).

I still need to polish this a bit.

Basic ESP8266 support is already on GitHub if anybody wants to play with it:

@ricardocrudo, please let me know if this is something you are generally interested in adding to your repository - then I’ll create a pull request once I’m finished. Also, please feel free to provide feedback on the implementation

3 Likes

Hey @crenz. That’s very nice! Sure, please send us a pull request I’ll check it ASAP.
Thanks for sharing.

I’ll add rotary controller support, do some cleanup and then create the pull request.