I’ve wired up some strip lighting underneath the railings (denoted as the red lines in the graphic below) leading downstairs at my house using a PixelBlaze and output expander, the railing forms an L shape as it bends around a corner. I’m currently using two of the expander channels (with more to come later). I’ve tweaked the starting index on the expander configuration to account for the two strips. Due to some constraints with the existing construction, the data input wiring comes into both strips at the corner of the L as shown in the image below (noted as “in”). I’m having some issues with render2D and 3D; ideally, I want the strips to act as a single continuous strip, flowing in the direction of the yellow highlighted line. However, when testing basic 2D and 3D render functions, the strips light as shown by the green highlighted line. Basically, I’m looking for a software solution for inverting one of these strips for 2D and 3D renders since I’m stuck with the physical layout due to existing drywall. I’m fairly confident this is a pixel mapping issue, but I haven’t had any luck with my edits flipping the order of the JSON array. Any pointers as to where I’m going wrong would be appreciated.
As a basic test, I’m using the following pattern
export function beforeRender(delta) {
t1 = time(.1)
}
export function render3D(index, x, y, z) {
h = t1 + index/pixelCount
s = 1
v = 1
if (z < .4){
hsv(h, s, v)}
}
For reference here’s my JSON Array
[[0,0,62], [0,1,60], [0,2,58], [0,3,56], [0,4,54], [0,5,52], [0,6,50], [0,7,48], [0,8,46], [0,9,44], [0,10,42], [0,11,40], [0,12,38], [0,13,36], [0,14,34], [0,15,32], [0,16,30], [0,17,28], [0,18,26], [0,19,24], [0,20,22], [0,21,20], [0,22,18], [0,23,16], [0,24,14], [0,25,12], [0,26,10], [0,27,8], [0,28,6], [0,29,4], [0,30,2], [0,31,0], [0,81,0], [2,82,0], [4,83,0], [6,84,0], [8,85,0], [10,86,0], [12,87,0], [14,88,0], [16,89,0], [18,90,0], [20,91,0], [22,92,0], [24,93,0], [26,94,0], [28,95,0], [30,96,0], [32,97,0], [34,98,0], [36,99,0], [38,100,0], [40,101,0], [42,102,0], [44,103,0], [46,104,0], [48,105,0], [50,106,0], [52,107,0], [54,108,0], [56,109,0], [58,110,0], [60,111,0], [62,112,0], [64,113,0], [66,114,0], [68,115,0], [70,116,0], [72,117,0], [74,118,0], [76,119,0], [78,120,0], [80,121,0], [82,122,0], [84,123,0], [86,124,0], [88,125,0], [90,126,0], [92,127,0], [94,128,0], [96,129,0], [98,130,0], [100,131,0], [102,132,0], [104,133,0], [106,134,0], [108,135,0], [110,136,0], [112,137,0], [114,138,0], [116,139,0], [118,140,0], [120,141,0], [122,142,0], [124,143,0], [126,144,0], [128,145,0], [130,146,0], [132,147,0], [134,148,0], [136,149,0], [138,150,0], [140,151,0], [142,152,0], [144,153,0], [146,154,0], [148,155,0], [150,156,0], [152,157,0], [154,158,0], [156,159,0], [158,160,0], [160,161,0], [162,162,0], [164,163,0], [166,164,0], [168,165,0], [170,166,0], [172,167,0], [174,168,0], [176,169,0], [178,170,0], [180,171,0], [182,172,0], [184,173,0], [186,174,0], [188,175,0], [190,176,0], [192,177,0], [194,178,0], [196,179,0], [198,180,0], [200,181,0], [202,182,0], [204,183,0], [206,184,0], [208,185,0], [210,186,0], [212,187,0], [214,188,0], [216,189,0], [218,190,0], [220,191,0], [222,192,0], [224,193,0], [226,194,0], [228,195,0], [230,196,0], [232,197,0], [234,198,0], [236,199,0], [238,200,9]]