Hi there,
I'm struggling to add a certain string (or char[]) to an array of struct because of the error on the top. I would appreciate it so much if I could get some help with this. The problem is on the line "channels[i].create = Serial.read();".
Code:
#include <Wire.h>
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#define LIMIT 27
typedef struct
{
char create[16];
char character;
int values;
int minimum;
int maximum;
} protocol;
char c;
protocol channels[LIMIT];
void create_channels() {
int i = 0;
while (Serial.available() > 0)
{
channels[i].create = Serial.read();
i++;
if (i != 0)
{
Serial.println((String)"Channel description: " + channels[i].create);
}
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16, 2);
}