Go Down

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

jbkuma

Yes, the update to introduce pixel accents and bring back lockup on clash. 

The update has now been merged to the master branch and the wiki has been updated to reflect the new default operation as well. (single click for blasters blocks, double click for lockup on clash)

Andong

#1396
May 10, 2018, 08:37 am Last Edit: May 10, 2018, 08:40 am by Andong
I've just uploaded the new version to my board and for some reason any clash detection dissaperared(swing detection is still there). if i single click a button saber goes into blaster block mode and double click does nothing.

According to wiki:

Single Click - Activate Lockup on Clash
Double Click - Blaster Block on Swing
Long Press - Extinguish Blade

Messiahlad

If you miss the magic, check out jbkuma's beta version, if using neopixels, all the wizardry is in there. I checked, it works superb for neopixel builds.
https://github.com/Protonerd/FX-SaberOS/tree/v1.1-beta

For RGB I still need to do some housekeeping, but as soon as I finish I will release a master version
Thanks Proto,

I sure did check it out and Rather enjoyed it, as I also used it to test my neopixel blade (incomplete as only one strip arrived instead of two!)

We all appreciate the effort that goes into these builds and the sheer amount of lines that have to be typed to make the magic in the first place, not to mention the calculations for swing and pixel algorithms.

Also thanks for listen to feedback from the adopters/builders. Glad to be apart of it all.



Yes, the update to introduce pixel accents and bring back lockup on clash.  

The update has now been merged to the master branch and the wiki has been updated to reflect the new default operation as well. (single click for blasters blocks, double click for lockup on clash)
Excellent work JBKuma, Your innovations and refinements keep us looking forward to the next build!

Andong

#1398
May 10, 2018, 03:26 pm Last Edit: May 10, 2018, 04:05 pm by Andong
Thanks Proto,

I sure did check it out and Rather enjoyed it, as I also used it to test my neopixel blade (incomplete as only one strip arrived instead of two!)

We all appreciate the effort that goes into these builds and the sheer amount of lines that have to be typed to make the magic in the first place, not to mention the calculations for swing and pixel algorithms.

Also thanks for listen to feedback from the adopters/builders. Glad to be apart of it all.



Excellent work JBKuma, Your innovations and refinements keep us looking forward to the next build!
Does clash and lock up clash work for you? It doesnt work on my board, tried loading previous version of FXSOS with disabled lockup clash and regular clash works as supposed so wiring and MPU should be fine.

Hopefully someone has any ideas/suggestions cause i can't figure out why it doesn't work in the latest version :(

jenga67

#1399
May 11, 2018, 11:12 am Last Edit: May 11, 2018, 11:14 am by jenga67
Hi guys!

I have finished my latest build based on USaber lib from Jake.
Though I have updated it with code for the button:
- lock-up on long button push,
- blaster block on double button push.

Hilt is 3d printed and painted silver.
Using 3-Cree LED (green, green, white), Arduino Nano, MPU6050, DFPlayer mini.

I only have one major issue with the saber... when I turn the power on, and push the aux button for power-up, its not reacting, but if I swing or hit the blade, sound turn on without the led.

So I have to turn the power on, then Arduino needs to be reset in order to function properly, for this I quickly turn power off and back on again. (not in the video)

Have anyone ever faced this kind of issue?

Big thanks!

jenga67

Guys, has anyone tested BY8301-16P sound modules?
Do they have the same loudness as DFPlayer mini?

Thanks!

JakeSoft

#1401
Jun 20, 2018, 08:27 pm Last Edit: Jun 20, 2018, 08:27 pm by JakeSoft
Guys, has anyone tested BY8301-16P sound modules?
Do they have the same loudness as DFPlayer mini?

Thanks!
Yes, I have. They are about the same as far as I can tell for loundess as the DFPlayer mini. The specs say the amp output is the same.

Support was also added for these modules in USaber.
https://github.com/JakeS0ft/USaber/blob/master/sound/BY8301SoundPlayer.h

Messiahlad

Guys, has anyone tested BY8301-16P sound modules?
Do they have the same loudness as DFPlayer mini?

Thanks!
I have as well and I have had the same results as Jakesoft.

I find they are useful for builds where I don't intend to open the saber very often and only need a two sound fonts.

Ryan92

Hi all

So i decided to try making my own lightsaber as I own a lathe and made use of some scrap aluminum.
I already have an arduino nano and uno as well as some tri RGBled and a WT588D-U.

Now ill be honest i know absolutely nothing about arduino codes, libraries or setups and i have only ever gone as far as making an led blink, i followed tutorials about downloading library files and putting them in the correct place which iv managed to do but from that I'm completely stumped.

please, can somebody give me guidance for setting this up????

 I've made such a good job of the hilt that i want to keep going with this and not give up.


jbkuma

You are in luck, this thread is something of a Bible on the topic. If you really want to start from scratch there is nothing for it but reading and reading and building a function at a time as you learn.

You can check out USaber for example code that can work with your saber using Davey specific libraries, or you can check out FX-SaberOS which is a mature open source project that uses the DFplayer for sound. These will be your best options to get started with something ready to go.

Messiahlad

Does clash and lock up clash work for you? It doesnt work on my board, tried loading previous version of FXSOS with disabled lockup clash and regular clash works as supposed so wiring and MPU should be fine.

Hopefully someone has any ideas/suggestions cause i can't figure out why it doesn't work in the latest version :(
Hi,

Yeah it does but it was working before the update as well. I would note that I tend to have more success with JBKuma's releases as they reflect how I like my saber and generally don't introduce new issues.

jbkuma


Does clash and lock up clash work for you? It doesnt work on my board, tried loading previous version of FXSOS with disabled lockup clash and regular clash works as supposed so wiring and MPU should be fine.

Hopefully someone has any ideas/suggestions cause i can't figure out why it doesn't work in the latest version :(
Please read the config files carefully.  There are two methods for each. If one don't work for your hardware, try the other.

If you are using the interrupt method for clash you must wire int on the mpu6050 to D2, otherwise use poll. 

Andong

#1407
Jun 28, 2018, 06:34 am Last Edit: Jun 28, 2018, 07:52 am by Andong
Please read the config files carefully.  There are two methods for each. If one don't work for your hardware, try the other.

If you are using the interrupt method for clash you must wire int on the mpu6050 to D2, otherwise use poll.
Thanks for a reply. I was wondering if there are any particular benefits in any of clash detect methods? Like faster detection or maybe precision?

Gave saber to my friends for testing in a lightsaber duel and the main issue they noted is the gap between clash detections/saber flashing. If they dont make longer pauses between hits then at some point it seems that board is busy with the previous clash detection and new one isn't registered so there is no flash on clash happening when they hit sabers. Was wondering if poll or interrupt method would be better in this situation or maybe it's possible to somehow make gap shorter?

jbkuma

I haven't seen that issue, but interrupt method should be faster and more reliable.

Andong

I haven't seen that issue, but interrupt method should be faster and more reliable.
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...

Go Up