Portenta H7 IoT Cloud

Hello!

It’s the first time i post on this Forum.

I have a doubt, i’m interested to do a IoT project with my new Portenta H7, that measure temperature, pressure and brightess with a BNP280 and a brightness sensor, and record all this measures at google sheet.

I’m trying to do it with Arduino Iot Plattform, but when i try to verify the sketch, i have an error with the compatibility of library “ArduinoIoTCloud.h”. The IDE tell me that:

WARNING: library ArduinoIoTCloud claims to run on samd, esp8266 architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).
WARNING: library Arduino_ConnectionHandler claims to run on samd, esp32, esp8266 architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).
WARNING: library ArduinoECCX08 claims to run on samd, megaavr architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).

And doesn’t compile.

Anyone has the same issue?

Thanks a lot, when i have the project complete i’ll share the info.

Regards!

Quijano__:
i have an error with the compatibility of library “ArduinoIoTCloud.h”. The IDE tell me that:

These are only warnings. At least for the ArduinoIoTCloud library, that warning is incorrect because it explicitely says in the readme that the Portenta H7 is supported.

I have submitted a fix for the spurious warning from the ArduinoIoTCloud library:

Quijano__:
And doesn’t compile.

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link that will allow you to make the attachment.

Hello!

Yes, i know that it was just Warnings, and it doesnt matter. But if you read all the error code, you’ll see that there is a lot of issues with the sketch “thingproperties.h” and “ArduinoIoTCloud”:

(sorry, i didn’t include the code, here it is)

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Portenta H7 (M7 core)"





















WARNING: library ArduinoIoTCloud claims to run on samd, esp8266 architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).

WARNING: library Arduino_ConnectionHandler claims to run on samd, esp32, esp8266 architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).

WARNING: library ArduinoECCX08 claims to run on samd, megaavr architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).

In file included from c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\propertycontainer.h:25:0,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/cbor/CBORDecoder.h:29,

                 from C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:32,

                 from sketch\thingProperties.h:1,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\types/automation/CloudTelevision.h: In member function 'virtual void CloudTelevision::setAttributesFromCloud()':

c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\types/automation/CloudTelevision.h:229:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

       setAttribute((int&)_cloud_value.pbc);

                                       ^

c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\Property.h:45:42: note: in definition of macro 'setAttribute'

 #define setAttribute(x) setAttributeReal(x, getAttributeName(#x, '.'))

                                          ^

c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\types/automation/CloudTelevision.h:230:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

       setAttribute((int&)_cloud_value.inp);

                                       ^

c:\users\angel\onedrive\documentos\arduino\libraries\arduinoiotcloud\src\property\Property.h:45:42: note: in definition of macro 'setAttribute'

 #define setAttribute(x) setAttributeReal(x, getAttributeName(#x, '.'))

                                          ^

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

sketch\thingProperties.h: In function 'void initProperties()':

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(float&, arduino::String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]

 #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)

                                                                ^

sketch\thingProperties.h:18:16: note: in expansion of macro 'addProperty'

   ArduinoCloud.addProperty(ligth, READ, 30 * SECONDS, NULL);

                ^

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:108:10: note: declared here

     void addPropertyReal(float& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0f, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));

          ^~~~~~~~~~~~~~~

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(float&, arduino::String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]

 #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)

                                                                ^

sketch\thingProperties.h:19:16: note: in expansion of macro 'addProperty'

   ArduinoCloud.addProperty(pressure, READ, 30 * SECONDS, NULL);

                ^

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:108:10: note: declared here

     void addPropertyReal(float& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0f, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));

          ^~~~~~~~~~~~~~~

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:100:64: warning: 'void ArduinoIoTCloudClass::addPropertyReal(float&, arduino::String, permissionType, long int, void (*)(), float, void (*)(Property&))' is deprecated: Use addProperty(property, Permission::ReadWrite) instead. [-Wdeprecated-declarations]

 #define addProperty( v, ...) addPropertyReal(v, #v, __VA_ARGS__)

                                                                ^

sketch\thingProperties.h:20:16: note: in expansion of macro 'addProperty'

   ArduinoCloud.addProperty(temperatura, READ, 30 * SECONDS, NULL);

                ^

In file included from sketch\thingProperties.h:1:0,

                 from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:19:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:108:10: note: declared here

     void addPropertyReal(float& property, String name, permissionType permission_type = READWRITE, long seconds = ON_CHANGE, void(*fn)(void) = NULL, float minDelta = 0.0f, void(*synFn)(Property & property) = CLOUD_WINS) __attribute__((deprecated("Use addProperty(property, Permission::ReadWrite) instead.")));

          ^~~~~~~~~~~~~~~

In file included from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:22:0:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Adafruit_BMP280_Library/Adafruit_BMP280.h: At global scope:

C:\Users\angel\OneDrive\Documentos\Arduino\libraries\Adafruit_BMP280_Library/Adafruit_BMP280.h:40:17: error: conflicting declaration 'arduino::SPIClass SPI'

 extern SPIClass SPI; /**< Forward declaration of SPI object */

                 ^~~

In file included from C:\Users\angel\OneDrive\Desktop\TFG\PortentaIoT_sep12a\PortentaIoT_sep12a\PortentaIoT_sep12a.ino:21:0:

C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.2\libraries\SPI/SPI.h:64:25: note: previous declaration as 'arduino::MbedSPI SPI'

 extern arduino::MbedSPI SPI;

                         ^~~

Multiple libraries were found for "WiFi.h"

 Used: C:\Users\angel\OneDrive\Documentos\ArduinoData\packages\arduino-beta\hardware\mbed\1.2.2\libraries\WiFi

 Not used: C:\Users\angel\OneDrive\Documentos\Arduino\libraries\WiFiNINA

 Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\WiFi

exit status 1

Error compiling for board Arduino Portenta H7 (M7 core).



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What do you think?

Thanks and have a nice day!

PD: I’m gonna try your libraries and i’ll share if it work or doesnt for me! Thanks a lot for that also!!

I try it again with your libraries, but i have the same issue when i compiling.

i upload the code to: https://github.com/amoya04/Portenta-H7-IoT---Google-Sheet (i indicate that this code is in progress due to this errors)

Regards!