V1.4.0 Pre-Release Testing

@ricardocrudo

Hi! Thanks for the update. Sadly it seems that even with two buttons the arduino cc lib still busts through the memory limit on the diecemilla, thought it does seem to compile with a single one:

Global variables use 1012 bytes (98%) of dynamic memory, leaving 12 bytes for local variables. Maximum is 1024 bytes.

For you to reproduce, here is my sketch:

#include<Arduino.h>
#include <ControlChain.h>

ControlChain control_chain;

const int buttonPinBase = 3;
const int numberOfButtons = 1;

int lastButtonState[numberOfButtons] = { LOW };//, LOW, LOW};//, LOW};//, LOW };

float controlState[numberOfButtons] = { 0};//, 0, 0};//, 0};//, 0 };
cc_actuator_config_t cc_actuator_configs[numberOfButtons];

void setup()
{
  control_chain.init();

  const char *uri = "https://nu.fps.io/mod_button_box_hack";
  cc_device_t *device = control_chain.newDevice("ModButtonBoxHack", uri);

  // We use INPUT_PULLUP to use the included pullup resistors
  // in the microcontroller
  for (int button = 0; button < numberOfButtons; ++button)
  {
    pinMode(buttonPinBase + button, INPUT_PULLUP);

    cc_actuator_configs[button].type = CC_ACTUATOR_MOMENTARY;
    cc_actuator_configs[button].name = "Button";
    cc_actuator_configs[button].value = &controlState[button];
    cc_actuator_configs[button].min = 0.0;
    cc_actuator_configs[button].max = 1.0;
    cc_actuator_configs[button].supported_modes = CC_MODE_TOGGLE | CC_MODE_TRIGGER;
    cc_actuator_configs[button].max_assignments = 1;

    cc_actuator_t *actuator;
    actuator = control_chain.newActuator(&cc_actuator_configs[button]);
    control_chain.addActuator(device, actuator);
  }
}

void loop() {
  for (int button = 0; button < numberOfButtons; ++button)
  {
    int state = digitalRead(buttonPinBase + button);

    // Detect state transitions
    if (state != lastButtonState[button])
    {
      // Going from low to high (on push)
      if (state == HIGH)
      {
        controlState[button] = 1;
      }
      else
      {
        controlState[button] = 0;
      }
    }

    // Store away the current state for the transition detection
    lastButtonState[button] = state;
  }

  // Delay a couple of millisecs to avoid rapid firing while closing/opening a switch
  delay(10);
}

Itā€™s not yet tested since I never got to deploy it to the device, but it should be enough to debug the memory constraints.

Hi,

I just tried to install 343 again with FF on Linux (Kubuntu):

No - wonā€™t work. Only with Chrome it worksā€¦

I tried this (with Chrome) but got nothing interesting. Here is what I have done:

  1. Update Duo with Chrome to 343
  2. Downloaded and installed last ControlChain library (2 days old) for Arduino-IDE-1.8.1
  3. Used the example sketch (Button) - only added digitalWrite(ledPin, HIGH); to avoid the pull-up resistor
  4. Uploaded the sketch on my Leonardo
  5. Tested the sketch (connecting GND to pin7 => LED13 is on for about 10 secs)
  6. Connected the Leonardo to the Duo USB A connector (with the same cable used for programming)
  7. Using Chrome for http://192.168.51.1

I cannot see anything useful. When going to console and entering HARDWARE_PROFILE I get:

What do I have to expect in MOD-UI or the console?

Regards, Holger

P.S.: the same happens with an Arduino Uno.

Build 346 available:

  • donā€™t set date/expire time on webserver
  • Force cache-control

The mod footswitch can now use lists (scalepoints and presets).
This makes its firmware very close to a first 1.0.

@Codeman Iā€™ll see if I can reproduce the firefox issue.
Regarding the control chain devices, try running the mod-ui on the console.
SSH into the mod and run this:

systemctl stop mod-ui
mod-ui.run

With the arduino connected, it should print these messages:

cc_hardware_added https://github.com/moddevices/cc-arduino-lib/tree/master/examples/Button Button 0.0.3
cc_actuator_added https://github.com/moddevices/cc-arduino-lib/tree/master/examples/Button:0:0

@fps thanks for the feedback. FYI, the Arduino library is using a generic library which implements the Control Chain layer (cc-slave). Iā€™m developing it upon an ARM which is used for the footswitch extension. Iā€™ve to say Iā€™m quite comfortable in the matter of RAM and Flash memory, for this reason the cc-slave is a bit bloated when you bring it to Arduino 8-bit boards. On the other hand Arduinos as Diecimila, which has a humble amount of RAM, might require a specific implementation in order to reduce the use of resources to the minimum possible. While this is not happening Iā€™ll check what else configuration I can make available to be adjusted.

iā€™m not getting into the whole control chain thing, but i did play a show last night with build 346 (including a few unstable plugins), and everything went swimmingly.

earlier, while editing my pedalboard, i got some wierd transparent-looking plugins in the browser UI, but i think that was just due to something misbehaving in the pedalboard chain, because when i made a fresh board with those same plugins, it was all ok.

ā€¦seems like sometimes things get wierd after some amount of adding/deleting/re-patching/re-assigning in a complicated pedalboard, but this is something iā€™ve seen for quite a while now. sorry ā€œthings get wierdā€ is not very helpful, but itā€™s really hard to pin down what causes the problems in that scenario.

but that IS the first time iā€™ve seen (temporary) transparent-looking plugin GUIs. fwiwā€¦ (N.B. that might have been in the build just before 346ā€¦ it was a mad flurry of building, pre-gig, and i updated to 346 towards the end, once i had settled on a simpler setup).

[ warning: comment_so_vague_as_to_be_useless ā€”> ] overall, my impression so far of 346 is similar to that magical, smooth feeling iā€™ve had from time to time when a particularly splendid rt-patched-kernel comes along. :wink:

cheers!
.pltk.

Build 352 available:

  • add a close button to a few dialogs, for overall consistency
  • added icon on bottom-right that lists the connected control chain devices (using placeholder images for now)
  • donā€™t allow pedalboard preset save-as when list is addressed
  • rework available RAM calculation code, using the same values that ā€˜htopā€™ uses
  • show notification when a control chain device is connected and disconnected
  • several tweaks regarding webserver cache
  • small text changes in web interface
1 Like

Build 353 available:

  • add a ā€˜(i)ā€™ icon on top of the plugin guis, clicking on it will show the plugin information dialog (same one used when clicking on the bottom plugin bar)

now using a proper control-chain icon

Hi @falkTX

I installed Build 353 - works fine (from Chrome (Linux)).

I tried with the Button example on an Arduino-Leonardo but nothing is shown on the UI.

Regards, Holger

Build 355 available:

  • Add ā€œsee onlineā€ button to plugin info dialog
  • Minor text changes

@Codeman Have a look at /etc/udev/rules.d/60-arduino.rules, maybe your device doesnā€™t trigger that rule?
Adding a manual symlink of /dev/ttyUSB0 to /dev/arduino might workā€¦

@falkTX iā€™m also having the ā€œchecking file | invalid fileā€ loop on firefox in Ubuntu. iā€™ll go try google chromeā€¦
ā€¦and, yes, itā€™s fine in chrome.

weird!

Iā€™m too lazy to look into the javascript code doing the update, but I suspect automatic decompression of the downloaded file performed by firefox making the subsequent file hash check fail. @falkTX

1 Like

Will check this soon - sounds plausible for this problemā€¦ My Arduinos have several USB-IDsā€¦ even the ā€œsame typeā€ of Arduino. Seems to be different if it is an original or china-ware.

Thanks, Holger

Hi Guys,

I just thought I would give all this a go with a Arduino Due.

Not having a lot of luck, actuators not seen.

Here is what I get starting mod-ui:

I get the error if the arduino is plugged in or not.

Cheers

Andy

Powered on and off, same issue but only one initialised message:

I added a detection for my Arduino board to the udev-rules and rebootet. Now my Uno is recognized by the Mod:

lrwxrwxrwx 1 root root 15 Jan 1 00:01 /dev/arduino -> bus/usb/003/003

But the board is still not recognized as a ControlChain device by the Mod :cry: Will have to wait for my shieldā€¦

Regards, Holger

Iā€™ve updated the Arduino library. The new release have bugs fixes and reduce the RAM memory usage. @fps now the build for diecemilla is generating a binary with 71% of RAM usage, you should be able to use it now.

@AndyCap please try this last version and let me know if it fix your issues.

The new version of the Arduino library requires the build 364.

Is the error on the modduo I am seeing not an issue then?

@ricardocrudo new version does not work for my (china-)Uno.

To be more precise: I can upload the example sketch but the Arduino is not recognized as a CC device (with specific udev rules).

Yes, this specific print:

ERROR: Controller out of memory when sending initial state (stopped at 48)

Itā€™s about the displays/controller firmware, specifically limiting the initial ā€˜Allā€™ bank.