DS3231_simple:12:8: error: ‘DS3231 clock’ redeclared as different kind of symbol DS3231 clock;

  1. I am using arduino ide 1.8.7.
  2. Esp8266 3.0.
  3. DS3221 libraries by Jarzebski.
    After updating esp8266 board to ver 3.0 in arduino ide my program stopped compiling.
    An error occurred "‘DS3231 clock’ redeclared as different kind of symbol
    DS3231 clock;"
    I read about https://forum.arduino.cc/t/ds3231-simple8-error-ds3231-clock-redeclared-as-different-kind-of-symbol-ds3231-clock/910389 and no result.
    I solved my problem as follows:
  4. Upgrade arduino ide to ver 2.0 beta
  5. Downgrade eso8266 board to ver 2.4.1

As a guess because you have not posted your sketch (HINT !), you have an object named DS3231 and a variable or function of the same name. Try changing the name of the clock object

BTW the link that you posted does not work

The correct link: Getting error message 'DS3231 clock' redeclared as different kind of symbol'
I tried to change clock to another name, but it caused more compile errors.
see DS3221.h by Jarzebski: GitHub - jarzebski/Arduino-DS3231: DS3231 Real-Time-Clock.
For those who have the same error, I present a solution that works for me.

  • I solved my problem as follows:
  • Upgrade arduino ide to ver 2.0 beta
  • Downgrade eso8266 board to ver 2.4.1