We were not able to upload the template sketch

My UNO R4 WiFi from the Plug and Make isn't importing the template while I set it up. It often alternates between a huge amount of code and simply saying something went wrong. The code reads this:

In file included from /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:9:0:
/home/builder/Arduino/libraries/button2_2_3_5/src/Button2.h:51:31: error: reference to 'empty' is ambiguous
clickType last_click_type = empty;
 ^~~~~
/home/builder/Arduino/libraries/button2_2_3_5/src/Button2.h:40:3: note: candidates are:
clickType empty empty
^~~~~ 
In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/string:51:0,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/stdexcept:39,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/array:39,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/variant.h:31,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/Arduino.h:8,
 from /tmp/arduino-build-8BFD4658FC7F1D9688C6D2DFE8DC9844/sketch/plug-make-getting-started_may26j.ino.cpp:1:
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/range_access.h:278:5: note:
 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>) empty(initializer_list<_Tp> __il) noexcept
 ^~~~~
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/range_access.h:269:5: note:
 template<class _Tp, unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm]) empty(const _Tp (&/*__array*/)[_Nm]) noexcept
^~~~~
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/range_access.h:260:5: note:
 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&) empty(const _Container& __cont) -> decltype(__cont.empty())
 ^~~~~
 /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino: In function 'void setup()':
 /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:87:8: error: reference to 'distance' is ambiguous
 if (!distance.begin()) { Serial.println("Modulino Distance not found!"); }
 ^~~~~~~~
 /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:15:18: note: candidates are: ModulinoDistance distance
 ModulinoDistance distance;
 ^~~~~~~~ 
In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:66:0,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/specfun.h:45,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/cmath:1914,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/math.h:36,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/api/ArduinoAPI.h:47,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/Arduino.h:4,
 from /tmp/arduino-build-8BFD4658FC7F1D9688C6D2DFE8DC9844/sketch/plug-make-getting-started_may26j.ino.cpp:1:
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_iterator_base_funcs.h:138:5: note:
 template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) distance(_InputIterator __first, _InputIterator __last)
^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino: In function 'void loop()':
 /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:166:16: error: reference to 'distance' is ambiguous
 } else if (distance && pixels) {
 ^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:15:18: note: candidates are: ModulinoDistance distance
 ModulinoDistance distance; ^~~~~~~~ 
In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:66:0,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/specfun.h:45,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/cmath:1914,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/math.h:36,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/api/ArduinoAPI.h:47,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/Arduino.h:4,
 from /tmp/arduino-build-8BFD4658FC7F1D9688C6D2DFE8DC9844/sketch/plug-make-getting-started_may26j.ino.cpp:1:
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_iterator_base_funcs.h:138:5: note:
 template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) distance(_InputIterator __first, _InputIterator __last)
 ^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino: In function 'void distancePixels()':
 /tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:324:7: error: reference to 'distance' is ambiguous
 if (distance.available()) {
 ^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:15:18: note: candidates are: ModulinoDistance distance 
ModulinoDistance distance; 
^~~~~~~~ 
In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:66:0,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/specfun.h:45,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/cmath:1914,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/math.h:36,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/api/ArduinoAPI.h:47,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/Arduino.h:4,
 from /tmp/arduino-build-8BFD4658FC7F1D9688C6D2DFE8DC9844/sketch/plug-make-getting-started_may26j.ino.cpp:1:
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_iterator_base_funcs.h:138:5: note:
 template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) distance(_InputIterator __first, _InputIterator __last)
 ^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:325:12: error: reference to 'distance' is ambiguous 
dist = distance.get(); 
^~~~~~~~ 
/tmp/2242568466/plug-make-getting-started_may26j/plug-make-getting-started_may26j.ino:15:18: note: candidates are: ModulinoDistance distance
 ModulinoDistance distance; 
^~~~~~~~ 
In file included from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:66:0,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/specfun.h:45,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/cmath:1914,
 from /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/math.h:36,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/api/ArduinoAPI.h:47,
 from /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/cores/arduino/Arduino.h:4,
 from /tmp/arduino-build-8BFD4658FC7F1D9688C6D2DFE8DC9844/sketch/plug-make-getting-started_may26j.ino.cpp:1:
 /home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_iterator_base_funcs.h:138:5: note:
 template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) distance(_InputIterator __first, _InputIterator __last)
 ^~~~~~~~ 

Multiple libraries were found for "RTC.h" 
  Used: /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/libraries/RTC 
  Not used: /home/builder/opt/libraries/m5core2_0_2_0
  Not used: /home/builder/opt/libraries/m5stickcplus_0_1_1
  Not used: /home/builder/opt/libraries/m5station_0_0_1
  Not used: /home/builder/opt/libraries/m5stickc_0_3_0 
Multiple libraries were found for "Wire.h"
  Used: /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/libraries/Wire
  Not used: /home/builder/opt/libraries/flexwire_1_2_1 Multiple libraries were found for "SPI.h"
  Used: /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.3.1/libraries/SPI
  Not used: /home/builder/opt/libraries/eventethernet_1_0_0

Error during build: exit status 1

Any help would be appreciated. Thanks!

1 Like

After reading the "How to get the best out of this forum" post, please follow the suggestions on how to post the code, using code tags, and how to make your post legible by properly formatting the error messages.

1 Like

EDIT your post and wrap your error in a code block...

If you don't attach the bug report and your code according to the rules, we'd be hard pressed to help you (unless you think we're fortune tellers).

1 Like

Hi @benmendez7777. I see there is an incompatibility between the "Plug and Make Getting Started" template's code and the latest version of the "ArduinoIoTCloud" library it uses.

I have notified the Arduino developers of the problem.

Until they have updated the code to be compatible with the latest version of the library, if you want to use this template you need to configure your Arduino Cloud account so that the compatible version of the library as a workaround for the incompatibility. I'll provide instructions you can follow to do that:

  1. Click the following link to download the previous version of the "ArduinoIoTCloud" library:
    https://downloads.arduino.cc/libraries/github.com/arduino-libraries/ArduinoIoTCloud-2.5.1.zip
  2. Wait for your web browser to finish the download.
  3. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  4. Click the following link to open the Arduino Cloud "Sketches" page in your web browser:
    https://app.arduino.cc/sketches
  5. Click the "˅ CREATE" button at the top right corner of the "Sketches" page.
    A menu will open.
  6. Select "Import local file" from the menu.
    The "Import files" dialog will open.
  7. Click the "IMPORT" link at the bottom of the "Import files" dialog.
    The "Open" dialog will open.
  8. Select the ArduinoIoTCloud-2.5.1.zip file you downloaded at step 1 of these instructions from the "Open" dialog.
  9. Click the "Open" button.
    The "Open" dialog will close and a file import process will start, as indicated by a progress bar in the "Import files" dialog.
  10. Wait for the import process to finish, as indicated by the appearance of a "Successfully imported files" message in the "Import files" dialog.
  11. Click the "CLOSE" link at the bottom of the "Import files" dialog.
    The dialog will close.

Now try using the template again, just as you did before when you encountered this problem. Hopefully this time it will work as expected.


Please let us know if you have any questions or problems while following those instructions.

Hi @benmendez7777, the issue should be fixed now. Please try again and let us know if everything works as expected

To add to what @mirkocurtolo wrote, this means that the workaround I described in post #5 is no longer required.

If you followed the instructions I provided, you should now remove the copy of the ArduinoIoTCloud library you imported to your account so that you can benefit from the latest development work on the library, and also to avoid unnecessary use of your Arduino Cloud account's storage allocation. I'll provide instructions you can follow to do that:

  1. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login

  2. Click the following link to open the list of your Arduino Cloud sketches in the web browser:
    https://app.arduino.cc/sketches

  3. Click on any sketch, or use the CREATE > New sketch button to create a new sketch.
    The sketch will open in Arduino Cloud Editor.

  4. Click the icon that looks like shelved books ("Libraries") in the bar on the left side of the Cloud Editor page.
    The "Libraries" panel will open.

  5. Select the "Custom" tab from the "Libraries" panel.

  6. You will see text near the top of the panel:

    Show libraries for:
    <board name>

    (where <board name> is the name of the board you have selected in Arduino Cloud Editor)
    Click the board name in that text.
    The text will now change to:

    Show libraries for:
    ALL DEVICES

  7. Scroll down through the list of custom libraries until you find the entry for the "ArduinoIoTCloud" library.

  8. Click the icon to the right of the library name.
    A menu will open.

  9. Select "Delete Library" from the menu.
    A "Delete custom library" dialog will open.

  10. Click the "YES, DELETE" button in the dialog.


Please let us know if you have any questions or problems while following those instructions.

1 Like