Platform confusion

Hello, newbie here,

Today I would like to ask you: what arduino IDE platform should I use for this code?

I was trying to use all from 1.0.x to 1.6.x but different platform, diferrent error, which I can't even understand:

#define LOG_OUT 1 // use the log output function
#define FHT_N 256 // set to 256 point fht

#include <FHT.h>
#include "MD_MAX72XX.h"

int bins = FHT_N / 2;

#define CS_PIN    6  //SS
#define NUM_DEV   2
MD_MAX72XX led = MD_MAX72XX(CS_PIN, NUM_DEV); //use SPI hardware

byte cols[] = {
  0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF};

void setup() {
  TIMSK0 = 0; // turn off timer0 for lower jitter
  ADCSRA = 0xe5; // set the adc to free running mode, div 32 prescaler
  ADMUX = 0x40; // use adc0 w/ 1.1V ref
  DIDR0 = 0x01; // turn off the digital input for adc0
  led.begin();
}

void loop() {
  while (1) { // reduces jitter
    cli();  // UDRE interrupt slows this way down on arduino1.0
    for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
      while (!(ADCSRA & 0x10)); // wait for adc to be ready
      ADCSRA = 0xf5; // restart adc
      byte m = ADCL; // fetch adc data
      byte j = ADCH;
      int k = (j << 8) | m; // form into an int
      k -= 0x0200; // form into a signed int
      k <<= 6; // form into a 16b signed int
      fht_input[i] = k; // put real data into bins
    }
    fht_window(); // window the data for better frequency response
    fht_reorder(); // reorder the data before doing the fht
    fht_run(); // process the data in the fht
    fht_mag_log(); // magnitude response dB
    sei();
    //the display is written backwards, so bins-1-i
    for (int i = 0; i < bins; i++) {
      led.setColumn(i, cols[fht_log_out[bins - 1 - i] / 32]);
      //mx.setColumn(i,cols[fht_log_out[bins-33-i]/32]); //offset 32
    }
  }
}

I 100% guaranted, that there is no proggraming mistakes, because code is made not by my self, but by smarter guys.

So could you place my code with all libraries in your Arduino IDE and say what solution should I reach?

Error message in 1.0 Arduino IDE:

Spectrum.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Users\Dzastis\AppData\Local\Temp\build3103482675569704779.tmp/Spectrum.cpp:14: undefined reference to `MD_MAX72XX::MD_MAX72XX(unsigned char, unsigned char)'
C:\Users\Dzastis\AppData\Local\Temp\build3103482675569704779.tmp/Spectrum.cpp:14: undefined reference to `MD_MAX72XX::~MD_MAX72XX()'
Spectrum.cpp.o: In function `MD_MAX72XX::setColumn(unsigned char, unsigned char)':
/MD_MAX72XX.h:606: undefined reference to `MD_MAX72XX::setColumn(unsigned char, unsigned char, unsigned char)'
Spectrum.cpp.o: In function `setup':
C:\Users\Dzastis\AppData\Local\Temp\build3103482675569704779.tmp/Spectrum.cpp:24: undefined reference to `MD_MAX72XX::begin()'

Error message in 1.6.9 Arduino IDE:

Arduino: 1.6.9 (Windows 8.1), Board: "Arduino/Genuino Uno"

sketch\Font Builder\src\font2txt\font2txt.c:15:22: fatal error: txt2font.h: No such file or directory

 #include "txt2font.h"

                      ^

compilation terminated.

Multiple libraries were found for "FHT.h"
 Used: C:\Users\Dzastis\Documents\Arduino\libraries\FHT
 Not used: C:\Program Files\Arduino\libraries\FHT
exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Thank you for your help

P.S. Code with all libraries included: http://tinyurl.com/gqqfkuu

FHT.h
MD_MAX72XX.h
txt2font.h

Do you have these files on your PC and if so, how many copies and where are they located ?

I 100% guaranted, that there is no proggraming mistakes

Then you are a 100% idiot.

The compiler is telling you that there IS a programming mistake. Most likely in the way that YOU were programmed, so that you can't read and understand perfectly obvious error messages.

PaulS, it's not the first time when I am anoying you with my posts, but I can't find other way to get my project working. I know you are smarter than me, and you are from USA. but I am just a teenager, from Lithuania, trying to reach some goals in my life :). It would be very good if you tolerate my post and just tell me what I am doing wrong. Because, even at school no one is teaching us programing lessons, so it's quiete hard to understand intermediate programing level.

So back to my project. Everything okay with FHT.h and MD_MAX72xx.h libraries on 1.0 IDE, but on 1.6 txt2font pops-up just from nowhere. In 1.0 Arduino IDE, I got MD_MAX72xx.h added as file in my sketch, same with FHT.h, but as I can understand temp files is main the problem, because of platform mismatch...

I can't even understand this error message in 1.0 IDE, it just saying that somewhere in temp file "undefined reference to `MD_MAX72XX::~MD_MAX72XX()' " if it would be something with code it would show the line where is the problem, but now it's not reaveled.

Forget IDE 1.0.x, that's old hat. 1.6.x is newer, newer compiler etc. But some have some bugs. 1.6.4 (and according to many 1.6.5r5) are fine.

Next up, instead of talking about you being a newbie, answer questions asked.

UKHeliBob:
FHT.h
MD_MAX72XX.h
txt2font.h

Do you have these files on your PC and if so, how many copies and where are they located ?

BornToBeDumb:
Everything okay with FHT.h and MD_MAX72xx.h libraries on 1.0 IDE, but on 1.6 txt2font pops-up just from nowhere. In 1.0 Arduino IDE, I got MD_MAX72xx.h added as file in my sketch, same with FHT.h.

There is one problem using newer version for FHT.h as you can read here: ArduinoFHT - Open Music Labs Wiki, FHT library is recommended to be used with 1.0 IDE version, because I get tons of errors from FHT.h library when I am using 1.6.9 IDE version. So I think there is the only way to get this working, is to use older versions like you suggested...

Unfortunetely with 1.6.4 IDE version compiler still shows error from FHT.h library. And these error is more or less related with "PROGMEM prog_int16" or "PROGMEM prog_uint8" declaration. I have tried to change prog_uint8 to uint8, but still...

Just downloaded the library and compiled (with 1.6.4) the fht_adc and fht_adc_serial examples without error...

So again, because apparently it's kind of hard, answer the questions of UKHeliBob of post 1!!!

I have one copy of MD_MAX72xx and one of FHT.h I just deleted all of the and installed them agian manually. So,I can also compile FHT.h examples, but it is processing things... I need to compile Spectrum.ino that after complete compile I could upload it into mine Arduino Uno.

Everything is okay with examples given by FHT.h library creators. I also can compile MD_MAX72xx.h library examples with 1.6.9 IDE, but not with 1.0 IDE.

All in all, for 1.0 IDE, FHT.h library examples works perfectly, but working with MD_MAX72xx.h compiler shows error:

Spectrum.cpp.o: In function `__static_initialization_and_destruction_0':
C:\Users\Dzastis\AppData\Local\Temp\build4652576107187208750.tmp/Spectrum.cpp:14: undefined reference to `MD_MAX72XX::MD_MAX72XX(unsigned char, unsigned char)'
C:\Users\Dzastis\AppData\Local\Temp\build4652576107187208750.tmp/Spectrum.cpp:14: undefined reference to `MD_MAX72XX::~MD_MAX72XX()'
Spectrum.cpp.o: In function `MD_MAX72XX::setColumn(unsigned char, unsigned char)':
/MD_MAX72xx.h:606: undefined reference to `MD_MAX72XX::setColumn(unsigned char, unsigned char, unsigned char)'
Spectrum.cpp.o: In function `setup':
C:\Users\Dzastis\AppData\Local\Temp\build4652576107187208750.tmp/Spectrum.cpp:24: undefined reference to `MD_MAX72XX::begin()'

something about temp files...

Talking about newer versions, starting from 1.5.7 to 1.6.9 IDE, works with MD_MAX72xx.h library perfectly, but with FHT.h library compiler shows error:

In file included from C:\Users\Dzastis\Desktop\1.0.0.0.0.0.0.00\Spectrum\Spectrum.ino:4:0:

C:\Users\Dzastis\Documents\Arduino\libraries\FHT/FHT.h:72:10: error: 'prog_int16_t' does not name a type

 PROGMEM  prog_int16_t _cas_constants[]  = {

          ^

In file included from C:\Users\Dzastis\Desktop\1.0.0.0.0.0.0.00\Spectrum\Spectrum.ino:4:0:

C:\Users\Dzastis\Documents\Arduino\libraries\FHT/FHT.h:87:12: error: 'prog_uint8_t' does not name a type

   PROGMEM  prog_uint8_t _reorder_table[]  = {

            ^

In file included from C:\Users\Dzastis\Desktop\1.0.0.0.0.0.0.00\Spectrum\Spectrum.ino:4:0:

C:\Users\Dzastis\Documents\Arduino\libraries\FHT/FHT.h:103:12: error: 'prog_uint8_t' does not name a type

   PROGMEM  prog_uint8_t _log_table[]  = {

            ^

In file included from C:\Users\Dzastis\Desktop\1.0.0.0.0.0.0.00\Spectrum\Spectrum.ino:4:0:

C:\Users\Dzastis\Documents\Arduino\libraries\FHT/FHT.h:131:12: error: 'prog_int16_t' does not name a type

   PROGMEM  prog_int16_t _window_func[]  = {

something about PROGMEM prog_int16 problems in FHT.h library.

So personaly I don't know what version will work with MD_MAX72xx.h and FHT.h libraries. Maybe, those two libraries can't work on exact Arduino IDE version, so I should change something in libraries?

Ow man, you really honor your forum name....

One last resume, drop 1.0x, tell use where the files are.

Btw, (and I know I should not do this because then you'll just ignore every other bit of this post but okay)

PROGMEM  prog_int16_t _cas_constants[]  = {

Is part of the old library version... Why not use the latest?