led clear

Author:
License: GPL
Github: rbrt/testing/led clear.axo

Inlets

bool32.rising clear

bool32.rising clearAll

int32 row

Outlets

None

Attributes

objref LED

Declaration
bool trig;
bool dorow;
bool trigall;
bool doall;
uint8_t count;
Control Rate
if (inlet_clear && (!trig && !count)) {
  trig = 1;
  dorow = 1;
}
if (dorow && !attr_LED.ROW) {
  dorow = 0;
  memset(attr_LED.array + 8, 32, 68);
  attr_LED.ROW = inlet_row + 1;
}
if (!inlet_clear && !dorow)
  trig = 0;

if (inlet_clearAll && !trigall) {
  trigall = 1;
  count = 4;
}
if (count && !attr_LED.ROW) {
  memset(attr_LED.array + 8, 32, 68);
  attr_LED.ROW = count;
  count--;
}
if (!inlet_clearAll && !count)
  trigall = 0;

Privacy

© 2024 Zrna Research