fiduciary

Author Topic: Announcing the Teensy Saber open source sound board  (Read 91643 times)

0 Members and 1 Guest are viewing this topic.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #30 on: December 12, 2016, 09:09:54 PM »
You might have better luck checking the Teensy forums/howtos.

I have no idea what exactly is wrong, so I'm just going to outline all the steps you need to do;

1) Install Arduino & Teensy  (For 3.6, I recommend the latest beta Teensy version)
2) Windows/Mac may also need some sort of driver installation. I'm not sure if this happens automatically when you install the Teensy software or not. The "driver" is just an INF file which maps the USB ids to the right driver.
3) Plug a teensy into a USB port. If you never programmed it before it should start blinking. (Unless you cut the  V-USB pads apart. If you did that you also need to power the Teensy externally.)
4) Start up Arduino, Load a sketch and select the right board. Also make sure that that you select "USB Type: Serial", or the serial monitor won't work.
5) If you're using your sketch as listed here, remove this line: while(true);
6) Click upload. After compilation the teensy programming utility should show up, and programming should begin automatically. If it doesn't, press the programming button on the teensy.
9) Teensy should stop blinking, and if you open the serial console (Ctrl-Shift-M) you should see the printline repeated every 290 ms.


Offline McFarticus

  • No Force
  • *
  • Posts: 11
  • Um...Hello?
Re: Announcing the Teensy Saber open source sound board
« Reply #31 on: December 12, 2016, 09:29:04 PM »
I did a quick coding (learning over here) to have the LED flash an SOS with a 3 second break in between.  It works on both boards.  I'll try again tomorrow, and see about those USB drivers.   


Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: Announcing the Teensy Saber open source sound board
« Reply #32 on: December 20, 2016, 02:45:18 PM »
This is some hugely impressive work, I'm very tempted to get myself a Teensy and see if I can follow the build guide through!

Out of interest, does a Teensy LC have what it takes to run a lightsaber? I'm guessing that it won't have sufficient grunt but thought it worth checking.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Announcing the Teensy Saber open source sound board
« Reply #33 on: December 20, 2016, 03:49:44 PM »
Depending on what you want your saber to do, you can even run it off of a ATTiny85.  I've set up a few prototypes this way, and I'm pretty sure Jakesoft has as well.

Offline JakeSoft

  • Experienced Force User
  • ****
  • Posts: 393
  • The Arduino Jedi
    • Universal Saber Library
Re: Announcing the Teensy Saber open source sound board
« Reply #34 on: December 21, 2016, 04:10:08 PM »
Depending on what you want your saber to do, you can even run it off of a ATTiny85.  I've set up a few prototypes this way, and I'm pretty sure Jakesoft has as well.

Yes, indeed. Behold! Minimis

You do have to dial back your expectations a little when you go to such a simple chip, of course. Needless to say that with only 8K of program space you wouldn't be able to simply upload profezzorn's sketch. ;-)

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: Announcing the Teensy Saber open source sound board
« Reply #35 on: December 22, 2016, 05:53:06 AM »
Depending on what you want your saber to do, you can even run it off of a ATTiny85.  I've set up a few prototypes this way, and I'm pretty sure Jakesoft has as well.

Yes, indeed. Behold! Minimis

You do have to dial back your expectations a little when you go to such a simple chip, of course. Needless to say that with only 8K of program space you wouldn't be able to simply upload profezzorn's sketch. ;-)

"Minimis" indeed! Well I have an LC on order so I'll see how I get on, thanks for the responses.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #36 on: December 28, 2016, 11:54:29 PM »
The Teensy LC has enough "grunt", the biggest limit is the 8Kb ram I think.
In the TeensySaber code, two features use up most of the ram:

   1) The DMA buffer used to drive the LEDs. You can easily compile this out, but then you can't drive neopixel blades.

   2) The audio buffers. If you limit yourself to using monophonic (plecter style) fonts, you might be able to hack the code to fit in 8kB. The SD card reading code also uses some memory, but you could use the serial flash on the prop shield. The size is limited, but it's very fast, and the code for accessing is small and efficient.

My recommendation: Stick to the Teensy 3.2
« Last Edit: December 29, 2016, 12:31:27 AM by profezzorn »

Offline theholyduck

  • No Force
  • *
  • Posts: 40
  • Um...Hello?
Re: Announcing the Teensy Saber open source sound board
« Reply #37 on: January 16, 2017, 10:03:42 AM »
I found an error in the "electronics" section of your instructions. where it says
"Next, cut three short wires, strip the ends and solder them to the MISO, MOSI and CLK on the sd card shield. Put the sdcard shield in place (but don't solder it yet). These wires are going to connect to pin 13, 12 and 14 on the teensy AND the prop shield"
It should say pin 12, 11 and 13. you have it right in the photos and the schematic drawing but the text is wrong.

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #38 on: January 16, 2017, 01:38:46 PM »
I found an error in the "electronics" section of your instructions. where it says
"Next, cut three short wires, strip the ends and solder them to the MISO, MOSI and CLK on the sd card shield. Put the sdcard shield in place (but don't solder it yet). These wires are going to connect to pin 13, 12 and 14 on the teensy AND the prop shield"
It should say pin 12, 11 and 13. you have it right in the photos and the schematic drawing but the text is wrong.

Thank you. Will fix tonight.

Update: Now fixed.
« Last Edit: January 16, 2017, 06:31:06 PM by profezzorn »

Offline theholyduck

  • No Force
  • *
  • Posts: 40
  • Um...Hello?
Re: Announcing the Teensy Saber open source sound board
« Reply #39 on: January 20, 2017, 10:22:18 PM »
Ok. so the mosfets arrived today. and i managed to get things part way working. i had to redefine the aux pins since i had no touch sensor. but everything related to blade detection. activating/FoCing. motion sensing and what not seems to work great. but i ran into an issue with the SD card stuff.

Basically if i dont coment out #define ENABLE_SD then the program no longer works. i cant interact with the teensy through the serial monitor and it no longer responds to my buttons. I tested to see if my wiring was at fault using some other sd card interacting code which worked perfectly. there is no instructions on your site for how the filesytsem on the sdcard should be organized but im guessing thats my problem

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #40 on: January 20, 2017, 10:35:23 PM »
The TouchButton can be changed to a regular button by doing:

1) Replace "TouchButton" with "Button" on line 4220
2) remove "1700, " from line 3871

(This assumes lightsaber-1.19.ino)

Those kind of SD card problems sound like wiring problems to me.  lightsaber.ino scans the sd card to see what files it can find when it starts up, but if the files aren't found, nothing should fail. However if an SD card is detected, but we're unable to talk to it, you get exactly that behavior. Also make sure that sdCardSelectPin is set correctly for your configuration.

I've noticed that it can be helpful to put a delay(1000) at the beginning of setup() (line 4878) as you tend to miss any printouts that happen during startup otherwise.


Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #41 on: January 20, 2017, 11:23:01 PM »
It can also be useful to comment out ENABLE_AUDIO (but leave ENABLE_SD)
This avoid the scanning for audio files during setup.
You can see if the SD card is working by typing "dir" in the serial monitor.

Offline theholyduck

  • No Force
  • *
  • Posts: 40
  • Um...Hello?
Re: Announcing the Teensy Saber open source sound board
« Reply #42 on: January 21, 2017, 07:50:43 AM »
yeah it works just fine with either audio or sd card enabled. but when both are enabled its frozen.

i can do DIR just fine in the serial monnitor whenn is just sd enabled.
im guessing i have to edit your presets there so its not looking for files that don't exist.

but for now im going tto bed
« Last Edit: January 21, 2017, 07:54:52 AM by theholyduck »

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #43 on: January 21, 2017, 09:49:03 AM »
I had a similar problem for a while when I was testing the V2 board.
SOunds suspiciously like a bug somewhere, I will investigate....

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Announcing the Teensy Saber open source sound board
« Reply #44 on: January 21, 2017, 10:00:49 AM »
Huh, adding  "delay(1000);" at the beginning of setup() (line 4878) seems to help.
I guess the SD card needs some time to wake up before we can access it.
Or maybe it's a "let the voltage stabilize" kind of thing?
Wonder how long a delay you actually need?
I'd prefer not to have a delay in setup(), but it seems to be needed...


 

retrousse