Solved Error: in file macro line 44 column 35: M260: array too long
-
Is there a fixed maximum array size to send to M260? I think mine had 33 elements, which doesn't seem like a lot.
; Changes NeoPixel LED Color Values ; Manage parameters and defaults var I2CAddress = 0x60 var Red = 255 var Green = 255 var Blue = 255 var StartLEDNum = 0 var LEDCount = 10 if exists(param.A) set var.I2CAddress = param.A if exists(param.R) set var.Red = param.R if exists(param.U) set var.Green = param.U if exists(param.B) set var.Blue = param.B if exists(param.S) set var.StartLEDNum = param.S if exists(param.N) set var.LEDCount = param.N ; Set up bytes to send var Bytes = vector(3 + 3 * var.LEDCount, null) set var.Bytes[0] = 0x0E ; NeoPixels Base Address on seesaw set var.Bytes[1] = 0x04 ; BUF Function Register of seesaw NeoPixels feature set var.Bytes[2] = 3 * var.StartLEDNum ; Start Address Within seesaw NeoPixels Buffer var BlueIndex = 0 ; Data in BGR order while iterations < var.LEDCount set var.BlueIndex = 3 + 3 * iterations set var.Bytes[{var.BlueIndex}] = var.Blue set var.Bytes[{var.BlueIndex + 1}] = var.Green set var.Bytes[{var.BlueIndex + 2}] = var.Red ; Send the bytes M260 A{var.I2CAddress} B{var.Bytes}
-
@DonStauffer the maximum number of I2C bytes that can be sent and/or received by RRF in a single transaction is 32. I could increase this value somewhat - how much do you need?
-
@dc42 The NeoDriver can't handle more than 32 bytes anyway, I discovered. I really just wanted to gain knowledge rather than request a change. So I'm good now.
-
-