I got this error while I'm uploading the code into the Arduino.
expected initializer before 'quotes' (on line const unsigned PROGMEM String quotes[8] = )
My code =
const unsigned PROGMEM String quotes [18] =
{
"Write it on your heart that every day is the best day in the year.",
"Perfection is not attainable, but if we chase perfection we can catch excellence.",
"Everything you've ever wanted is on the other side of fear.",
"Nothing is impossible, the word itself says ‘I’m possible.’",
"Failure is the condiment that gives success its flavor.",
"It is never too late to be what you might have been.",
"The roots of education are bitter, but the fruit is sweet.",
"To be the best, you must be able to handle the worst.",
"The key to immortality is first living a life worth remembering.",
"You must be the change you wish to see in the world.",
"Mastering others is strength. Mastering yourself is true power.",
"Knowing is not enough, We must apply.",
"We will either find a way or make one.",
"Man doesn’t know what he is capable of until he is asked.",
"Be sure what you want and be sure about yourself.",
"With our thoughts, we make the world.",
"Change your life today.",
"Opportunities don’t happen, you create them."
};
any help?
const unsigned PROGMEM String quotes [18] =
Is there such a data type as unsigned String ?
Can you even store Strings in PROGMEM?
const char sm00[] PROGMEM = "Write it on your heart that every day is the best day in the year.";
const char sm01[] PROGMEM = "Perfection is not attainable, but if we chase perfection we can catch excellence.";
const char sm02[] PROGMEM = "Everything you've ever wanted is on the other side of fear.";
const char sm03[] PROGMEM = "Nothing is impossible, the word itself says 'I'm possible.'";
const char sm04[] PROGMEM = "Failure is the condiment that gives success its flavor.";
const char sm05[] PROGMEM = "It is never too late to be what you might have been.";
const char sm06[] PROGMEM = "The roots of education are bitter, but the fruit is sweet.";
const char sm07[] PROGMEM = "To be the best, you must be able to handle the worst.";
const char sm08[] PROGMEM = "The key to immortality is first living a life worth remembering.";
const char sm09[] PROGMEM = "You must be the change you wish to see in the world.";
const char sm10[] PROGMEM = "Mastering others is strength. Mastering yourself is true power.";
const char sm11[] PROGMEM = "Knowing is not enough, We must apply.";
const char sm12[] PROGMEM = "We will either find a way or make one.";
const char sm13[] PROGMEM = "Man doesn't know what he is capable of until he is asked.";
const char sm14[] PROGMEM = "Be sure what you want and be sure about yourself.";
const char sm15[] PROGMEM = "With our thoughts, we make the world.";
const char sm16[] PROGMEM = "Change your life today.";
const char sm17[] PROGMEM = "Opportunities don't happen, you create them.";
const char * const msgs[] PROGMEM = { sm00, sm01, sm02, sm03, sm04, sm05, sm06, sm07, sm08,
sm09, sm10, sm11, sm12, sm13, sm14, sm15, sm16, sm17
};
void setup() {
Serial.begin(250000);
for (byte quote = 0; quote < sizeof(msgs) / sizeof(msgs[0]); quote++) {
Serial.print(F("quote "));
if (quote < 10) {
Serial.write('0');
}
Serial.print(quote);
Serial.print(F(" \""));
Serial.print((__FlashStringHelper*)pgm_read_word(&msgs[quote]));
Serial.println(F("\""));
}
}
void loop() {}
quote 00 "Write it on your heart that every day is the best day in the year."
quote 01 "Perfection is not attainable, but if we chase perfection we can catch excellence."
quote 02 "Everything you've ever wanted is on the other side of fear."
quote 03 "Nothing is impossible, the word itself says 'I'm possible.'"
quote 04 "Failure is the condiment that gives success its flavor."
quote 05 "It is never too late to be what you might have been."
quote 06 "The roots of education are bitter, but the fruit is sweet."
quote 07 "To be the best, you must be able to handle the worst."
quote 08 "The key to immortality is first living a life worth remembering."
quote 09 "You must be the change you wish to see in the world."
quote 10 "Mastering others is strength. Mastering yourself is true power."
quote 11 "Knowing is not enough, We must apply."
quote 12 "We will either find a way or make one."
quote 13 "Man doesn't know what he is capable of until he is asked."
quote 14 "Be sure what you want and be sure about yourself."
quote 15 "With our thoughts, we make the world."
quote 16 "Change your life today."
quote 17 "Opportunities don't happen, you create them."