I'm using something similar to what is below in my code (clipped from the Arduino.cc reference page).
I'm new to C and the char arrays and pointers really throw me.
The only thing I'm doing different is the println function is in a separate function, not the "loop" function. I'm guessing this is a scope issue, but I'm not sure how scope is applied when it comes to pointers, rather arrays of pointers. I'm just trying to set up some error messages and wanted to declare the messages to be used globally. Can that be done?
char* myStrings[]={"This is string 1", "This is string 2", "This is string 3",
"This is string 4", "This is string 5","This is string 6"};void setup(){
Serial.begin(9600);
}void loop(){
for (int i = 0; i < 6; i++){
Serial.println(myStrings*);*
- delay(500);*
- }*
}
[/quote]