Go Down

Topic: Arduino Lightsaber (Read 347416 times) previous topic - next topic

jbkuma

in ./Config_SW.h
#define SWING_SUPPRESS     500
#define CLASH_SUPRESS     400  // do not modify below 400, otherwise interlocking clash sounds can occur
#define BLASTERBLOCK_SUPRESS     500

You can play with these options to get the effect you want, and ignoring the note here won't break anything.

If your clash isn't activating though, maybe it is related to the way your board is mounted.  If it isn't firmly secured it could dampen the impact.

Protonerd

Thanks for a fast reply. Just reread my post and realized that maybe didn't explain it prorerly.

So what happens is they hit sabers and saber changes color. They hit again pretty fast and because saber is still in a state of changed color(flash on clash) it looks wierd, like if they didn't do a second hit even though they did. Also, since the clash itself is few miliseconds longer sabers are still touching each other and change color back to normal not when they part them but when they are still in a clash state.

So in the end it looks like when they clashed sabers second time they did it in a "flash on clash" already on and then it changes color to normal too early so you get a feeling something is either too slow or too fast.

They did couple fights and every time maybe 1 out of 3-4 hits if they keep up a fast dueling pace appears to be w/o any flash or more like flash staying on. So i started to wonder if it may be related to me using poll method or i just need to make the flash time shorter(if it's even possible).

Sorry if they way i described it is too confusing...
I fully agree to what jbkuma wrote, we human beings cannot execute movements faster than the processing speed of even a mere 8-bit controller, so defintely the assumption that the circuit is occupied with something else when the next clash occurs is wrong. But there are parameters described in jbkuma's answer which govern the minimum time between clashes and the FX duration. That said, both with the poll and int based clash detection, for our human perception of time the response is instantenous.

techjunkie

So has anyone firgured out how use the LSOS or FX-saberOS on a ADAfruit feather ATmega328 or a Feather mo express with Music maker feather wing which has both the sd reader and the?  Novice would be an improvement on my coding skills. i am trying t learn so i can adapt LSOS currently by setting pins and using the luxeon codes for my pcb led.
it seems like it would be straight forward if i was using the same accelorometer and Dfplayer but i am building two sabers with the adafruit i already have. so a point in the right direction would be amazing if anyone can help

jbkuma

You can use any ATmega328 based board so long as the necessary pins are available.

Several of us are working on an M0 base solution, but none of us has had a lot of time to devote to it yet.  The platform is entirely different and LSOS/FX-SaberOS cannot be directly ported to it in the way you suggested.

JakeSoft

I have been quietly working on this for quite some time now. It's almost done.

S.T.R.E.A.M. v1.0 Preview Video

thriller47

Quick question: with FxSaberOS with one button config, button must be latching? or momentary?

Thanks in advance.

Protonerd


thriller47

#1417
Nov 27, 2018, 12:28 pm Last Edit: Nov 27, 2018, 12:28 pm by thriller47
Thanks, I'm trying to build an Homebrew saber, try to figure out how to put in hilt.
In diagrams, there is supply battery(18650) that is directly connected to arduino, but 3.7v is'nt too low?
I have a dcdc booster, can I supply arduino with this?

jbkuma

You can boost it, but it is not necessary.

Messiahlad

I use to boost mine, but it just adds a step that isn't needed. Connect as the diagram recommends.

If you do want to make your own homebrew saber, but would like an easier time putting the parts together, I really recommend the Brewboard by SaberRepublic as it will simplify the process. After making quite a few from scratch, these really lower your build time.

Just buy all the components and then solder these to the brewboard!

https://saberrepublic.bigcartel.com/

thriller47

#1420
Nov 30, 2018, 09:51 am Last Edit: Dec 01, 2018, 01:03 pm by thriller47
Thanks all of you.

So I can supply 3.7v to arduino nano 5v. That's ok.

Brewboard is sold out, damn it!!! :)

Edit: I found Brewboards, big thanks to Jc from SaberRepublic.



thriller47

Another dumb question: is necessary 2 buttons? or can install only one  and operate in "one button mode"?

Maintaining Main switch in diagrams.

Messiahlad

Another dumb question: is necessary 2 buttons? or can install only one  and operate in "one button mode"?

Maintaining Main switch in diagrams.
No, I actually prefer one button myself. Its in the build options as well as all the flexiconfig instructions. One button is really easy to use. Read the Github guide for one button, but in the config  just define OneButton as it recommends. Let me know if you have trouble.

thriller47

@Messiahlad Thanks for your help.

Now waiting for brewboards to arrive, so begin the builds.

For now, i'm "studying" FxSaber code.

Messiahlad

No problems, always happy to help. jbkuma is the man who really helped me in the beginning, he always has clear and concise information.

Love those brewboards, they save so much time and if your hilt is long or wide, then they work perfectly.

In the near future, I will post random build pics on my personal Facebook build page,  so others can look at it. Nothing glamorous, but it's just there as extra reference for people.

Go Up