[SOLVED] Arduino r4 wifi - RTClib.h compiler errors

Hello everyone, I have recently bought an Arduino Uno R4 Wifi to try a sketch I used succesfully in Arduino uno r3, where I use the library RTClib for my DS3231 clock in order to save the time and date in several variables. Instead, when I try to compile the same sketch in this new R4 board, it is stated the following error : ambiguous overload for 'operator=' ...........
Below it is part of the script that I am referring to (this and only this is definitely the important part, the rest of the script doesn't affect this process), and the errors that are stated.


#include <Wire.h>  // RTC DS3231 clock
#include <RTClib.h>  // RTC DS3231 clock

RTC_DS3231 rtc;

String ano;
String dia;
String mes;
String horas;
String minutos;
String segundos;
String Fecha;
String Hora;
String Nombrearchivo;

void setup() { 

  Serial.begin (9600);
  
  Serial.println("Starting clock RTC...");
  if(! rtc.begin())
  { Serial.println("Clock RTC couldn't be found");
  Serial.flush();
  while (1) delay(10);
  //abort();
  }
  if (rtc.lostPower())
  { Serial.println("RTC not activated, state hour");
    //!! run once and compile again just as a comment :
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); //date and time adjusted by PC
  }
  else
  { Serial.println("RTC initiated");
  }
  
  
}

void loop() {
  delay (2000);
  
  DateTime now = rtc.now();
  
  ano = now.year();
  mes = now.month();
  dia = now.day();
  horas = now.hour();
  minutos = now.minute();
  segundos = now.second();
  Fecha = ano + "/" + mes + "/" + dia;
  Hora = horas + ":" + minutos + ":" + segundos;
}

The error: C:\Users\itainvr\Documents\Arduino\EHA_3\EHA_3.ino:160:18: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint16_t {aka short unsigned int}')
ano = now.year();

I'll be very thankful for any feedback.

You declared the variables as strings, the functions return ints.

1 Like

Please post all error messages as <CODE/> Often there is interesting stuff outside the edges of a screenshot.

In this case, the error is easy to reproduce

String s;
uint16_t i = 42;
s = i;

I don't have an R3, but on Uno and ESP32 for example, you can get away with this, assigning an integer to a String, via automatic conversion. But not on R4, the combination of libraries and compiler switches suggests more than one potential route, and so the operation is "ambiguous"

FQBN: arduino:renesas_uno:unor4wifi
Using board 'unor4wifi' from platform in folder: $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0
Using core 'arduino' from platform in folder: $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0

$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino: In function 'void setup()':
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint16_t {aka short unsigned int}')
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::String' is ambiguous
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: conversion from 'uint16_t {aka short unsigned int}' to 'arduino::String' is ambiguous
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   s = i;
       ^
In file included from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/IPAddress.h:24:0,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/ArduinoAPI.h:30,
                 from $HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/Arduino.h:4,
                 from $HOME\Temp\arduino\sketches\CD95D4E408ABF4D9F618A5940DD416F8\sketch\sketch_sep26b.ino.cpp:1:
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
$HOME\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
$HOME\Temp\.arduinoIDE-unsaved2024826-2796-wdwqbt.43k3\sketch_sep26b\sketch_sep26b.ino:4:7: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   s = i;
       ^

exit status 1

Compilation error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint16_t {aka short unsigned int}')

That's a lot of detail. Remove all the file path/line/column stuff (mostly redundant in this case anyway)

In function 'void setup()':
error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint16_t {aka short unsigned int}')
   s = i;
       ^

'operator =' is assignment of course: "can't assign one of these as one of those because there is more than way to do it." First way:

note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
note:   conversion of argument 1 would be ill-formed:
error: conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::String' is ambiguous
   s = i;
       ^

rhs means "right-hand side" of the equal sign. The most obvious thing to assign to a String is another String, but converting an int to a String is itself ambiguous!

note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
note:   conversion of argument 1 would be ill-formed:
error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   s = i;
       ^

Convert an integer to a pointer (to a __FlashStringHelper) to load a String? Only allowed with the -fpermissive compiler switch. Actually just wrong in this case, so good thing it doesn't try.

note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
note:   conversion of argument 1 would be ill-formed:
error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   s = i;
       ^

Another pointer, this time to a C-string, to convert to a String? No, it's a number, not a pointer.

note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
conversion of argument 1 would be ill-formed:
error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   s = i;
       ^

Instead of assigning String to String, how about assigning a pointer to C-string? No, the same conversion as before, and not allowed.

note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
note:   conversion of argument 1 would be ill-formed:
error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   s = i;
       ^

__FlashStringHelper again? No.

note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
note:   conversion of argument 1 would be ill-formed:
error: conversion from 'uint16_t {aka short unsigned int}' to 'arduino::String' is ambiguous

OK, how about an rvalue reference? Note that this is trying to convert "to 'arduino::String'", while the first was "to 'const arduino::String'" It considers again converting to the same two kinds of pointers, so: of course, no.

It appears that R4 is missing a valid conversion, not that there are too many working ones.

So how to work around this? You could make your variables the appropriate type, which would likely require other changes elsewhere. The simplest fix is to do an explicit conversion manually:

  ano = String(now.year());
  mes = String(now.month());

The corresponding constructor is explicit

  explicit String(unsigned int, unsigned char base=10);

which is why the compiler couldn't just do it for you.

3 Likes

Yes! Definitely adding the explicit conversion manually worked wonders only using:

ano = String(now.year());
mes = String(now.month());

........ etc.

Thank you very much!

I'll add below the error statements in case it helps others:

C:\EHA_3_UNOR4WIFI.ino: In function 'void loop()':
C:\EHA_3_UNOR4WIFI.ino:160:18: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint16_t {aka short unsigned int}')
   ano = now.year();
                  ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:18: error: conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::String' is ambiguous
   ano = now.year();
                  ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:18: error: conversion from 'uint16_t {aka short unsigned int}' to 'arduino::String' is ambiguous
   ano = now.year();
                  ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:160:17: error: invalid conversion from 'uint16_t {aka short unsigned int}' to 'const char*' [-fpermissive]
   ano = now.year();
         ~~~~~~~~^~
C:\EHA_3_UNOR4WIFI.ino:161:19: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint8_t {aka unsigned char}')
   mes = now.month();
                   ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:19: error: conversion from 'uint8_t {aka unsigned char}' to 'const arduino::String' is ambiguous
   mes = now.month();
                   ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:19: error: conversion from 'uint8_t {aka unsigned char}' to 'arduino::String' is ambiguous
   mes = now.month();
                   ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:161:18: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   mes = now.month();
         ~~~~~~~~~^~
C:\EHA_3_UNOR4WIFI.ino:162:17: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint8_t {aka unsigned char}')
   dia = now.day();
                 ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:17: error: conversion from 'uint8_t {aka unsigned char}' to 'const arduino::String' is ambiguous
   dia = now.day();
                 ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:17: error: conversion from 'uint8_t {aka unsigned char}' to 'arduino::String' is ambiguous
   dia = now.day();
                 ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:162:16: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   dia = now.day();
         ~~~~~~~^~
C:\EHA_3_UNOR4WIFI.ino:163:20: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint8_t {aka unsigned char}')
   horas = now.hour();
                    ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:163:20: error: conversion from 'uint8_t {aka unsigned char}' to 'const arduino::String' is ambiguous
   horas = now.hour();
                    ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C\EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~

C:\Users\itainvr\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\Users\itainvr\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\Users\itainvr\Documents\Arduino\EHA_3_UNOR4WIFI\EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\Users\itainvr\Documents\Arduino\EHA_3_UNOR4WIFI\EHA_3_UNOR4WIFI.ino:163:20: error: conversion from 'uint8_t {aka unsigned char}' to 'arduino::String' is ambiguous
   horas = now.hour();
                    ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:163:19: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   horas = now.hour();
           ~~~~~~~~^~
C:\EHA_3_UNOR4WIFI.ino:164:24: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint8_t {aka unsigned char}')
   minutos = now.minute();
                        ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:24: error: conversion from 'uint8_t {aka unsigned char}' to 'const arduino::String' is ambiguous
   minutos = now.minute();
                        ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:24: error: conversion from 'uint8_t {aka unsigned char}' to 'arduino::String' is ambiguous
   minutos = now.minute();
                        ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:164:23: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   minutos = now.minute();
             ~~~~~~~~~~^~
C:\EHA_3_UNOR4WIFI.ino:165:25: error: ambiguous overload for 'operator=' (operand types are 'arduino::String' and 'uint8_t {aka unsigned char}')
   segundos = now.second();
                         ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::String&) <near match>
  String & operator = (const String &rhs);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:97:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:25: error: conversion from 'uint8_t {aka unsigned char}' to 'const arduino::String' is ambiguous
   segundos = now.second();
                         ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note: candidate: arduino::String& arduino::String::operator=(const char*) <near match>
  String & operator = (const char *cstr);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:98:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note: candidate: arduino::String& arduino::String::operator=(const arduino::__FlashStringHelper*) <near match>
  String & operator = (const __FlashStringHelper *str);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:99:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note: candidate: arduino::String& arduino::String::operator=(arduino::String&&) <near match>
  String & operator = (String &&rval);
           ^~~~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:100:11: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:25: error: conversion from 'uint8_t {aka unsigned char}' to 'arduino::String' is ambiguous
   segundos = now.second();
                         ^

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note: candidate: arduino::String::String(const arduino::__FlashStringHelper*) <near match>
  String(const __FlashStringHelper *str);
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:74:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const arduino::__FlashStringHelper*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note: candidate: arduino::String::String(const char*) <near match>
  String(const char *cstr = "");
  ^~~~~~
C:\arduino\hardware\renesas_uno\1.2.1\cores\arduino/api/String.h:70:2: note:   conversion of argument 1 would be ill-formed:
C:\EHA_3_UNOR4WIFI.ino:165:24: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
   segundos = now.second();
              ~~~~~~~~~~^~

exit status 1

Compilation error: return-statement with a value, in function returning 'void' [-fpermissive]

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.