Hiya! First post. Love my Arduboy(kickstarter edition), and this community, and have been totally without issues. But, now…
I am trying to print characters from a string one at a time, for dialogue boxes. It’s simple enough. But, I’m in a corner. (My code will be using Tinyfont functions, but it’s the same result with Arduboy2’s print func.) If I try to print my string (a normal char array, not a pointer array), I get garbage characters:
However, if I try to print a character from that string, that doesn’t happen:
The result is a single ‘y’ in the top-left.
(character is ‘y’; correct)
Okay, so I’m lead to assume that print functions only accept chars, and not char arrays. I know they don’t, but here I am, and that would actually be totally fine for my purpose of typing out individual characters, anyway.
If I do so much as perform the same function within any sort of loop, (well, ‘for’ and ‘while’) the characters are garbage again.
for(int i=0;i<6;i++) tf.print(first_convo[i]);
Same garbage as the first image, but only 6 characters.
I’ve considered that maybe I’ve run out of memory, but after commenting out a bulk of my strings, and attempting to run the code in the main ‘loop()’, with no fix, I’m really out of options.
So, I hope you can help me! This is incredibly baffling, but I feel like it’s probably a very simple fix. I’d greatly appreciate somebody making me feel like a huge idiot.
I should clarify: By ‘garbage characters’, I mean simply mismatched characters. They’re actual characters, not video garbage, but they’re not the characters I want. >n<