fiduciary

Author Topic: LSOS v1.4 - how to make a high-end saber with only a single switch?  (Read 17351 times)

0 Members and 1 Guest are viewing this topic.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #75 on: August 17, 2017, 07:47:51 AM »
The loadout is somewhat different, but the way it works in principle is the same.

Here's the formatter.  I"m not sure what happened to the link, but I re-added it.
SD Memory Card Formatter - SD Association

Offline Sincenatic

  • Padawan Learner
  • **
  • Posts: 84
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #76 on: August 17, 2017, 07:51:23 AM »
i ended up just nulling out the eeprom and setting everything up again. took like 2 mins

What should I do to "null out the eeprom"? It occurred to me that maybe I have the volume set to 0.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #77 on: August 17, 2017, 08:38:29 AM »
In the Arduino app there is an example sketch for this: File->Examples->EEPROM->eeprom_clear

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #78 on: August 17, 2017, 08:41:58 AM »
Also, the EEPROM storage locations in 1.4 and earlier are different than 1.5 and later.  Make sure you run the proper calibration sketch.
https://github.com/Protonerd/FX-SaberOS/blob/master/tools/MPU6050_calibration.ino

Offline Sincenatic

  • Padawan Learner
  • **
  • Posts: 84
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #79 on: August 23, 2017, 07:39:30 AM »
Thanks for the help. I have not been able to get the FX-SaberOS to work. I tried LSOS 1.4 - one button, and upon compiling I got this message:
'class MPU6050' has no member named 'dmpInitialize_light'. I commented away that line and it seems to work fine. (Warning: If you have a LED string blade and play around in darkness – be careful with the jukebox! I finally decided to comment away the line “JukeBox_Stroboscope(ledPins);” to leave the string dark (instead of blinding myself! :cheesy:)

I had some problems with the button and I decided to replace it for another kind and since I had the hilt open I added another button. Could anyone provide the link to the most recent version of LSOS? The version that I have is V1.3, released on the 21st  of October 2016.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #80 on: August 23, 2017, 08:32:53 AM »
On git you can click on the "Branches: " drop box to see different available versions, or click the Branches link.  If you click the branches link, you may also need/want to click "View more stale branches"

The reason the main branch is so outdated is because neskweek unexpectedly disappeared from the scene and we cannot update the repository.

Main branch LightSaberOS development builds can be found here:
Branches · neskweek/LightSaberOS · GitHub

My personal builds have some tailoring to suit my needs, and they are very much focused on pixel development

I have "1.5.3" and "1.6" LightSaberOS builds here:
GitHub - jbkuma/LightSaberOS: Operating System for Arduino based LightSaber
I cannot remember what changes are made in these builds, but I think 1.6 is similar to the initial FX-SaberOS build I posted, which differs significantly from what Obi_1/protonerd has posted as the latest main branch build.

I also updated my branch of FX-SaberOS which is more similar to the above than the current FX-SaberOS master
GitHub - jbkuma/FX-SaberOS: System code for Arduino based Lightsaber replicas
This includes pixel accents and some code cleanup from LSOS, my battery check feature and BladeMeter (works with pixels, 6 segment strings, and RGB LEDs) which graphically illustrates volume and battery level.  It also includes a quick mute feature which is initiated by holding the ignition button while powering up the hilt.

Offline Sincenatic

  • Padawan Learner
  • **
  • Posts: 84
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #81 on: August 23, 2017, 12:48:48 PM »
Thanks!

I tried your version and I found several “pixelAccentUpdate(XXX);” that are outside an #if defined PIXELBLADE...#endif. I moved them above the #endif. In some other places I just added #if defined PIXELBLADE...#endif to avoid similar problems when something was undefined (probably due to the #defined LEDSTRINGS that I use).

It compiles and I have sound! I believe, however, that the example of the SDCard does not correspond to your case. In the .zip file there are 30 files, while in Soundfont.h you refer to 26 (and NR_CONFIGFOLDERFILES  refers to 29 files). Could you update the zip-file to match the code? I prefer to copy everything exactly, and once I have it all working, I can make my small changes.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #82 on: August 24, 2017, 06:21:25 AM »
Thanks!

I tried your version and I found several “pixelAccentUpdate(XXX);” that are outside an #if defined PIXELBLADE...#endif. I moved them above the #endif. In some other places I just added #if defined PIXELBLADE...#endif to avoid similar problems when something was undefined (probably due to the #defined LEDSTRINGS that I use).

It compiles and I have sound! I believe, however, that the example of the SDCard does not correspond to your case. In the .zip file there are 30 files, while in Soundfont.h you refer to 26 (and NR_CONFIGFOLDERFILES  refers to 29 files). Could you update the zip-file to match the code? I prefer to copy everything exactly, and once I have it all working, I can make my small changes.
Which version of which OS?
If you disable PIXEL_ACCENT in Config.h you shouldn't have to worry about any of that code.

These are really development builds, so I'm not sure what changed and what's missing off the top of my head.  I'll need to get it together so I can get my projects back off the floor, but I probably won't be able to get to it for a couple weeks. (Obi_1 is also on vacation)

29 sounds is for the config sounds.  Those should correspond to the 29 sounds in the main git.
26 sounds are for the font fonts. Should be: boot, power on, power off, font id, hum, lockup, 4x blaster, 8x swing, 8x clash.  If you download fonts from the main FXS git there will be several fonts by DarthPJs fitting this loadout.

Offline Sincenatic

  • Padawan Learner
  • **
  • Posts: 84
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #83 on: August 24, 2017, 10:41:36 AM »
I disabled PIXEL_ACCENT but I got the same messages anyway. It’s not a problem, as I have it working. The soundfonts in the .zip has some extra poweron and poweroff which made the difference. When it comes to the number of files in the config folder I only have 19 files; Up, Down, ConfigMode, Volume, SoundFound, MainColor, ClashColor, Max, Min, DIYinoLightsaber_boot_T2S, Yes, No, DIYinoJukeBox_T2S, BatteryNominal, BatteryDiminished, BatteryLow, BatteryCritical and BatteryFull.

It seems to work fine for me so maybe the rest is just not relevant for string blades (?). I have one last question: How do you exit from the Jukebox? (By the way, I like the option to turn off the light in the two button version!)

A big thank to all of you that are developing these open source options! This is just great!

Offline Sincenatic

  • Padawan Learner
  • **
  • Posts: 84
Re: LSOS v1.4 - how to make a high-end saber with only a single switch?
« Reply #84 on: August 24, 2017, 11:24:57 AM »
Never mind the question about the Jukebox; I just had problems to trigger a double click. I changed “#define CLICK” to 300, which made it easier.

 

retrousse