fiduciary

Author Topic: Problem with compiling lightsaber in arduino for Teensysaber HELP PLEASE  (Read 3371 times)

0 Members and 1 Guest are viewing this topic.

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Hello, I have an error message :


In file included from C:\Users\Jon\Desktop\lightsaber\lightsaber.ino:39:0:

C:\Users\Jon\AppData\Local\Temp\arduino_build_109300\sketch\mysaber_config.h:2:23: fatal error: v3_config.h: No such file or directory

compilation terminated.

Error compiling for board Teensy 3.2 / 3.1.





It seems as though V3_config.h is missing? So I changed it to match the same name suggested as mysaber_config.h  but when I did I get an error saying its nested too deeply, not sure what to do


« Last Edit: April 16, 2018, 10:19:22 PM by wardance »

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
I assume you are trying to compile Teensy Saber? I suggest editing your subject so that is clear.  There are a number of open saber projects.

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Thanks I did

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
This is my bad, I made some changes to the code and have yet to update the instructions.

You basically have two choices for how to fix it:

1. Change #include "v3_config.h" to #include "config/v3_config.h"
2. Put your config file in the config/ subdirectory, then put the "config/..." part in the CONFIG_FILE define inside lightsaber.ino

sorry about the inconvenience.

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Thanks Profezzorn problem fixed. Now I have encounter another problem, after I hit the tick button on top left and it compiles then a window pops up prompting me to press the physical button on the teensy board. I do that and then I get a verbal error message stating "sd card not found" from the board.


Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
and on the topic the sd card, what is supposed to be on it?

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
"sd card not found" is good, that means that the programming worked. (But you may need to tweak the configuration and program it again later.)

The only thing that goes on the SD card is fonts and tracks.
The SD card needs to be formatted as FAT32, and generally each font should be in it's own directory.

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
I dont understand what I need to do with the SD card. what is the file type? wav? and how should i arrange the folders on the sd card?


Does the error "sd card not found" go away once the sd card is set up properly?

If you could help me with what steps I need to take to finish this project, that would be awesome, thanks

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
I dont understand what I need to do with the SD card. what is the file type? wav? and how should i arrange the folders on the sd card?


Does the error "sd card not found" go away once the sd card is set up properly?

If you could help me with what steps I need to take to finish this project, that would be awesome, thanks

"sd card not found" should not happen if the card is properly formatted and inserted.
However, you may still get "font directory not found", which means that it can't find a font in the directory specified by the configuration file.

There is some flexibility in where you put stuff, on your sd card, but what I would recommend is this:
For each sound font that you want to use, create a directory on the SD card, the name of the directory can be anything you want, but must be shorter than 8 characters.
Mine are currently "font1", "font2", "teensysf", "graflex7" (and a few others).
Each directory contains a bunch of wav files that make up a sound font, if you don't have any sound fonts, go buy one from soundfonts.com, or go find some free ones. Both plecter and NEC style fonts will work. Fonts may also come with readme files and ini files,  which would also go in the same directory.

I also have a directory called "tracks" which contain music from star wars (in 44100 hz mono wav format) which can be played while you're using your saber. For instance there is a file in there called "cantina.wav" which contains the cantina band song.

In the config file, there is a section called the preset array, which has a bunch of entries that look something like:

  { "fontdir", "track.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"},

For this preset, the font directory is "fontdir" and the track is called "track.wav". To work with the examples given above, you would change this to:

{ "graflex7", "tracks/cantina.wav",
  StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"}, }

(And then do the programming again.)

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Thanks again, I followed your steps but still get "font directory not found" and then "sd card not found". I suspect my sd card reader is faulty. I have tried different sd cards 4gig and 8gig both FAT32 and both set up with font directorys just like your example. Is there a way to check if my sd card reader on the board is working?

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Thanks again, I followed your steps but still get "font directory not found" and then "sd card not found". I suspect my sd card reader is faulty. I have tried different sd cards 4gig and 8gig both FAT32 and both set up with font directorys just like your example. Is there a way to check if my sd card reader on the board is working?

If the SD card reader is broken, you can get a replacement card. Where did you buy it?
You might want to check the solder joints with a magnifying glass and/or a multimeter first though. The SD card uses pin 0, 11, 12, 13 and GND.
(see https://www.pjrc.com/teensy/card7a_rev1.pdf for where those are)

I sometimes use an app called "cozy maginifier" which can turn most smartphones into a very capable magnifier.


Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Thanks Prof. I checked the pins connections with multi meter, all good = between 1 and 2 ohms resistance.

I bought the board from The saber armory.

i thought id mention that the micro sd card just slides in to the reader, there is no locking mechanism or spring action. Is that normal for this board?

Thanks

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Thanks Prof. I checked the pins connections with multi meter, all good = between 1 and 2 ohms resistance.

I bought the board from The saber armory.

i thought id mention that the micro sd card just slides in to the reader, there is no locking mechanism or spring action. Is that normal for this board?

Thanks

Yes, that is normal.
If the board turns out to be faulty, contact the saber armory for a replacement. (I assume you tried the SD card that came with it already...)
The sd card reader is a fairly simple mechanism, so it seems strange that it would be faulty, but anything is possible.
Did you check for shorts between the pins too?

Offline wardance

  • No Force
  • *
  • Posts: 9
  • Um...Hello?
Yes I checked for shorts between pins, ill contact saber armory now, cheers

 

retrousse