Skip to content

Commit 0506662

Browse files
committed
Some ReadMe formatiing
Also changed all references to GUID's to UUID's
1 parent f5db5d1 commit 0506662

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Within this library, a sensor, a variable, and a logger mean very specific thing
6767

6868
**Sensor** - A sensor is some sort of device that is capable of taking one or more measurements using some sort of method. Most often we can think of these as probes or other instruments that can give back information about the world around them. Sensors can usually be given power or have that power cut. They may be awoken or activated and then returned to a sleeping/low power use state. The may be able to be asked to begin a single reading. They _**must**_ be capable of returning the value of their readings to a logger of some type.
6969

70-
**Variable** - A variable is a single measurement value taken by a sensor. It is characterized by a name (what it is a measurement of), a unit of measurement, and a resolution. The [names](http://vocabulary.odm2.org/variablename/) and [units](http://vocabulary.odm2.org/units/) of measurements for all variables come from the controlled vocabularies developed for the ODM2 data system. (http://vocabulary.odm2.org/) The resolution is determined by the method used to take the measurement by the sensor. A variable may also be assigned a Globally Unique Identifier (GUID) and a unique variable code. Many sensors are capable of measuring multiple variables at a single time. For example, a Decagon CTD-10 is a _sensor_. It is able to measure 3 _variables_: specific conductance, temperature, and water depth. The variable named "specificConductance" has _units_ of microsiemens per centimeter (µS/cm) and a _resolution_ of 1 µS/cm. Each variable is explicitly tied to the "parent" sensor that "notifies" the variable when a new value has been measured.
70+
**Variable** - A variable is a single measurement value taken by a sensor. It is characterized by a name (what it is a measurement of), a unit of measurement, and a resolution. The [names](http://vocabulary.odm2.org/variablename/) and [units](http://vocabulary.odm2.org/units/) of measurements for all variables come from the controlled vocabularies developed for the ODM2 data system. (http://vocabulary.odm2.org/) The resolution is determined by the method used to take the measurement by the sensor. A variable may also be assigned a universally unique identifier (UUID) and a unique variable code. Many sensors are capable of measuring multiple variables at a single time. For example, a Decagon CTD-10 is a _sensor_. It is able to measure 3 _variables_: specific conductance, temperature, and water depth. The variable named "specificConductance" has _units_ of microsiemens per centimeter (µS/cm) and a _resolution_ of 1 µS/cm. Each variable is explicitly tied to the "parent" sensor that "notifies" the variable when a new value has been measured.
7171

7272
**Logger** - A logger is a device that can control all functions of the sensors that are attached to it and save the values of all variables measured by those sensors to an attached SD card. In this library, all loggers are Arduino-style small processor circuit boards.
7373

@@ -157,7 +157,7 @@ These functions are also available for each sensor, but should be used with caut
157157
- **waitForMeasurementCompletion()** - Delays until time is passed for measurement completion.
158158

159159
### Functions for Each Variable
160-
- **Constructor** - Every variable requires a pointer to its parent sensor as part of the constructor. Every variable also has two optional string entries, for a universally unique identifier (UUID/GUID) and a custom variable code. _The UUID must always be listed first!_ In cases where you would like a custom variable code, but do not have a UUID, you **must** enter '""' as your UUID.
160+
- **Constructor** - Every variable requires a pointer to its parent sensor as part of the constructor. Every variable also has two optional string entries, for a universally unique identifier (UUID or GUID) and a custom variable code. _The UUID must always be listed first!_ In cases where you would like a custom variable code, but do not have a UUID, you **must** enter '""' as your UUID.
161161
- **getVarName()** - This returns the variable's name ,using http://vocabulary.odm2.org/variablename/, as a String.
162162
- **getVarUnit()** - This returns the variable's unit, using http://vocabulary.odm2.org/units/, as a String.
163163
- **getVarCode()** - This returns a String with a customized code for the variable, if one is given, and a default if not

examples/DRWI_CitSci/ReadMe.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Before programming your board with this example, you must register your site and
77
After registering your site, make the following customizations to this sketch:
88

99

10-
Set the proper address for data to go to Stroud's older "DreamHost" visualization tool - change the "TALK TO STROUD FOR THIS VALUE" in this section of code to the real URL given to you by Stroud:
10+
Set the proper address for data to go to Stroud's older "DreamHost" visualization tool - change the ```"TALK TO STROUD FOR THIS VALUE"``` in this section of code to the real URL given to you by Stroud:
1111

1212
```cpp
1313
// Set up connection with the "DreamHost" data portal
@@ -21,7 +21,7 @@ Set the logger ID - change the "XXXX" in this section of code to the loggerID as
2121
const char *LoggerID = "XXXX";
2222
```
2323

24-
Set the calibration coefficients for the Campbell OBS3+ - The OBS3+ ships with a calibration certificate. Change _all_ of the the xxxxE+xx values in this section of code to the values on that calibration sheet. You should use the side of the calibration sheet that shows the calibration in _volts_. The sketch will not compile if these values are not entered properly. Do not change any values except those that are xxxxE+xx!
24+
Set the calibration coefficients for the Campbell OBS3+ - The OBS3+ ships with a calibration certificate. Change _**all**_ of the the ```xxxxE+xx``` values in this section of code to the values on that calibration sheet. You should use the side of the calibration sheet that shows the calibration in _**volts**_. The sketch will not compile if these values are not entered properly. Do not change any values except those that are ```xxxxE+xx```!
2525

2626
```cpp
2727
// ==========================================================================
@@ -45,7 +45,7 @@ const float OBSHigh_C = xxxxE+xx; // The "C" value from the high range calibrat
4545
CampbellOBS3 osb3high(OBS3Power, OBSHighPin, OBSHigh_A, OBSHigh_B, OBSHigh_C, OBS3_ADS1115Address, OBS3numberReadings);
4646
```
4747
48-
Set the universally universal identifiers (UUID) for each variable. Change _all_ of the the "12345678-abcd-1234-efgh-1234567890ab" values in this section of code to the values shown on the EnviroDIY data portal for your variables. After you register your site and variables, you should see a group of empty plots on the page for your site. The plots have titles like "Temperature" and below the plot will be a list of the "Medium", "Sensor", and "UUID" for that variable. Copy the appropriate UUID from below each plot to its proper place in this section of the code. For example, the "12345678-abcd-1234-efgh-1234567890ab" in the first line (```new ProcessorStats_Batt(&mayfly, "12345678-abcd-1234-efgh-1234567890ab"),```) will be replaced by the UUID listed under the plot titled "Battery Voltage" with the sensor listed below as "EnviroDIY_Mayfly Data Logger".
48+
Set the universally universal identifiers (UUID) for each variable. Change _**all**_ of the the ```"12345678-abcd-1234-efgh-1234567890ab"``` values in this section of code to the values shown on the EnviroDIY data portal for your variables. After you register your site and variables, you should see a group of empty plots on the page for your site. The plots have titles like "Temperature" and below the plot will be a list of the "Medium", "Sensor", and "UUID" for that variable. Copy the appropriate UUID from below each plot to its proper place in this section of the code. For example, the ```"12345678-abcd-1234-efgh-1234567890ab"``` in the first line (```new ProcessorStats_Batt(&mayfly, "12345678-abcd-1234-efgh-1234567890ab")```) will be replaced by the UUID listed under the plot titled "Battery Voltage" with the sensor listed below as "EnviroDIY_Mayfly Data Logger".
4949
5050
```cpp
5151
// ==========================================================================
@@ -64,7 +64,7 @@ Variable *variableList[] = {
6464
};
6565
```
6666

67-
Set the universally universal identifiers (UUID) and sampling token for your site. Change _all_ of the the "12345678-abcd-1234-efgh-1234567890ab" values in this section of code to the values shown on the EnviroDIY data portal for your site. After you register your site and variables, you should see a pane of site information next to a small map showing the location of your site. Copy the registration token and sampling feature UUID from this pane to its proper place in this section of the code.
67+
Set the universally universal identifiers (UUID) and sampling token for your site. Change _**both**_ of the ```"12345678-abcd-1234-efgh-1234567890ab"``` values in this section of code to the values shown on the EnviroDIY data portal for your site. After you register your site and variables, you should see a pane of site information next to a small map showing the location of your site. Copy the registration token and sampling feature UUID from this pane to its proper place in this section of the code.
6868

6969
```cpp
7070
// ==========================================================================

examples/DRWI_NoCellular/ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Set the logger ID - change the "XXXX" in this section of code to the loggerID as
1010
const char *LoggerID = "XXXX";
1111
```
1212

13-
Set the calibration coefficients for the Campbell OBS3+ - The OBS3+ ships with a calibration certificate. Change _all_ of the the xxxxE+xx values in this section of code to the values on that calibration sheet. You should use the side of the calibration sheet that shows the calibration in _volts_. The sketch will not compile if these values are not entered properly. Do not change any values except those that are xxxxE+xx!
13+
Set the calibration coefficients for the Campbell OBS3+ - The OBS3+ ships with a calibration certificate. Change _**all**_ of the the ```xxxxE+xx``` values in this section of code to the values on that calibration sheet. You should use the side of the calibration sheet that shows the calibration in _**volts**_. The sketch will not compile if these values are not entered properly. Do not change any values except those that are ```xxxxE+xx```!
1414

1515
```cpp
1616
// ==========================================================================
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Example using the Modular Sensors Library to Save Data to an SD card and Send data to the EnviroDIY Data Portal
22

3-
This shows the use of an "EnviroDIY logger" object for an AVR board. It takes the simple_logging example one step farther in creating a modem object that is used to send data to the EnviroDIY data portal. Before using this example, you must register a site and sensors at the data portal (http://data.envirodiy.org/). After you have registered the site and sensors, the portal will generate a registration token and globally unique identifier (GUID) for each site and further GUID's for each variable. You will need to copy all of those GUID values into your sketch to replace the "12345678-abcd-1234-efgh-1234567890ab" place holders in this example. Please do not try to run the example exactly as written, but delete the chunks of code pertaining to sensors that you do not have attached.
3+
This shows the use of an "EnviroDIY logger" object for an AVR board. It takes the simple_logging example one step farther in creating a modem object that is used to send data to the EnviroDIY data portal. Before using this example, you must register a site and sensors at the data portal (http://data.envirodiy.org/). After you have registered the site and sensors, the portal will generate a registration token and universally unique identifier (UUID) for each site and further UUID's for each variable. You will need to copy all of those UUID values into your sketch to replace the "12345678-abcd-1234-efgh-1234567890ab" place holders in this example. Please do not try to run the example exactly as written, but delete the chunks of code pertaining to sensors that you do not have attached.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Example using the Modular Sensors Library to Save Data to an SD card and Send data to the EnviroDIY Data Portal
22

3-
This shows the use of an "EnviroDIY logger" object on a SAMD21 (Arduino Zero) board. It is very similar to the logging_to_EnviroDIY example, except that it defines multiple hardware serial ports for the sensors that communicate with the logger using any sort of serial communication. The SAMD boards have many more hardware serial ports available than the AVR boards, and those hardware ports should always be used before resorting to a software serial port. The exact selection of pins and ports in this example uses the SerCom ports available on a Adafruit Feather M0. The SerCom ports available do vary on different boards, so you must be aware of which ones are available for the board you are using. Before using this example, you must register a site and sensors at the data portal (http://data.envirodiy.org/). After you have registered the site and sensors, the portal will generate a registration token and globally unique identifier (GUID) for each site and further GUID's for each variable. You will need to copy all of those GUID values into your sketch to replace the "12345678-abcd-1234-efgh-1234567890ab" place holders in this example. Please do not try to run the example exactly as written, but delete the chunks of code pertaining to sensors that you do not have attached.
3+
This shows the use of an "EnviroDIY logger" object on a SAMD21 (Arduino Zero) board. It is very similar to the logging_to_EnviroDIY example, except that it defines multiple hardware serial ports for the sensors that communicate with the logger using any sort of serial communication. The SAMD boards have many more hardware serial ports available than the AVR boards, and those hardware ports should always be used before resorting to a software serial port. The exact selection of pins and ports in this example uses the SerCom ports available on a Adafruit Feather M0. The SerCom ports available do vary on different boards, so you must be aware of which ones are available for the board you are using. Before using this example, you must register a site and sensors at the data portal (http://data.envirodiy.org/). After you have registered the site and sensors, the portal will generate a registration token and universally unique identifier (UUID) for each site and further UUID's for each variable. You will need to copy all of those UUID values into your sketch to replace the "12345678-abcd-1234-efgh-1234567890ab" place holders in this example. Please do not try to run the example exactly as written, but delete the chunks of code pertaining to sensors that you do not have attached.

src/LoggerEnviroDIY.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ void LoggerEnviroDIY::streamEnviroDIYRequest(Stream *stream)
124124
{
125125
// first we need to calculate how long the json string is going to be
126126
int jsonLength = 22; // {"sampling_feature": "
127-
jsonLength += 36; // sampling feature GUID
127+
jsonLength += 36; // sampling feature UUID
128128
jsonLength += 17; // ", "timestamp": "
129129
jsonLength += 25; // markedISO8601Time
130130
jsonLength += 3; // ",_
131131
for (int i = 0; i < Logger::_variableCount; i++)
132132
{
133133
jsonLength += 1; // "
134-
jsonLength += 36; // variable GUID
134+
jsonLength += 36; // variable UUID
135135
jsonLength += 3; // ":_
136136
jsonLength += Logger::_variableList[i]->getValueString().length();
137137
if (i + 1 != Logger::_variableCount)

0 commit comments

Comments
 (0)