Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (61 sloc) 2.14 KB
#include "arduino_secrets.h"
Sketch generated by the Arduino IoT Cloud Thing "Test_MultiValue"
Arduino IoT Cloud Properties description
The following variables are automatically generated and updated when changes are made to the Thing properties
bool switchButton;
Properties which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
#include "thingProperties.h"
void setup() {
// Initialize serial and wait for port to open:
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
// Defined in thingProperties.h
// Connect to Arduino IoT Cloud
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
float latMov = 45.5058224, lonMov = 9.1628673;
float latArd = 45.0502078, lonArd = 7.6674765;
float hueRed = 0.0, satRed = 100.0, briRed = 100.0;
float hueGreen = 80.0, satGreen = 100.0, briGreen = 100.0;
void loop() {
// Your code here
switchButton = !switchButton;
if (switchButton) {
location = Location(latMov, lonMov);
color = Color(hueRed, satRed, briRed);
} else {
location = Location(latArd, lonArd);
color = Color(hueGreen, satGreen, briGreen);
void onSwitchButtonChange() {
// Do something
digitalWrite(LED_BUILTIN, switchButton);
void onColorChange() {
// Do something
Serial.print("Hue = ");
Serial.print("Sat = ");
Serial.print("Bri = ");
You can’t perform that action at this time.