Sending PROGMEM strings over HC12

Hi all,

As the subject suggests I am just after a simple yes or know really. Can I use __FlashStringHelper() to send C strings stored in PGM over a wireless connection via HC12 modules.

I don’t want to start down that route if it’s not possible

No code yet, just asking before I start writing.

cheers

I don't know any function named __FlashStringHelper().

There is a class __FlashStringHelper. Pointers to this class are used by the Print class to signal access to PROGMEM data.

If your HC12 object derives from Print, pointers to __FlashStringHelper could be used to signal to the Print methods that the data resides in PROGMEM.

Hi

Thanks for the reply

I don't think I explained that very well, here's kind of what I had in mind:

 HC12.println((__FlashStringHelper*)table1[messageNum]);

Does that make sense?

Cheers

Larp-fx: here's kind of what I had in mind:

 HC12.println((__FlashStringHelper*)table1[messageNum]);

If the class HC12 derives from Print that should work (given a correct definition of table1[]).

Awesome, cheers

Another quick question if I may.

On the receiving end should i be looking for a String or char? The message being sent is a constant char stored in PROGMEM

cheers

Larp-fx:
On the receiving end should i be looking for a String or char?
The message being sent is a constant char stored in PROGMEM

How could I answer that, without seeing both programs?