FX-Sabers.com

The Mining Colony: Home of approved FX-Sabers vendors => Profezzorn’s Lab => Topic started by: profezzorn on February 03, 2018, 05:04:52 PM

Title: TeensySaber newbie thread
Post by: profezzorn on February 03, 2018, 05:04:52 PM
Just got your TeensySaber? Can't figure out how to configure it? Instructions looks like greek? and what's with all this code anyways?

Don't panic, you've come to the right place. :)

I know my instructions are far from perfect, and TeensySaber can seem a little crazy at first.
However, just post your questions in this thread and I'll try my best to answer them.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 05, 2018, 06:09:20 AM
I would like to ask you the first question.

  1- Can I say these sound boards don't have anything program in them?
  2- If so where do we get the sound fonts?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 05, 2018, 09:00:04 AM
I would like to ask you the first question.

  1- Can I say these sound boards don't have anything program in them?
  2- If so where do we get the sound fonts?

1. Correct, the TeensySaber V3 doesn't have a place to store a program, you must buy a teensy 3.2 to join with it, and the programming will be stored there.
2. Just about any sound font should work, as the teensysaber software can play Plecter-style fonts, NEC style fonts either one can be enhanced by adding smoothswing V2 sounds.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 05, 2018, 04:15:53 PM
Do we have to down load a few things or just one?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 05, 2018, 04:39:25 PM
Do we have to down load a few things or just one?

Things you'll need to download:

1. Arduino software
2. Teensyduino software
3. TeensySaber software
4. One or more sound fonts. (unless of course you have them already.)

1-2 gets installed on your computer
3 gets installed on the teensy 3.2 (by using 1-2)
4 gets installed on the SD card, pretty much same as always
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 06, 2018, 04:59:27 AM
Do I have to write my own SD card? Like Font1 , Font2 Ect?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 06, 2018, 10:27:04 AM
Do I have to write my own SD card? Like Font1 , Font2 Ect?

Yes. I'm hoping to put together a default SD card image for teensysaber soon though.
(And the font directories can be called anything you want, you just have to configure the teensysaber to look in the right directory.)
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 06, 2018, 04:21:56 PM
Do you have an example to help us by?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 06, 2018, 04:43:26 PM
Do you have an example to help us by?

Wouldn't an example be the same thing as a default sd card image?
There is lots of instructions though, and I can help if there is a need.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 07, 2018, 09:36:22 AM
Let me ask you this would a SD card from another board work as well?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 07, 2018, 09:46:17 AM
Let me ask you this would a SD card from another board work as well?

It would. You would need to update the config with the font directory names, and then it would work.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 07, 2018, 02:55:46 PM
Let me ask you this would a SD card from another board work as well?

It would. You would need to update the config with the font directory names, and then it would work.


 I've never written a SD card in my whole life. If somehow you could write a 101 on writing SD cards I would try it myself.
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 07, 2018, 03:16:19 PM
Let me ask you this would a SD card from another board work as well?

It would. You would need to update the config with the font directory names, and then it would work.


 I've never written a SD card in my whole life. If somehow you could write a 101 on writing SD cards I would try it myself.

You've never added a font to a lightsaber?
I can write a step-by-step thingy, what operating system does your computer normally use?
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 08, 2018, 04:34:54 AM
I have added a font before. What I mean is I never made my own SD card before. The cards were already written.
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 08, 2018, 09:46:14 AM
I have added a font before. What I mean is I never made my own SD card before. The cards were already written.

I'm not sure what you mean, because adding fonts is all there is. You just start with a blank sd card.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 08, 2018, 04:22:03 PM
Don't you have to add override or leds or the other things to make the saber work?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 08, 2018, 08:11:17 PM
Don't you have to add override or leds or the other things to make the saber work?

Yes, you have to configure the teensysaber software so that it know how everything is hooked up, and how you want things to look, but none of that stuff goes on the SD card.
The teensy has it's own memory where the software and configuration is stored.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on February 09, 2018, 06:26:32 AM
OOOOOOOOOOOOOOO Ok all I have to do is add the sound fonts?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 09, 2018, 10:26:13 AM
OOOOOOOOOOOOOOO Ok all I have to do is add the sound fonts?

Yes, that's all that you need to put on the SD card.
You may also want to put some background sound tracks on the SD card.

The rest is done by changing the configuration file and then using the arduino program to upload the software and configuration to the teensy.
Title: Re: TeensySaber newbie thread
Post by: Anvil on February 13, 2018, 03:11:39 PM
So since I'm going neopixel setup with my teensy build Im considering doing two batteries in parallel for the run time. (if i can afford the space that is). Is there any restriction to the battery specs i can use? like would they both need to be 10A drain or higher? or could i combine two different kinds of 3.7 18650 cells? and can they still maintain their configuration with the PCB or would i need to modify them in any way other than just wiring them together?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 13, 2018, 03:43:11 PM
So since I'm going neopixel setup with my teensy build Im considering doing two batteries in parallel for the run time. (if i can afford the space that is). Is there any restriction to the battery specs i can use? like would they both need to be 10A drain or higher? or could i combine two different kinds of 3.7 18650 cells? and can they still maintain their configuration with the PCB or would i need to modify them in any way other than just wiring them together?

The cells needs to be the same. The current draw won't be as high per cell, but I would still recommend 10A cells I think. You shouldn't need to do anything but wire them together.
Title: Re: TeensySaber newbie thread
Post by: Anvil on February 14, 2018, 06:04:35 AM
Cool, thanks!

 Ok had another idea for a feature id like to try and implement.  How would i go about making a sort of crystal chamber display mode? I was looking at one of Shtoke's sabers last night (his latest custom KAM) and he had a cool setup i think would be sweet to make possible. So essentially he made it so when he removed the emitter to reveal the crystal (breaking the connection to the LED's) it automatically loaded a sound font (i believe its calibrate by madcow) that made the hum sound into sort of a "singing crystal" noise... and all the ingnite/retraction and lockup/blaster sounds into electronic beeps and pulses and such. It would be really cool to make a sort of "diagnostic mode" load up somehow if the teensy detects that the blade is out or you have a blade plug ID in the emitter...
so you could show off the chassis and crystal chamber with interactive noises and maybe some cool "temperature readings" or sort of "equilzer" looking display on the OLED screen.

Like youd put the blade plug in and it would load a calibration sound font and the boot sound would play (or same thing with the kill key)... could be neat to make it so a selection of random noises or servo motor sounds or something could randomly play on loop. then the power button could "wake up" the crystal" ... playing the "crystal noise" for the hum. (maybe somehow using smoothswing v2 to play more different electronic or servo sounds depending on how its oriented)  and then it could be cool to display different sort of faux readouts on the OLED for the aux button and lockup imputs.

It would be so awesome to have a sound font selection menu (maybe this could be loaded if you dont have a blade plug or anything in the emitter) that would keep you in the "crystal chamber display mode" sound font while you scroll through your configurations... then load the selected sound font/ color profile after it detects that you "reassemble" the saber for use with a blade. or close the saber to hide the crystal chamber ( could be achieved maybe if the teensy can do this if it can detect no blade) I dunno. just an idea :)
Title: Re: TeensySaber newbie thread
Post by: miib123 on February 14, 2018, 09:03:04 AM
Profezzorn:

I would like to remix your graflex chassis holder. Due to slightly different hardware used, i need to lengthen the battery compartment a little bit. Mine hardware just don't fit inside original chassis that well. Could you please provide me the original 3D file of that part? I'm talking about the "chassis2_part23" file (not .stl).

Thank you very much!
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 14, 2018, 10:37:10 AM
Cool, thanks!

 Ok had another idea for a feature id like to try and implement.  How would i go about making a sort of crystal chamber display mode? I was looking at one of Shtoke's sabers last night (his latest custom KAM) and he had a cool setup i think would be sweet to make possible. So essentially he made it so when he removed the emitter to reveal the crystal (breaking the connection to the LED's) it automatically loaded a sound font (i believe its calibrate by madcow) that made the hum sound into sort of a "singing crystal" noise... and all the ingnite/retraction and lockup/blaster sounds into electronic beeps and pulses and such. It would be really cool to make a sort of "diagnostic mode" load up somehow if the teensy detects that the blade is out or you have a blade plug ID in the emitter...
so you could show off the chassis and crystal chamber with interactive noises and maybe some cool "temperature readings" or sort of "equilzer" looking display on the OLED screen.

Like youd put the blade plug in and it would load a calibration sound font and the boot sound would play (or same thing with the kill key)... could be neat to make it so a selection of random noises or servo motor sounds or something could randomly play on loop. then the power button could "wake up" the crystal" ... playing the "crystal noise" for the hum. (maybe somehow using smoothswing v2 to play more different electronic or servo sounds depending on how its oriented)  and then it could be cool to display different sort of faux readouts on the OLED for the aux button and lockup imputs.

It would be so awesome to have a sound font selection menu (maybe this could be loaded if you dont have a blade plug or anything in the emitter) that would keep you in the "crystal chamber display mode" sound font while you scroll through your configurations... then load the selected sound font/ color profile after it detects that you "reassemble" the saber for use with a blade. or close the saber to hide the crystal chamber ( could be achieved maybe if the teensy can do this if it can detect no blade) I dunno. just an idea :)

All of this is possible with some coding.
I don't know if it's worth supporting without some coding though, as it's a pretty custom setup.
Some basics would be easy to implement though, like having a "button" which is connected to the crystal chamber door, and when it's activated (or not activated) the saber goes to a different set of presets.

Either way, I'm always willing to help with anything that isn't so custom that nobody else would want it. :)
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 14, 2018, 10:38:50 AM
Profezzorn:

I would like to remix your graflex chassis holder. Due to slightly different hardware used, i need to lengthen the battery compartment a little bit. Mine hardware just don't fit inside original chassis that well. Could you please provide me the original 3D file of that part? I'm talking about the "chassis2_part23" file (not .stl).

Thank you very much!

It's all on thingiverse: Graflex 2.0 chassis by profezzorn - Thingiverse (https://www.thingiverse.com/thing:1691758)  (thing files->chassis2.scad)
Title: Re: TeensySaber newbie thread
Post by: Anvil on February 14, 2018, 11:45:52 AM


All of this is possible with some coding.
I don't know if it's worth supporting without some coding though, as it's a pretty custom setup.
Some basics would be easy to implement though, like having a "button" which is connected to the crystal chamber door, and when it's activated (or not activated) the saber goes to a different set of presets.

Either way, I'm always willing to help with anything that isn't so custom that nobody else would want it. :)
[/quote]

Ok awesome, well i may have to do some planning on exactly how the flow of it would work and maybe see if i can get some video playback guys here at marvel to see if they can make some OLED display visuals for me :) 

But as just a shot in the dark as im just getting into configuring the board today and i dont know whats what yet... but is it possible to make a blade ID for having no blade in? and make that a preset with just the configuration sounds to star off with for this idea? I know you said you use your blade connection as your kill key so your wiring setup wouldnt be possible but would that work? Im sure i could do it with a blade plug with a specific blade ID but im just curious if there was a simple way to configure a "blade ID" for there being no blade connected. thanks again!
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 14, 2018, 12:10:52 PM
Quote
All of this is possible with some coding.
I don't know if it's worth supporting without some coding though, as it's a pretty custom setup.
Some basics would be easy to implement though, like having a "button" which is connected to the crystal chamber door, and when it's activated (or not activated) the saber goes to a different set of presets.

Either way, I'm always willing to help with anything that isn't so custom that nobody else would want it. :)

Ok awesome, well i may have to do some planning on exactly how the flow of it would work and maybe see if i can get some video playback guys here at marvel to see if they can make some OLED display visuals for me :) 

But as just a shot in the dark as im just getting into configuring the board today and i dont know whats what yet... but is it possible to make a blade ID for having no blade in? and make that a preset with just the configuration sounds to star off with for this idea? I know you said you use your blade connection as your kill key so your wiring setup wouldnt be possible but would that work? Im sure i could do it with a blade plug with a specific blade ID but im just curious if there was a simple way to configure a "blade ID" for there being no blade connected. thanks again!

Well, it gets a little weird.
The code currently only checks blade ID on startup, which makes sense for my sabers because they turn off when the blade is removed.
If the saber turns on with out a blade inserted, then the blade ID is basically infinite resistance, so having a preset for that is super easy.
However, once a blade is inserted, the saber would have to be turned off and then on again to detect it unless we make some code changes. Shouldn't be *that* hard to do though.

As for visual fx for the oled: The only OLED display that is currently support is purely black-and-white (or blue-and-white) It's not even grayscale. Also, it's only 128x32 pixels, so the amount of detail that can be represented is pretty limited.
Title: Re: TeensySaber newbie thread
Post by: TTFRAZ on February 18, 2018, 06:20:10 PM
Just looking into adding a fire style blade (single, not crossgaurd)
what is the best way to customize the settings? i see under crossgaurd_config.h all these diferent customized values. would i be able to copy and paste those CONFIG_PRESETS and put them in my own .h file and style be able to adjust the values even though i only have a single blade?
is there any easier way to do this?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on February 18, 2018, 07:02:29 PM
Just looking into adding a fire style blade (single, not crossgaurd)
what is the best way to customize the settings? i see under crossgaurd_config.h all these diferent customized values. would i be able to copy and paste those CONFIG_PRESETS and put them in my own .h file and style be able to adjust the values even though i only have a single blade?
is there any easier way to do this?

You can just copy all the fireblade related defines from crossguard_config.h into your config, then use one FIRE1PTR(0,0)  (not three)  in your preset.
Let me know if you need help with that.
Title: Re: TeensySaber newbie thread
Post by: miib123 on March 01, 2018, 12:00:21 PM
Hey,

is it possible to implement the SDfat.h library instead of SD.h? I just changed the SD adapter due to space limitations and stuff doesn't work now ("bank open failure").

I tested the sd card with SDinfo program on both libraries and SDfat.h worked great, when SD.h didn't even recognised
the card.

Title: Re: TeensySaber newbie thread
Post by: profezzorn on March 01, 2018, 12:55:52 PM
Hey,

is it possible to implement the SDfat.h library instead of SD.h? I just changed the SD adapter due to space limitations and stuff doesn't work now ("bank open failure").

I tested the sd card with SDinfo program on both libraries and SDfat.h worked great, when SD.h didn't even recognised
the card.

Weird, SD adapters hook up directly to the chip, so I don't see how a different adapter would make any difference. Maybe the problem is a differently configured SD card?
That said, I think the changes to use SDFat are pretty minimal, but I don't think SDFat is included with the default installation, so I don't want to use it by default.
I have a similar problem myself in that I whenever I activate the teensy-optimized mode in SD.h, the sd card is not found.

One really nice thing about SDFat is that it supports long file names, but that also means that the MTP code has to be modified a little bit to support long filenames too.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on June 08, 2018, 07:07:00 AM
Where can I buy the pins to hold the two boards together?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on June 08, 2018, 11:21:58 AM
Where can I buy the pins to hold the two boards together?

First of all, I don't actually recommend using header pins. Sure, they make it easy and super-secure, but if anything goes wrong, it's very difficult to get the boards apart without damaging anything. I personally just take some wire, strip an inch or so, twist it and tin it. Then I solder it into place on both sides, cut it and move on to the next slot. It may be helpful to have header pins in the corners to get things lined up properly though.

That said, if you want to use header pins, you can buy some cheap ones from amazon:
Uxcell a14081900ux0592 50 x Single Row 40Pin 2.54 mm Male Pin Header Connector: (https://www.amazon.com/gp/product/B00R1LEIL8/ref=oh_aui_search_detailpage?ie=UTF8&psc=1)

Or, you can buy some with thinner standoffs here, which will make the final package slightly thinner:
1x40 pin Snap Header .1"sp .162"MH: Phoenix Enterprises -PE- Connectors IC (https://www.peconnectors.com/pin-headers-straight-1x-row-.100/hws16317/)
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on June 09, 2018, 09:02:49 AM
 :grin:
   
           Do we need to put the two boards together before we program the board of before?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on June 09, 2018, 10:05:09 AM
:grin:
   
           Do we need to put the two boards together before we program the board of before?

You can do it either way. Programming it before you put the boards together isn't all that useful though, as the program will complain about all the things it can't do. (Like talk to the motion chip and the SD card.)
Note that once you cut the VIN-VUSB, the teensy cannot be powered from the computer anymore, so it has to be soldered to the teensysaber and powered by a battery to program it.
Title: Re: TeensySaber newbie thread
Post by: Megtooth Sith on June 19, 2018, 07:59:08 AM
I made a quick software setup video.  While this is my methods of how I do things, Fredrik says:

1.  You can put the "Lightsaber" folder anywhere on your computer so you can access it easily.  It doesn't need to be in the "Arduino" folder.

2.  Fredrik suggests using the lightsaber.ino to create your config file instead of creating a .txt document like I did in this video, and then I forced it into the necessary ".h" style document.  It works for me, but I force my computer to display extensions.  You can make it simply in the "lightsaber.ino" environment.

Video:


Hope someone finds this helpful. 

Tom
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on September 13, 2018, 09:40:48 AM
I've watched the video a few times. If I'm using a pixel blade do I still use what seems like black jumpers on the led pads? Also If I do where do you buy them? Also I have a pixel set of 144 does this board run this many?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on September 13, 2018, 10:54:57 AM
I've watched the video a few times. If I'm using a pixel blade do I still use what seems like black jumpers on the led pads? Also If I do where do you buy them? Also I have a pixel set of 144 does this board run this many?


Black jumpers? Where did you see those?

Normally you want to connect the three LED pads together when you're using a neopixel blade.
The maximum number of pixels in a blade is configurable, and defaults to 144.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on September 13, 2018, 03:30:39 PM
On a video someone made.


TeensySaberV3 Assembly II - YouTube (https://www.youtube.com/watch?v=nEdQ4djOxjE)
Title: Re: TeensySaber newbie thread
Post by: profezzorn on September 13, 2018, 07:32:34 PM
On a video someone made.


TeensySaberV3 Assembly II - YouTube (https://www.youtube.com/watch?v=nEdQ4djOxjE)

So the "black things" you see in this video are called pin headers, and are used to connect the teensysaber to the teensy.
This video doesn't show what to do with the LED pads at all.
Of course, if you have a proffieboard you don't need to do most of this.
Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on September 14, 2018, 02:56:41 PM
I'm looking for the header pin sets ;but, I have not seen none anywhere. When I bought my two soundboards in the run you had were I supposed to have them inside the sealed packs?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on September 15, 2018, 12:16:50 AM
I'm looking for the header pin sets ;but, I have not seen none anywhere. When I bought my two soundboards in the run you had were I supposed to have them inside the sealed packs?

No, the header pins can be bought from lots of places.
The pins do make it easy to put the boards together, and they hold things together *really* well. Problem is that it holds things together *too* well. It's quite difficult to get them apart again, which is a requirement if one of the boards develop a problem.   Find a way to hold the two boards 2-3mm apart, then peal, twist and tin an inch or two of 30-awg wire, solder it to both sides, snip it and then move on to the next connection.   It's a little bit more work, but it makes it easy to take the boards apart later, should the need arise.

Title: Re: TeensySaber newbie thread
Post by: BEN KENOBI on September 15, 2018, 10:05:45 AM
I can't find the pins anywhere. Can you give me a link?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on September 23, 2018, 04:22:23 PM
I can't find the pins anywhere. Can you give me a link?

Amazon.com: OdiySurveil(TM) 10pcs 40 Pin 2.54mm Straight Single Row Pin Header (http://a.co/d/j2GCxjE)
Title: Re: TeensySaber newbie thread
Post by: Supercheez on September 27, 2019, 03:13:55 PM
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on October 02, 2019, 02:50:24 PM
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 03, 2019, 07:29:44 AM
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)

Beep works fine, as does dir right up until it loses the SD connection.
Strangely it seems to cut out differently for different presets but is consistent for a given preset:

I'd guess it's something either software- or battery-related but I don't know how I'd distinguish between the two. Given that the cut-outs don't seem to be related to the blade brightness (a bright lockup with the cyan preset doesn't trigger it) is it possible that playing a particular sound would cause the issue?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on October 03, 2019, 11:09:37 AM
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)

Beep works fine, as does dir right up until it loses the SD connection.
Strangely it seems to cut out differently for different presets but is consistent for a given preset:
  • The first preset is a red "vader" style using Kyberphonic's Father font - this cuts out as soon as the blade ignites.
  • Another preset is cyan using one of the fonts that comes with the default SD contents - this works fine but cuts out on the second ignition.
  • A green preset with Kyberphonic's "Little Green Friend" font ignites fine but will cut out on clashes.

I'd guess it's something either software- or battery-related but I don't know how I'd distinguish between the two. Given that the cut-outs don't seem to be related to the blade brightness (a bright lockup with the cyan preset doesn't trigger it) is it possible that playing a particular sound would cause the issue?

What version of ProffieOS do you have?
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 03, 2019, 11:58:23 AM
I'm running version 2.6 with Arduino 1.8.9
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 03, 2019, 12:33:32 PM
Looking at the serial monitor every time the SD cuts out I get a message with "Audio underflows", e.g.

20:31:24.781 -> Playing Father/blst/blst03.wav
20:31:24.816 -> channels: 1 rate: 44100 bits: 16
20:31:25.119 -> Audio underflows: 581
Title: Re: TeensySaber newbie thread
Post by: profezzorn on October 03, 2019, 08:51:30 PM
Looking at the serial monitor every time the SD cuts out I get a message with "Audio underflows", e.g.

20:31:24.781 -> Playing Father/blst/blst03.wav
20:31:24.816 -> channels: 1 rate: 44100 bits: 16
20:31:25.119 -> Audio underflows: 581

This does seem to indicate a problem with accessing the SD card, but it could be my fault.
I fixed a problem that looked a lot like this in 2.6. I guess it's possible that the fix didn't quite work.
The whole "second ignition" thing is very very strange though.

I would suggest trying 1.312 and see if it works better. There is some audio optimizations in 2.x that could be responsible for these problems.
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 05, 2019, 01:30:42 AM
I've tried 1.312 and if anything that seems worse - rather than the SD failure I get a complete freeze.
I then tried 2.7 which seemed slightly more stable.

I'm going to build a "dumb" charging adapter as I'm not convinced that the fancy one is giving the battery a full charge, will post again once I have more info.
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 07, 2019, 07:37:54 AM
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.
Title: Re: TeensySaber newbie thread
Post by: profezzorn on October 07, 2019, 12:18:59 PM
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.

There are at least two workarounds for the rainbow sparkle: Overclocking the teensy, or using a serial port to drive the neopixels.
Overclocking is easy, just set the frequency to 120Mhz and see if that helps.
Title: Re: TeensySaber newbie thread
Post by: Supercheez on October 09, 2019, 05:30:48 AM
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.

There are at least two workarounds for the rainbow sparkle: Overclocking the teensy, or using a serial port to drive the neopixels.
Overclocking is easy, just set the frequency to 120Mhz and see if that helps.

Thank you, that all seems to be working now! I've got a brief blue flash when I change blade styles but otherwise everything seems to be working fine (apart from a slightly fried battery connector from when I accidentally shorted something).
Title: Re: TeensySaber newbie thread
Post by: Obi-Ken Wanobi on October 09, 2019, 06:03:03 PM
I'm finishing up a ProffieBoard v1.5 based build.  Initially I had CLASH_THRESHOLD_G set to 1.0 which seemed to be what is shown in all the example config files.  When I power this up and ignite the blade the clash event triggers rapidly over and over again and is worse when the audio track plays.  I had to bump this value up to 3.5 to get this saber to operator normally (like my other Teensysaber v3 based builds).  Is this normal?  Could there be something wrong with the ProffieBoard or my build?

Also, I am interested in purchasing additional ProffieBoards but can't seem to find a seller that has them in stuck.  Any recommendations where to buy a ProffieBoard right now?
Title: Re: TeensySaber newbie thread
Post by: profezzorn on October 11, 2019, 04:59:54 PM
I'm finishing up a ProffieBoard v1.5 based build.  Initially I had CLASH_THRESHOLD_G set to 1.0 which seemed to be what is shown in all the example config files.  When I power this up and ignite the blade the clash event triggers rapidly over and over again and is worse when the audio track plays.  I had to bump this value up to 3.5 to get this saber to operator normally (like my other Teensysaber v3 based builds).  Is this normal?  Could there be something wrong with the ProffieBoard or my build?

Also, I am interested in purchasing additional ProffieBoards but can't seem to find a seller that has them in stuck.  Any recommendations where to buy a ProffieBoard right now?

It's pretty normal to have to increase the clash threshold, but 3.5 is pretty high. At that level, it may be difficult to trigger clashes.
The levels needed are can be reduced by putting small amounts of padding around the speaker and/or board. (Like even a layer of electrical tape can be enough sometimes.)
However, if 3.5 works well for you, then there is no need to do anything. :)