Here's how to add new units and upload more streams within the Arduino - Quick Start tutorial:

There are several ways new streams can be auto-registered within Grove streams and we discuss them here in our Modeling Guide - Component Registration section, but since the Arduino tutorial utilizes a component template, we'll modify the existing component template to include the new streams for this post.

1) Enter your Organization and select the Component Studio button

2) Create your new stream units: Select Units, right click in Units and select New Unit.

3) Add your new Streams to the component template: Within Templates, right click on Temperature Template and choose Edit Component Template
a) You can right click on Streams and choose Add-Streams-Streams or if your new stream is similar to an existing stream, you can right click on that stream and choose Copy
b) Modify the General Properties of your stream. The important settings are:
* The name: It can be any name
* The Data Type.
* Select the unit (might be one you just created above)
* The Default Rollup Method: This is the default statistic to display for stream rollups over time. For example, if you are uploading temperature readings every minute, you probably want to choose max, min, or average for the default when the daily or annual cycle is being viewed. Choosing sum wouldn't make sense for temperature. But choosing sum for something like monitoring water consumption makes sense.
* The ID: It has to be unique within this component. The ID will be used in the Arduino code below. For this example, we'll assume newStream1Id, newStream2Id for two new streams.
c) Save the template

4) Include the new streams within the Arduino sketch: Add them to the getSamples method:
char* getSamples()
{
  //Get the temperature analog reading and convert it to a string
  float voltage, degreesC, degreesF;
 
  voltage = (analogRead(temperaturePin) * 0.004882814);
  degreesC = (voltage - 0.5) * 100.0;
  degreesF = degreesC * (9.0/5.0) + 32.0;
 
  char tempC[15] = {0}; //Initialize buffer to nulls
  dtostrf(degreesC, 12, 3, tempC); //Convert float to string
 
  char tempF[15] = {0}; //Initialize buffer to nulls
  dtostrf(degreesF, 12, 3, tempF); //Convert float to string
 
  float newStream1FloatVal = 10;
  char newStream1[15] = {0}; //Initialize buffer to nulls
  dtostrf(newStream1FloatVal, 12, 3, newStream1); //Convert float to string
 
   float newStream2FloatVal = 20;
  char newStream2[15] = {0}; //Initialize buffer to nulls
  dtostrf(newStream2FloatVal, 12, 3, newStream2); //Convert float to string
 
  //Assemble the samples into URL parameters which are seperated with the "&" character
  //
  // Example: &s1=25.684&s2=78.231
  sprintf(samples, "&%s=%s&%s=%s&%s=%s&%s=%s", gsStreamId1, trim(tempC), gsStreamId2, trim(tempF), "newStream1Id", trim(newStream1), "newStream2Id", trim(newStream2));
 
  return samples;
}
 


New stream values are hardcoded above to 10 and 20. Set them to whatever you need them to be in your code.

Ensure all of your string buffers are large enough to include the extra characters you're adding. For example, ensure
char samples[35];
is large enough. If not, increase 35 to a larger number.

The new streams may not appear on an existing component. Delete the existing component (this will also delete all existing stream samples) and a new component should register which includes the new streams.

If you just want to modify an existing component and not edit the component template, don't edit the template. Right click on the component, edit it, and add the new streams there instead of the template (you can then right click on the component when you are done and create a new template from it if you desire it).