Search code examples
node.jsnode-redled

Syntax to set color of LED in sense-hat using nodered


I am working on sense-hat using node-red. I found that, to set the four corners of the display to red, green (#00ff00), yellow and blue (0,0,255):

0,0,red,0,7,#00ff00,7,7,yellow,7,0,0,0,255

But how to set color for 2 leds in column 2 and 3 of the LED panel in rows 2-7.

Can anyone please suggest me in this?


Solution

  • The sidebar help for the SenseHAT node describes the required syntax:

    Format: <x>,<y>,<colour>
    
    x and y must either be a value from 0 to 7,
    a * to indicate the entire row or column,
    or a range such as 3-6.
    

    But how to set color for 2 leds in column 2 and 3 of the LED panel in rows 2-7.

    If you want to set just two leds within those ranges then just pick two X/Y values within that range and set them.

    2,2,red,2,3,red