I have working code that gets the 'deviceName' from the particle cloud at runtime, and creates multiple feeds named like: deviceNfeedM (eg: device1feed1, device1Feed2 ....)
This works great, but all feeds go by default under a group named by my username. I would like the feeds from each device to go to a group based on the particular deviceName.
The following works to create (if necessary) or append to 4 different feeds "deviceA1, deviceA2 ...";
- Code: Select all | TOGGLE FULL SIZE
void loop()
{
i = (i+1) % 16;
int feed = i%4;
if (init) {
strcpy(tmp,deviceName);
testFeedx = AIOClient.getFeed( strcat(tmp,String(feed) ) );
testFeedx.send( String( i ) );
}
delay(4000);
}
At the website, I can "Create a new group" (say "deviceA") and then manually "add feed to group". The new key is like: "deviceA.deviceA1"
I tried something like:
testFeedx = AIOClient.getFeed( "deviceA.deviceA1" );
But no luck.
How do I do create and manipulate groups programmatically?