Arduino dev: start-up sequence

Hi there!

A word of caution for those who use ControlChain library and who power up their Arduino shield based devices over Control Chain RJ45 cable, and follow the examples from the lib, like Button.ino.
Make sure you first create the cc device itself with newDevice, then create all the actuators you need, and only then call begin() - a function that starts up serial communication over Control Chain link.

Button.ino (and other examples for that matter) has it the other way 'round, it first calls begin(), and then creates the device and actuators, so what you may find yourself with is that a handshake happens before the actuators are created, and your MOD device will see a Control Chain device with no actuators connected.

This does not happen if you use external power with your Arduino shield device and power it up before plugging in a Control Chain cable.

Hope this helps!


That’s a really useful observation. Glad you found it, because it sounds like something I’d definitely stumble into and scratch my head at for a long time :slight_smile:


Thank you a lot for reporting this!
Not sure what went wrong (I will assume that the examples were tested and something went wrong after).
Anyway, one more note for the Control Chain library review :wink:

1 Like