0

I'm working on an Arduino controlled Christmas tree with 500 fully addressable LEDs. I'm using the FastLED library and currently(though I'll be updating some of the animations to be controlled by sampling audio) I'm using the code from http://pastebin.com/Qe0Jttme as a starting point.

The following line: (line #36 in pastebin example)

const PROGMEM prog_uint16_t levels[NUM_LEVELS] = {58, 108, 149, 187, 224, 264, 292, 309, 321, 327, 336, 348};

Is giving me the error:

exit status 1 
'prog_uint16_t' does not name a type

This is because it had been depreciated. I found an alternative here, but now the following line errors due to depreciation as well, but I don't know how to get past it.

const PROGMEM prog_uchar ledCharSet[20] = {
B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,B01111111,B01101111,
B10111111,B10000110,B11011011,B11001111,B11100110,B11101101,B11111101,B10000111,B11111111,B11101111
};

Returns the same error:

exit status 1
'prog_uchar' does not name a type

I'm using Arduino version 1.6.6 and the latest FastLED library.

Joel Spolsky
  • 33,372
  • 17
  • 89
  • 105
Front_End_Dev
  • 1,205
  • 1
  • 14
  • 24

1 Answers1

1

If there are a lot of these prog_ types then a simple solution would be to create a header file with the following in it and include in any file that uses these types:

#include <stdint.h>

typedef void prog_void;
typedef char prog_char;
typedef unsigned char prog_uchar;
typedef int8_t prog_int8_t;
typedef uint8_t prog_uint8_t;
typedef int16_t prog_int16_t;
typedef uint16_t prog_uint16_t;
typedef int32_t prog_int32_t;
typedef uint32_t prog_uint32_t;
typedef int64_t prog_int64_t;
typedef uint64_t prog_uint64_t;

If there are only a few uses of the prog_ types, or if you want to properly fix the code, then just replace them where they're used with appropriate type. For example:

const PROGMEM uint16_t levels[NUM_LEVELS] = {...};
const PROGMEM unsigned char ledCharSet[20] = {...};
Ross Ridge
  • 38,414
  • 7
  • 81
  • 112