Go Down

Topic: char string controled wia serial HELP (Read 207 times) previous topic - next topic

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

PaulS

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 "?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy