Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

arduino-libraries/ArduinoIoTCloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check Arduino statusCompile ExamplesSpell CheckUnit Testscodecov

What?

TheArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to theArduino IoT Cloud. The following boards are supported:

How?

  1. Register your Arduino IoT Cloud capable board viaArduino IoT Cloud (Devices Section).
  2. Create a new logical representation known as aThing.

Arduino IoT Cloud Components

  • Devices: Physical objects built around a board (e.g.MKR WiFi 1010). This is the hardware which runs the sketch, reads sensors, controls actuators and communicates with the Arduino IoT Cloud.

  • Things: Logical representation of a connected object. They embody inherent properties of the object, with as little reference to the actual hardware or code used to implement them. Each Thing is represented by a collection ofProperties (e.g., temperature, light, pressure...).

  • Properties: Qualities defining the characteristics of a system. AProperty can be defined asread-only (READ) to indicate that Arduino IoT Cloud can read the data, but cannot change the value of suchProperty. On the other end, it may be designated to beread-and-write (READWRITE), allowing Arduino IoT Cloud to remotely change the property’s value and trigger an event notification on the device. It is also possible to mark properties aswrite-only (WRITE) which means the cloud can write to this property but not read its value (this limits data transmission for properties which are used to trigger events only).

How-to-use

  • thingProperties.h
voidonLedChange();/* ...*/bool led;int seconds;/* ...*/voidinitProperties() {  ArduinoCloud.setThingId("ARDUINO-THING-ID");  ArduinoCloud.addProperty(led, WRITE, ON_CHANGE, onLedChange);  ArduinoCloud.addProperty(seconds, READ, ON_CHANGE);}/* ...*/WiFiConnectionHandlerArduinoIoTPreferredConnection("SECRET_SSID","SECRET_PASS");
  • MyCloudApplication.ino
#include"thingProperties.h"voidsetup() {  Serial.begin(9600);while(!Serial) { }pinMode(LED_BUILTIN, OUTPUT);initProperties();  ArduinoCloud.begin(ArduinoIoTPreferredConnection);}voidloop() {  ArduinoCloud.update();  seconds =millis() /1000;}voidonLedChange() {digitalWrite(LED_BUILTIN, led);}

FAQ

Watchdog

The1.0.0 release of this library adds watchdog functionality to all ATSAMD21G18 based cloud connected boards. A watchdog is simply an electronic timer counting down from a preset start value which, upon reaching zero, triggers a reset of the microcontroller. It can be used to automatically recover from temporary hardware faults or unrecoverable software errors. In order to avoid the watchdog from reaching zero the countdown timer needs to be regularly re-set to its start value. This is happening withinArduinoCloud.update() which is periodically called at the start of theloop() function. Although the watchdog is automatically enabled it can be disabled by setting the second parameter ofArduinoCloud.begin(...) tofalse:

ArduinoCloud.begin(ArduinoIoTPreferredConnection,false).

Whatchdog is enabled by default using the following boards:MKR 1000,MKR WiFi 1010,MKR GSM 1400,MKR NB 1500,MKR WAN 1300/1310,Nano 33 IoT,Portenta H7,Nano RP2040 Connect,Nicla Vision,OPTA WiFi,OPTA RS485,OPTA Lite,GIGA R1 WiFi

Device can not subscribe toTHING_ID

ArduinoIoTCloudTCP::handle_SubscribeMqttTopics could not subscribe to /a/t/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/e/i

In this case either the device has not been associated with the thing within the Arduino IoT Cloud GUI configuration or there's a typo in the thing ID.

OTA

OTA is supported by the following boards:MKR WiFi 1010,Nano 33 IoT,Portenta H7,Nano RP2040 Connect,Nicla Vision,OPTA WiFi,OPTA RS485,OPTA Lite,GIGA R1 WiFi,Nano ESP32,ESP32

Authentication

Boards can authenticate to the ArduinoIoTCloud servers using 3 methods:

License

The ArduinoIoTCloud library is licensed under the GNU General Public License v3.0.

You can be released from the requirements of the above license by purchasing a commercial license. Buying such a license is mandatory if you want to modify or otherwise use the software for commercial activities involving the Arduino software without disclosing the source code of your own applications. To purchase a commercial license, send an email tolicense@arduino.cc


[8]ページ先頭

©2009-2025 Movatter.jp