Programming Lumidrive

Hi, I bought the lumidrive + led strip, exact same setup, same type of led , same number, same lenght like the example. I want to activate the rainbow cycle. I’m not able to light it up. Its connected to my computer (usb3). Should it be in that configuration? I’m using sublime text. I’m not a coder…

def rainbow_cycle(wait):

num_pixels = len(pixels)

for j in range(255):

for i in range(num_pixels):

rc_index = (i * 256 // num_pixels) + j

pixels = wheel(rc_index & 255)
pixels.show()
time.sleep(wait)
print(“Clearing LEDs.”)
color_fill(BLACK,0)
#Ah trusty ol’ blink.
while True:
led.value = True
time.sleep(.5)
led.value = False
time.sleep(.5)

while True:
rainbow_cycle(0)

Hi Maxleclair,

I think the issue may be that you have two while loops in your [main.py file. Try removing the while loop for blink and just run the rainbow_cycle(0) loop. Depending on how you are editing it using Sublime Text, just save the file after removing the blink function and you should see the rainbow pattern. If you still do not see it, while leaving the LumiDrive connected via USB, right-click the CIRCUITPY drive and eject the device.

If you continue to have issues, please take a few photos of your LumiDrive and the LED strip you are using with it and we can troubleshoot further.](SparkFun_LumiDrive_Example_Code/main.py at master · sparkfun/SparkFun_LumiDrive_Example_Code · GitHub)

HI, I took out the blink loop and the blue light stop…tried this before asking in the forum…the rainbow doesnt start.

[attachment=0]20190601_150642.jpg[/attachment]

[attachment=1]20190601_150658.jpg[/attachment]

[attachment=2]20190601_150715.jpg[/attachment]

https://www.sparkfun.com/products/14015

https://www.sparkfun.com/products/14779

https://www.sparkfun.com/products/14743

Thanks for taking those photos and clarifying what LED strip you are using. Everything looks just fine here. Try using this for your while loop in the main.py file:

while True: 
    rainbow_cycle(0)
    led.value = True
    time.sleep(.5)
    led.value = False
    time.sleep(.5)

and also make sure two setup variables (num_pixels and brightness) are setup or left as they were for the default example. Let us know if you continue to have issues and we can try some other suggestions.

No rainbow again… Showed it to a friend during the weekend who uses a Mac (I’m PC) and it didn’t work either…He does a little of programming.

Hmm, it sounds like either your LED strip or the LumiDrive is defective. As a last-ditch effort just in case something in your main.py file got deleted or something else strange happened, try overwriting the main.py file on your LumiDrive with the [master/default file and then set your while loop to

while True: 
    rainbow_cycle(0)

If that still does not get anything to display on the LED strip, please fill out the form on [this page and in the “Why do you want an RMA?” box, fill in a brief description and link to this topic and we will follow up with further instructions.](Return Policy - SparkFun Electronics)](SparkFun_LumiDrive_Example_Code/main.py at master · sparkfun/SparkFun_LumiDrive_Example_Code · GitHub)