I don't get any errors apart from the line that says
sprintf_P(str1, hello[2]);
my full code below.
#include <avr/pgmspace.h>
prog_char hello[] PROGMEM =
{
"HELLO1"
"HELLO2"
"HELLO3"
};
void setup()
{
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial)
{
; // wait for serial port to connect. Needed for Leonardo only
}
}
void loop()
{
char str1;
sprintf_P(str1, hello[2]);
Serial.print(str1);
delay(5000);
}
Am wanting to have an array of strings and read them when i want. Just trying to learn about progmem.