Hi folks --
Running this on an UNO.
I have a long string -- the longer I can make it, the better -- and right now it seems to be choking the dynamic memory if I use more than 750 or so characters (or a Global variable total over 52% of the whole).
Since I don’t need to do anything other than read the string when the program’s running, Program Space seemed like a perfect solution. I’m just slightly mystified by the syntax (I’m NOT a programmer, I’m an artist). So right now I have this:
String dnaString = "CGGAC...GGATTTA"; // the longer the string the better!
// some other stuff, then
if (dnaBase < dnaString.length()) {
if (dnaString.charAt(dnaBase) == 'A') { // etc...
So I have this link (found elsewhere on the forum) avr-libc: Data in Program Space, but I can’t quite follow it, especially when it comes to getting the length AND the charAt of the string back out....
I guess I could just hard-code the length, but it would be better later if I don’t do that for obvious reasons...
Thanks in advance!