Hello all,
As a few people around here, i’m trying to develop an extension so my students can program easily neopixel type of rgb ledstrip. The concept is simple: create block corresponding to the main functions available in FastLED.io. So far, I have a working basic extension that can init a ledstrip, prepare leds and apply changes to the strip.
I would like to make that extension a bit more versatile, step one making it possible to use different types of ledstrip.
I am trying to pass an argument received from a block to a function used in setup:
“setup”:“FastLED.addLeds<{2}, {1}, RGB>(strip_{0}, {3});\n”,
{2} is holding a ledstrip type, lets say “WS2812B”. When mblock create the sketch, it adds double quote, so I end up with
FastLED.addLeds<“WS2812B”, 6, RGB>(strip_0, 36);
instead of
FastLED.addLeds<WS2812B, 6, RGB>(strip_0, 36);
So I cannot pass this argument directly…
Does anyone as an idea that would be simpler than writing an external function? Just trying to drop the double quotes.
A long time ago I used to code, trying to get back at it.
Maxime