Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

LED guitar fingerboard
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: LED guitar fingerboard

by adafruit2 on Fri Feb 14, 2020 7:00 pm

hi please use the exact dotstar example - exactly as it is with NO changes - check the board pinouts page so you know which pins to connect to

adafruit2
Site Admin
 
Posts: 19217
Joined: Fri Mar 11, 2005 7:36 pm

Re: LED guitar fingerboard

by Rymano on Fri Feb 14, 2020 7:31 pm

I have clock and data pins on the itsybitsy. Tried those after attempting unedited code along with swapping to the AO and A1 pins with both not showing any results.

Thank you.

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Re: LED guitar fingerboard

by adafruit2 on Fri Feb 14, 2020 7:34 pm

paste the exact code you're running - also please use the Mu editor so you can see the REPL / Serial monitor

adafruit2
Site Admin
 
Posts: 19217
Joined: Fri Mar 11, 2005 7:36 pm

Re: LED guitar fingerboard

by Rymano on Sat Feb 15, 2020 7:38 pm

Here's what I've been loading with CI in pin A1 and DI in pin A2. Saved as code.py per CP instructions.

Code: Select all | TOGGLE FULL SIZE
# CircuitPython demo - Dotstar
import time
import adafruit_dotstar
import board
 
num_pixels = 30
pixels = adafruit_dotstar.DotStar(board.A1, board.A2, num_pixels, brightness=0.1, auto_write=False)
 
 
def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if pos < 0 or pos > 255:
        return (0, 0, 0)
    if pos < 85:
        return (255 - pos * 3, pos * 3, 0)
    if pos < 170:
        pos -= 85
        return (0, 255 - pos * 3, pos * 3)
    pos -= 170
    return (pos * 3, 0, 255 - pos * 3)
 
 
def color_fill(color, wait):
    pixels.fill(color)
    pixels.show()
    time.sleep(wait)
 
 
def slice_alternating(wait):
    pixels[::2] = [RED] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[1::2] = [ORANGE] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[::2] = [YELLOW] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[1::2] = [GREEN] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[::2] = [TEAL] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[1::2] = [CYAN] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[::2] = [BLUE] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[1::2] = [PURPLE] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[::2] = [MAGENTA] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
    pixels[1::2] = [WHITE] * (num_pixels // 2)
    pixels.show()
    time.sleep(wait)
 
 
def slice_rainbow(wait):
    pixels[::6] = [RED] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
    pixels[1::6] = [ORANGE] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
    pixels[2::6] = [YELLOW] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
    pixels[3::6] = [GREEN] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
    pixels[4::6] = [BLUE] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
    pixels[5::6] = [PURPLE] * (num_pixels // 6)
    pixels.show()
    time.sleep(wait)
 
 
def rainbow_cycle(wait):
    for j in range(255):
        for i in range(num_pixels):
            rc_index = (i * 256 // num_pixels) + j
            pixels[i] = wheel(rc_index & 255)
        pixels.show()
        time.sleep(wait)
 
 
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
ORANGE = (255, 40, 0)
GREEN = (0, 255, 0)
TEAL = (0, 255, 120)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
MAGENTA = (255, 0, 20)
WHITE = (255, 255, 255)
 
while True:
    # Change this number to change how long it stays on each solid color.
    color_fill(RED, 0.5)
    color_fill(YELLOW, 0.5)
    color_fill(ORANGE, 0.5)
    color_fill(GREEN, 0.5)
    color_fill(TEAL, 0.5)
    color_fill(CYAN, 0.5)
    color_fill(BLUE, 0.5)
    color_fill(PURPLE, 0.5)
    color_fill(MAGENTA, 0.5)
    color_fill(WHITE, 0.5)
 
    # Increase or decrease this to speed up or slow down the animation.
    slice_alternating(0.1)
 
    color_fill(WHITE, 0.5)
 
    # Increase or decrease this to speed up or slow down the animation.
    slice_rainbow(0.1)
 
    time.sleep(0.5)
 
    # Increase this number to slow down the rainbow animation.
    rainbow_cycle(0)

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Re: LED guitar fingerboard

by adafruit2 on Sat Feb 15, 2020 7:41 pm

post a clear photo of your wiring next

adafruit2
Site Admin
 
Posts: 19217
Joined: Fri Mar 11, 2005 7:36 pm

Re: LED guitar fingerboard

by Rymano on Sun Feb 16, 2020 4:09 pm

Proper voltage showing on DI/DO and Vcc. Sorry for the bad color choice in wiring. Vcc-Yellow, DI-Red,CI-White, GND-Blk. Thank you so much for looking into this
20200216_145047.jpg
20200216_145047.jpg (177.98 KiB) Viewed 46 times
20200216_145209.jpg
20200216_145209.jpg (216.03 KiB) Viewed 46 times
20200216_145249.jpg
20200216_145249.jpg (159.11 KiB) Viewed 46 times

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Re: LED guitar fingerboard

by adafruit2 on Sun Feb 16, 2020 4:17 pm

you finally have code and wiring right, the LED could be damaged - please try it with known-good dotstar LEDs like in a strip as its easy to damage them by soldering

adafruit2
Site Admin
 
Posts: 19217
Joined: Fri Mar 11, 2005 7:36 pm

Re: LED guitar fingerboard

by Rymano on Sun Feb 16, 2020 5:08 pm

Thank you! There's still a good chance I'm not using Mu properly but I'm going to try a fresh LED and give it another go.

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Re: LED guitar fingerboard

by Rymano on Sun Feb 16, 2020 6:21 pm

Let there be light!!!!! I totally fried the last dotstar. Thank you for your patience

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Re: LED guitar fingerboard

by adafruit_support_bill on Sun Feb 16, 2020 6:29 pm

Good to hear you've got it going now. You do need to use a light-touch when soldering the bare pixels to avoid over-cooking them.

I'd also recommend letting your pixels run for a few days to 'burn in' before gluing up the fingerboard. That will help shake out any early failures and save you the headache of having to take the neck apart again.

adafruit_support_bill
 
Posts: 77819
Joined: Sat Feb 07, 2009 10:11 am

Re: LED guitar fingerboard

by Rymano on Sun Feb 16, 2020 6:46 pm

Thanks! Not taking any chances from here on. Planning to use the LED breakout boards so my heavy-handed soldering doesn't get in the way again.

Rymano
 
Posts: 22
Joined: Fri Dec 20, 2019 4:59 pm

Please be positive and constructive with your questions and comments.