Raising only one LED


can I ask for advice:

  1. How can I turn on one particular LED, such as ice number 10?
  2. Can I find out which LEDs are currently being displayed?


  1. turning on a single LED
    Inside render(index)
    // Only turn on led #10
    if(index == 9) {

  2. the function render(index) has a parameter index which tells you which led is being used for that iteration of the function. You can add a watch for index to see which one is currently being used, but the watch would update very quickly. Can you give more info on your second question?


one more help I need.
if I use x = random (pixelCount) randomly, I get a number like “56.454436”, but how can I only get integers, that is, “56”?


You can use floor or ceil functions depending on if you want the closest low or high number.