Pages: [1]   Go Down
Author Topic: char string controled wia serial HELP  (Read 170 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I got some code and i want control char stings on the terminal/serial.

patr of code
prog_char string_0  [] PROGMEM = "On "
prog_char string_1  [] PROGMEM = "Off"

PROGMEM const char *string_table[] = {   
    string_0,   string_1 };

i need something like this

if arduino from serial read the "word"  -> char string_0

thx
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 613
Posts: 49330
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i need something like this

if arduino from serial read the "word"  -> char string_0
If the Arduino reads what word? The one in string_0? Reads it from where?

How many words is the Arduino supposed to know? Saving 6 bytes from SRAM hardly seems worth the effort.

Why is there a space at the end of "On "?
Logged

Pages: [1]   Go Up
Jump to: