@@ -192,44 +192,44 @@ For your convenience, IoT Cloud provides specialized types which are just wrappe
192
192
You can use them just like a normal variable of the wrapped type, since they support assignment and comparison operators.
193
193
194
194
| Type | Declaration | Wrapped data type |
195
- | -------------------- | ---------------------------------------- | ------- |
196
- | Acceleration | ` CloudAcceleration variableName; ` | ` float ` |
197
- | Angle | ` CloudAngle variableName; ` | ` float ` |
198
- | Area | ` CloudArea variableName; ` | ` float ` |
199
- | Capacitance | ` CloudCapacitance variableName; ` | ` float ` |
200
- | Color | ` CloudColor variableName; ` | ` float ` |
201
- | Contact Sensor | ` CloudContactSensor variableName; ` | ` bool ` |
202
- | Counter | ` CloudCounter variableName; ` | ` int ` |
203
- | Data Rate | ` CloudDataRate variableName; ` | ` float ` |
204
- | Electric Current | ` CloudElectricCurrent variableName; ` | ` float ` |
205
- | Electric Potention | ` CloudElectricPotention variableName; ` | ` float ` |
206
- | Electric Resistance | ` CloudElectricResistance variableName; ` | ` float ` |
207
- | Energy | ` CloudEnergy variableName; ` | ` float ` |
208
- | Flow Rate | ` CloudFlowRate variableName; ` | ` float ` |
209
- | Force | ` CloudForce variableName; ` | ` float ` |
210
- | Frequency | ` CloudFrequency variableName; ` | ` float ` |
211
- | Heart Rate | ` CloudHeartRate variableName; ` | ` float ` |
212
- | Information Content | ` CloudInformationContent variableName; ` | ` int ` |
213
- | Length | ` CloudLength variableName; ` | ` float ` |
214
- | Light | ` CloudLight variableName; ` | ` bool ` |
215
- | Location | ` CloudLocation variableName; ` | ` float ` |
216
- | Logarithmic Quantity | ` CloudLogarithmicQuantity variableName; ` | ` float ` |
217
- | Luminance | ` CloudLuminance variableName; ` | ` float ` |
218
- | Luminous Flux | ` CloudLuminousFlux variableName; ` | ` float ` |
219
- | Luminous Intensity | ` CloudLuminousIntensity variableName; ` | ` float ` |
220
- | Mass | ` CloudMass variableName; ` | ` float ` |
221
- | Motion Sensor | ` CloudMotionSensor variableName; ` | ` bool ` |
222
- | Percentage | ` CloudPercentage variableName; ` | ` float ` |
223
- | Power | ` CloudPower variableName; ` | ` float ` |
224
- | Pressure | ` CloudPressure variableName; ` | ` float ` |
225
- | Relative Humidity | ` CloudRelativeHumidity variableName; ` | ` float ` |
226
- | Smart Plug | ` CloudSmartPlug variableName; ` | ` bool ` |
227
- | Switch | ` CloudSwitch variableName; ` | ` bool ` |
228
- | CloudTemperature | ` CloudTemperature variableName; ` | ` float ` |
229
- | Temperature Sensor | ` CloudTemperatureSensor variableName; ` | ` float ` |
230
- | Time | ` CloudTime variableName; ` | ` float ` |
231
- | Velocity | ` CloudVelocity variableName; ` | ` float ` |
232
- | Volume | ` CloudVolume variableName; ` | ` float ` |
195
+ | -------------------- | ---------------------------------------- | ----------------- |
196
+ | Acceleration | ` CloudAcceleration variableName; ` | ` float ` |
197
+ | Angle | ` CloudAngle variableName; ` | ` float ` |
198
+ | Area | ` CloudArea variableName; ` | ` float ` |
199
+ | Capacitance | ` CloudCapacitance variableName; ` | ` float ` |
200
+ | Color | ` CloudColor variableName; ` | ` float ` |
201
+ | Contact Sensor | ` CloudContactSensor variableName; ` | ` bool ` |
202
+ | Counter | ` CloudCounter variableName; ` | ` int ` |
203
+ | Data Rate | ` CloudDataRate variableName; ` | ` float ` |
204
+ | Electric Current | ` CloudElectricCurrent variableName; ` | ` float ` |
205
+ | Electric Potention | ` CloudElectricPotention variableName; ` | ` float ` |
206
+ | Electric Resistance | ` CloudElectricResistance variableName; ` | ` float ` |
207
+ | Energy | ` CloudEnergy variableName; ` | ` float ` |
208
+ | Flow Rate | ` CloudFlowRate variableName; ` | ` float ` |
209
+ | Force | ` CloudForce variableName; ` | ` float ` |
210
+ | Frequency | ` CloudFrequency variableName; ` | ` float ` |
211
+ | Heart Rate | ` CloudHeartRate variableName; ` | ` float ` |
212
+ | Information Content | ` CloudInformationContent variableName; ` | ` int ` |
213
+ | Length | ` CloudLength variableName; ` | ` float ` |
214
+ | Light | ` CloudLight variableName; ` | ` bool ` |
215
+ | Location | ` CloudLocation variableName; ` | ` float ` |
216
+ | Logarithmic Quantity | ` CloudLogarithmicQuantity variableName; ` | ` float ` |
217
+ | Luminance | ` CloudLuminance variableName; ` | ` float ` |
218
+ | Luminous Flux | ` CloudLuminousFlux variableName; ` | ` float ` |
219
+ | Luminous Intensity | ` CloudLuminousIntensity variableName; ` | ` float ` |
220
+ | Mass | ` CloudMass variableName; ` | ` float ` |
221
+ | Motion Sensor | ` CloudMotionSensor variableName; ` | ` bool ` |
222
+ | Percentage | ` CloudPercentage variableName; ` | ` float ` |
223
+ | Power | ` CloudPower variableName; ` | ` float ` |
224
+ | Pressure | ` CloudPressure variableName; ` | ` float ` |
225
+ | Relative Humidity | ` CloudRelativeHumidity variableName; ` | ` float ` |
226
+ | Smart Plug | ` CloudSmartPlug variableName; ` | ` bool ` |
227
+ | Switch | ` CloudSwitch variableName; ` | ` bool ` |
228
+ | CloudTemperature | ` CloudTemperature variableName; ` | ` float ` |
229
+ | Temperature Sensor | ` CloudTemperatureSensor variableName; ` | ` float ` |
230
+ | Time | ` CloudTime variableName; ` | ` float ` |
231
+ | Velocity | ` CloudVelocity variableName; ` | ` float ` |
232
+ | Volume | ` CloudVolume variableName; ` | ` float ` |
233
233
234
234
235
235
### Complex Types
@@ -249,18 +249,29 @@ Declared as `CloudDimmedLight x;`
249
249
250
250
Declared as ` CloudColoredLight x; `
251
251
252
- | Property | Type | Read value | Set value |
253
- | ----------| ------------------- | ------------------------------- | ------------------------------ |
254
- | Switch | ` bool ` | ` x.getSwitch() ` | ` x.setSwitch() ` |
255
- | Hue | ` float ` (0-360) | ` x.getHue() ` | ` x.setHue() ` |
256
- | Saturation| ` float ` (0-100) | ` x.getSaturation() ` | ` x.setSaturation() ` |
257
- | Brightness| ` float ` (0-100) | ` x.getBrightness() ` | ` x.setBrightness() ` |
252
+ | Property | Type | Read value | Set value |
253
+ | ---------- | --------------- | ------------------- | ------------------- |
254
+ | Switch | ` bool ` | ` x.getSwitch() ` | ` x.setSwitch() ` |
255
+ | Hue | ` float ` (0-360) | ` x.getHue() ` | ` x.setHue() ` |
256
+ | Saturation | ` float ` (0-100) | ` x.getSaturation() ` | ` x.setSaturation() ` |
257
+ | Brightness | ` float ` (0-100) | ` x.getBrightness() ` | ` x.setBrightness() ` |
258
258
259
259
#### CloudColor
260
260
261
- Declared as ` CloudColor x; `
261
+ Declared as ` CloudColor x; ` .
262
+
263
+ To read the Color values, we can use the following method ` Color colorValues = x.getValue(); ` . This will assign the hue, saturation, and brightness values to the ` colorValues ` variable.
264
+
265
+ | Property | Type | Read value | Set value |
266
+ | ---------- | ---- | ----------------- | -------------------------------------- |
267
+ | Hue | | ` colorValues.hue ` | ` x = Color(hue,saturation,brightness) ` |
268
+ | Saturation | | ` colorValues.sat ` | ` x = Color(hue,saturation,brightness) ` |
269
+ | Brightness | | ` colorValues.bri ` | ` x = Color(hue,saturation,brightness) ` |
270
+
271
+
272
+
262
273
263
- To read the Color values, we can use the following method ` Color colorValues = x.getValue(); ` . This will assign the hue, saturation, and brightness values to the colorValues variable. If we want too access the values individually we can use ` Serial.println(colorValues.hue) ` , ` Serial.println(colorValues.sat) ` , and ` Serial.println(colorValues.bri) ` .
274
+ To read the Color values, we can use the following method ` Color colorValues = x.getValue(); ` . This will assign the hue, saturation, and brightness values to the ` colorValues ` variable. If we want too access the values individually we can use ` Serial.println(colorValues.hue) ` , ` Serial.println(colorValues.sat) ` , and ` Serial.println(colorValues.bri) ` .
264
275
265
276
To set the color, we can assign the CloudColor variable directly to float variables ` x = {hue,saturation,brightness} ` , or using the method ` x = Color(hue,saturation,brightness) ` .
266
277
@@ -276,14 +287,14 @@ To set the coordinates, we can assign the CloudLocation variable directly to flo
276
287
277
288
Declared as ` CloudTelevision x; `
278
289
279
- | Property | Type | Read Value | Set value |
280
- | ----------------- | ---------------------------------------------------------------------------------------| -------------------------| ------------------------- |
281
- | Switch | ` bool ` | ` x.getSwitch() ` | ` x.setSwitch () ` |
282
- | Volume | ` int ` (0-100) | ` x.getVolume() ` | ` x.setVolume() ` |
283
- | Mute | ` bool ` | ` x.getMute() ` | ` x.setMute() ` |
284
- | PlaybackCommands | ` PlaybackCommands ` (FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop) | ` x.getPlaybackCommand() ` | ` x.setPlaybackCommand() ` |
285
- | Input | ` InputValue ` ([ Up to 60 values] ( https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/property/types/automation/CloudTelevision.h ) such as HDMI1, HDMI2, DVD, GAME...etc.) | ` x.getInput() ` | ` x.setInput() ` |
286
- | Channel | ` int ` | ` x.getChannel() ` | ` x.setChannel() ` |
290
+ | Property | Type | Read Value | Set value |
291
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ------------------------ |
292
+ | Switch | ` bool ` | ` x.getSwitch () ` | ` x.setSwitch() ` |
293
+ | Volume | ` int ` (0-100) | ` x.getVolume() ` | ` x.setVolume() ` |
294
+ | Mute | ` bool ` | ` x.getMute() ` | ` x.setMute() ` |
295
+ | PlaybackCommands | ` PlaybackCommands ` (FastForward, Next, Pause, Play, Previous, Rewind, StartOver, Stop) | ` x.getPlaybackCommand() ` | ` x.setPlaybackCommand() ` |
296
+ | Input | ` InputValue ` ([ Up to 60 values] ( https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/src/property/types/automation/CloudTelevision.h ) such as HDMI1, HDMI2, DVD, GAME...etc.) | ` x.getInput() ` | ` x.setInput() ` |
297
+ | Channel | ` int ` | ` x.getChannel() ` | ` x.setChannel() ` |
287
298
288
299
289
300
### Examples
0 commit comments