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

Lightsaber
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Lightsaber

by dastels on Mon Mar 30, 2020 9:31 pm

So pressing the button is the problem.

Have you double/triple checked the wiring of the switch and led? It sounds like it's causing a short between power and ground, which would cause a crash/safe-mode.

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Mon Mar 30, 2020 10:51 pm

I have just realized the RGB button I was using is 12 V. Could this have fried the Prop-Maker?

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Tue Mar 31, 2020 8:17 am

What do you mean by "is 12v"? How is it wired?

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Wed Apr 01, 2020 6:05 am

Wired the way the tutorial says to.
ONPOW 16mm Flat Round,Tri-Color (RGB) Momentary,12V (GQ16F-10E/J/41RGB/12V/S)

Its a switch I got from ebay.

Before I continue, let me say that I appreciate the time you are taking. Not to mention the patience. Thank you

I have removed the switch and the four wires (R, G, B and V+) from the Prop -Maker, left the SWITCH and GND wires on the board, to turn it on. Still going in to Safe Mode.
I have looked over soldering on the headers with a magnifying glass, ten times over. Looks good. I think at this point its best to delete the software from the M4 and every thing downloaded on my computer, and start fresh.
I want it to be set up like the picture bellow, only I will be using an 18650 battery instead of the battery shown. The single Neopixel will be the same color as the two 60 LED strips.
How do the LED's need to be wired.?
What part of the code do I need to change ?
Attachments
lightsaber diagram.jpg
lightsaber diagram.jpg (545.64 KiB) Viewed 70 times

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Wed Apr 01, 2020 12:27 pm

Neopixels need to be connected in series. Dataout from one pixel/strip to datain from the next. power and ground are all connected together.

The button LED's 12v rating just means that the LED should be powered by 12v. Less and it might not light or be very bright.

I suggest you work simply. Try simple things individually. Try some simple neopixel code (remember to enable power to the neopixel port). A simple example to monitor the switch. To play a sound, etc.

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Thu Apr 02, 2020 6:32 pm

Does touching the Switch wire to ground wire do the same thing as the push button?

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Thu Apr 02, 2020 9:11 pm

Yes. The switch simply connects the SWITCH input to ground. Simply touching the wire may be a bit bouncier though, which could cause problems (likely as the code seeing multiple presses).

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Fri Apr 03, 2020 12:34 am

When touching the two wires it goes into safe mode, just as it did when I had the RGB momentary switch. I ordered another board and a plain momentary switch, since Micro Center is closed because of Covid-19 (might as well call it a plague.).
In the meantime, for testing purposes, is there a way to bypass this switch so that the prop would turn on with just the enable switch?

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Fri Apr 03, 2020 9:44 am

Just to confirm, you're talking about the "SW" and "-" connection next to the neopixel connector, correct?

Does it crash (i.e. go into safe mode) without the saber code running? I.e. go into the repl, and press the switch (touch the wires).

For this I'm looking at the code on https://learn.adafruit.com/lightsaber-featherwing/software.

If it doesn't, try commenting out lines 149-151. What happens now? If it doesn't crash uncomment those lines one at a time starting with 149. Check after each change.

You could modify the software to ignore the switch.

The code between lines 149 and 152 (inclusive) could be moved to before the while True: so that the blade would turn on when powered up. You would then comment-out or remove lines 147 to 158 (inclusive) to disable the switch use. The major disadvantage is that you can do the "blade off" effect.

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Sun Apr 19, 2020 3:07 am

This is so nerve racking. I had it working last night with one Neo-pixel, one color and sound. This evening , I connect the battery and the status led stays on green. Connect it to usb, and it shows up on my computer and in MU I can load the code but that's about it.

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Sun Apr 19, 2020 10:33 am

Status LED being solid green means that you CircuitPython code is running.

Loading code in Mu from CIRCUITPY? You can't change and save it? What do you mean by "that's about it"?

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Wed Apr 29, 2020 6:35 am

Ok, I finally got the neopixel to turn on and off in the color I wanted. Still no sound. I do hear a click when I press the momentary switch to turn it off. I have tried two different Prop Maker boards and two different speakers.

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by dastels on Wed Apr 29, 2020 8:56 am

Is your sound file in the right format? You're using the files from the guide?

Dave

dastels
 
Posts: 2730
Joined: Tue Oct 20, 2015 3:22 pm

Re: Lightsaber

by Raffistyle on Wed Apr 29, 2020 3:51 pm

Weill of course they aren't. lol. I did convert them to the said format. I will try the ones from the guide and let you know.

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Re: Lightsaber

by Raffistyle on Wed Apr 29, 2020 6:51 pm

Still no sound. Just a click when turned off.

Raffistyle
 
Posts: 43
Joined: Sat Feb 02, 2019 8:34 pm

Please be positive and constructive with your questions and comments.