Things are the logical representation of a connected object.

Normally, functions operate on certain values ​​passed to them either as literal constants or as variables, although functions that receive parameters can be defined. There are two ways in C ++ to pass parameters to a function; by reference or by value. The fact is that if a function declaration declares parameters by reference, they cannot be passed literal values ​​since the references point to objects (variables or functions) resident in memory; on the other hand, if a parameter is declared to be passed by value, it can be passed as a literal constant or as a variable. The parameters passed by reference can be altered by the function that receives them, while the parameters passed by value or copy cannot be altered by the function that receives them, that is, the function can manipulate the parameter at will, but no Change made on this will be reflected in the original parameter.

Parameters by value

The square function () (see above) is a classic example that shows the passage of parameters by value, in that sense the square function () receives a copy of the parameter n. In the same function it can be observed that a calculation is made (n * n), however the original parameter will not undergo any change, this will still be true even if within the function there was an instruction similar to n = n * n; or n * = n ;.

Parameters by reference

To show an example of the passing of parameters by reference, we will return to the case of the square function, except that this time we will change the syntax slightly to define it. Let’s see:

// regresar el cuadrado de un número
double cuadrado2(double &n)
    n *= n;
    return n;



Things represent the inherent properties of the object, with as little reference to the actual hardware used to implement them. Each thing is represented by a collection of properties (e.g., temperature, light).

Arduino IoT Cloud Properties

Properties are the qualities defining the characteristics of a system. A property can be something like a ‘read-only’ (RO) setting to indicate the Arduino IoT Cloud can read the data, but cannot change the value of the property. A property might be designed as ‘read and write’ (RW) if the Arduino IoT Cloud can also remotely change the property’s value and send an event notification to the device.

For example, a device might have a sensor which will provide the room temperature. That would be read-only. It might also include a thermostat to be able which will change the room’s temperature.

Property Type Value Permission

IoT Cloud Events

IoT Cloud becomes aware of events when it receives application messages that indicate the something has happened. For example, it might be informed by a face-recognition application that someone is at a door, or it has received a request from another app that light has to be turned on.