CH32V003P4 - Sleep and Wakeup

OK, now the situation is different. You fixed the problem that caused the wrong library to be used at the time you made the previous screenshot.

The correct library is now being used, but there is a new problem. The new problem is that the library uses the ARDUINO_ARCH_CH32 macro to determine whether it is being compiled for a board with a CH32 microcontroller:

The definition of that macro was added to the "CH32 MCU EVT Boards" platform last summer:

The maintainers of the platform have not made a new release of the platform after that time. So when you install the platform via the Arduino IDE Boards Manager, you get a version that does not define the ARDUINO_ARCH_CH32 macro. So @maxint-rd's code only works if you manually installed the beta tester version of the "CH32 MCU EVT Boards" platform.

We can make the library compatible with the release version of the platform by making a small adjustment of the code. I'll provide instructions you can follow to do that:

  1. Use any text editor to open the file at the following path on your hard drive:
    c:\Users\julio\Documents\Arduino\libraries\Adafruit_SleepyDog-master/Adafruit_SleepyDog.h
    
  2. Change line 40 from this:
    #elif defined(ARDUINO_ARCH_CH32)
    
    to this:
    #elif defined(ARDUINO_ARCH_CH32) || defined(CH32V00x)
    
  3. Save the file.

Now try compiling or uploading your sketch once again. Hopefully this time everything will work as expected.