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.

Lightsaber

by Raffistyle on Wed Mar 25, 2020 6:38 am

Ok, I purchased a new M4 Express and a new prop-maker. Followed the Ruiz brothers- tutorial exactly, used the latest CircuitPy and the matching libraries, and still get the pulsing yellow light. After doing some google searching, I found I'm not the only one with this problem. Maybe I haven't looked in the right place but other than the Ruiz Brothers, I don't know of any other builders in the "lightsaber community" using Adafruit boards. Which makes me wonder.

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

Re: Lightsaber

by dastels on Wed Mar 25, 2020 10:18 am

Safe mode. I've found that's often power related. The lightsaber has a lot of NeoPixels in it. A couple questions: what color were you setting the blade to, and what brightness are they set to?

Dave

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

Re: Lightsaber

by Raffistyle on Wed Mar 25, 2020 12:53 pm

I believe the code is written to display purple at full brightness

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

Re: Lightsaber

by dastels on Wed Mar 25, 2020 1:20 pm

Try reducing the brightness and/or using just red, green, or blue. If that works, then it's the case of the NeoPixels drawing too much current. At full brightness purple - purple uses both red and blue - each NeoPixel will draw 40mA. Using just red, green, or blue will only draw 20mA per NeoPixel. Reducing brightness will reduce the current draw as well.

When too much current is drawn, the battery voltage can dip and the board experiences what is essentially a brown-out which, if serious enough, will crash it and put it into safe mode.

Dave

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

Re: Lightsaber

by Raffistyle on Wed Mar 25, 2020 1:39 pm

Thanks Dave. I will give that a shot.

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

Re: Lightsaber

by Raffistyle on Thu Mar 26, 2020 5:33 pm

Nope same problem. I wonder if this problem was ever solvrd.

https://www.reddit.com/r/adafruit/comme ... ork_right/

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

Re: Lightsaber

by dastels on Thu Mar 26, 2020 6:01 pm

Try this: change the number of pixels to 5. See if that helps.

You're using this guide, right? https://learn.adafruit.com/lightsaber-featherwing

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

Re: Lightsaber

by Raffistyle on Thu Mar 26, 2020 6:39 pm

Yes, but only using 60 pixels on my strip

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

Re: Lightsaber

by Raffistyle on Fri Mar 27, 2020 2:32 am

No change. With the Prop-maker it goes into safe mode, When I run the M4 in MU's REPL, I get
code.py output:
Traceback (most recent call last):
File "code.py", line 53, in <module>
RuntimeError: SDA or SCL needs a pull up

The same problem I had with the first M4 and Prop-maker I purchased. The only difference was the first one, I used just a momentary push button with out the RGB part in the code. I started over thinking I may have messed up in my soldering or something,

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

Re: Lightsaber

by dastels on Fri Mar 27, 2020 9:08 am

Possibly. Double check all your soldering. Post a clear photo of the soldering if you'd like feedback.

Dave

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

Re: Lightsaber

by Raffistyle on Mon Mar 30, 2020 4:59 am

I have disconnected every thing and its still going into safe mode. I am pretty sure its one of two things. An error in the neopixel.mpy or the PWR pin on the Prop Maker "by default is pulled low so you must set high to turn on the NeoPixels/Audio/RGB." If that is case I don't know how to do that.

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

Re: Lightsaber

by dastels on Mon Mar 30, 2020 8:37 am

There's not a problem with neopixel.mpy (unless the copying was corrupted). What do you see in the REPL?

The lightsaber code manages the propmaker wing power:

Code: Select all | TOGGLE FULL SIZE
enable = DigitalInOut(POWER_PIN)
enable.direction = Direction.OUTPUT
enable.value =False


Then when you press the power on switch:

Code: Select all | TOGGLE FULL SIZE
enable.value = True


Dave

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

Re: Lightsaber

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

With the Propmaker it goes into safe mode, so I get nothing in the REPL. With out it, it says

code.py output:
Traceback (most recent call last):
File "code.py", line 53, in <module>
RuntimeError: SDA or SCL needs a pull up

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

Re: Lightsaber

by dastels on Mon Mar 30, 2020 3:54 pm

Oh.. you get the "SDA or SCL needs a pull up" message without the wing attached? That makes sense.. there aren't any puyllups on the I2C lines on the Feather, itself.

Will anything work with the propwing attached? A simple blink script? Can you even get into the REPL with the wing attached?

Dave

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

Re: Lightsaber

by Raffistyle on Mon Mar 30, 2020 8:56 pm

I plug in the usb the light on the board is green. I then start Mu and it displays the code.py When I click the Serial, just shows a cursor on the REPL. When I press the RGB momentary switch it goes into safe mode and both the Mu editor and Windows prompt a new device being detected.

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

Please be positive and constructive with your questions and comments.