I have a snippet of code here and i was trying to think of a more efficient way to write this part. the serialized method i chose will work but how could i shorten this?
IPAddress AP_local_IP(192, 168, 4, 1);
IPAddress AP_gateway(192, 168, 4, 1);
IPAddress AP_subnet(255, 255, 255, 0);
IPAddress STA_ip(10, 0, 0, 14);
IPAddress STA_gateway(10, 0, 0, 1);
IPAddress STA_subnet(255, 0, 0, 0);
IPAddress Node1(192, 168, 4, 10);
IPAddress Node2(192, 168, 4, 11);
IPAddress Node3(192, 168, 4, 12);
IPAddress Node4(192, 168, 4, 13);
IPAddress Node5(192, 168, 4, 14);
IPAddress Node6(192, 168, 4, 15);
IPAddress Node7(192, 168, 4, 16);
IPAddress Node8(192, 168, 4, 17);
IPAddress Node9(192, 168, 4, 18);
IPAddress Node10(192, 168, 4, 19);
struct node1Packet {
int local;
int PWMValue;
};
node1Packet node1Data;
struct node2Packet {
int local;
int PWMValue;
};
node2Packet node2Data;
struct node3Packet {
int local;
int PWMValue;
};
node3Packet node3Data;
struct node4Packet {
int local;
int PWMValue;
};
node4Packet node4Data;
struct node5Packet {
int local;
int PWMValue;
};
node5Packet node5Data;
struct node6Packet {
int local;
int PWMValue;
};
node6Packet node6Data;
struct node7Packet {
int local;
int PWMValue;
};
node7Packet node7Data;
struct node8Packet {
int local;
int PWMValue;
};
node8Packet node8Data;
struct node9Packet {
int local;
int PWMValue;
};
node9Packet node9Data;
struct node10Packet {
int local;
int PWMValue;
};
node10Packet node10Data;