Immediate Send Function

Hello there,
I am trying to use this function following these instructions:

The article says:

Try using the above function in a Code Block on a potentiometer and watch the first LED get brighter on each module in your setup! You can find it in Profile Cloud, it’s called “Coloring with immediate send”.

So, I go to my pot and type this on a codeblock
immediate_send(nil, nil, 'led_value(0,1' .. val .. ')')

But nothing happens, is there any info that could I be missing?

Also is not possible to reference between modules? for example:

on my PO16 pot

shift = (myBU16)element[0]:button_state()
if shift > 0 then
  do something
end

Thanks in advance for any light on this.

btw - I’ve checked the “Coloring with immediate send” profile, but still looks a bit confusing to me.

Two things!

Make sure you’re using the latest firmware version, as it’s required for this function.

The Coloring with immediate send-profile needs to have its system element copied to the module you’re trying to color.

The immediate_send(nil, nil, 'led_value(0,1' .. val .. ')') function should be working properly, when it can change the LED intensity of the first LED of all connected modules.

1 Like

Hi narayb

Thank you so much.

Yes I have the latest firmware for my both devices (PO16/BU16). If I try the immediate_send() with the “Hello World” examples, they works fine.

However this example doesn’t work, if I understand it correctly, if I put this on a PO16 pot it should set the led intensity for my first BU16 button led as well?

immediate_send(nil, nil, 'led_value(0,1' .. val .. ')')

However, nothing happens when I move my PO16 pot.

Would be very helpful to have some simple examples about it, because this function is pretty useful.

1 Like

Hi!

So I double-checked the code you sent. It has a comma missing!

immediate_send(nil, nil, 'led_value(0,1' .. val .. ')') ← what you sent

immediate_send(nil, nil, 'led_value(0,1,' .. val .. ')') ← how it should look like

The error was overlooked in our article, I just pushed an update to it, should be fixed in a couple of mins. Thank you for noticing and letting me know!

1 Like

oh nice!

Thanks, now it works! I will try somethings with it now.

Thanks once more again.

1 Like