Hi
I'm learning arduino coding and today I met this problem for my hiveMonitor.
I need to send a unique ID from my LoRa sender to my LoRa receiver.
FYI: Until I tried to add a unique name my prototype was running perfect.
This is the plan:
Sender need to send a unique ID (a name) hiveName = "Hive-1" to receiver.
On sender side I need to concatenate a few values and name in a LoRaMessage , for this I plan to use:
String LoRaMessage = String(packetID) + "/" + String(weight) + "\" + String(hiveName);
So my problem is, in sender code:
How do I declare the variable and also declare it to be used in my LoRaMessage String operation?
I have tried these to variants with no luck...
char hiveName[] = "Hive-1";
and
String hiveName = String("Hive-1");
but when I compile I get this: