Olá, estou tentando usar a IDE Beta do Arduino (1.5.7), com a biblioteca Flash.h
http://arduiniana.org/libraries/flash/
Percebi que ela não é compatível, pois a IDE Beta suporta o macro objeto.print(F("flash string")). Até aí OK, só não usar a biblioteca e o erro some.
Mas e quanto aos objetos?
FLASH_STRING(big_string, "Moreover, as you might appreciate, "
"their implications were such as to provoke a certain "
"degree of sorrow within me. Indeed - why should I not "
"admit it? - at that moment, my heart was breaking.");
FLASH_ARRAY(float, temperatures, 23.1, 23.1, 23.2, 23.2, 23.4,
23.7, 25.0, 26.0, 26.8, 28.8, 30.2, 31.9, 33.1, 33.1, 33.2,
33.2, 33.4, 33.7, 35.0, 36.0, 36.8, 38.8, 40.2, 41.9);
FLASH_TABLE(boolean, font_table, 7, {0,0,0,0,0,0,0},
{0,0,0,1,0,1,1}, {1,0,1,1,1,0,1}, {1,1,0,0,0,0,0},
{0,1,0,1,0,1,0}, {1,0,1,1,1,0,1}, {1,0,0,1,0,0,1},
{0,0,1,1,0,1,1}, {1,0,1,1,1,1,1});
FLASH_STRING_ARRAY(digits, PSTR("Zero"), PSTR("One"),
PSTR("Two"), PSTR("Three"), PSTR("Four"), PSTR("Five"),
PSTR("Six"), PSTR("Seven"), PSTR("Eight"), PSTR("Nine"));
Existe uma maneira de usar isto na IDE Beta?
--
edit:
Se ajudar, aqui está os macros na lib (que não está sendo usada):
#define FLASH_STRING(name, value) \
static const char name##_flash[] PROGMEM = value; \
_FLASH_STRING name(name##_flash);
// Example: FLASH_ARRAY(float, temperatures, 98.1, 98.5, 99.1, 102.1);
#define FLASH_ARRAY(type, name, values...) \
static const type name##_flash[] PROGMEM = { values }; \
_FLASH_ARRAY<type> name(name##_flash, sizeof(name##_flash) / sizeof(type));
// Example: FLASH_TABLE(uint8_t, fonts, 7, {ON, OFF, ON, ON, OFF, ON, OFF}, {OFF, ON, OFF, ON, OFF, ON, OFF});
#define FLASH_TABLE(type, name, cols, values...) \
static const type name##_flash[][cols] PROGMEM = { values }; \
_FLASH_TABLE<type> name((const PROGMEM type *)name##_flash, sizeof(name##_flash) / sizeof(name##_flash[0]), cols);
// Example: FLASH_STRING_ARRAY(nums, PSTR("One"), PSTR("Two"), PSTR("Three"), PSTR("Four"), PSTR("Five"));
#define FLASH_STRING_ARRAY(name, values...) \
const PROGMEM char *name##_arr[] = { values }; \
_FLASH_STRING_ARRAY name(name##_arr, sizeof(name##_arr) / sizeof(name##_arr[0]));