Wokwi has Arduino_Nesso_N1.h... but

When Arduino_Nesso_N1.h is included in a Wokwi sketch...

#include <Arduino_Nesso_N1.h>
void setup() {
  Serial.begin(115200);
  while (!Serial) {};
  Serial.println("Hello, World!");
}

void loop() {}

If the board used in Wokwi is ESP32-C6, Wokwi sees a conflict with LED_BUILTIN...

In file included from sketch.ino:1:
/libraries/Arduino_Nesso_N1/src/Arduino_Nesso_N1.h:49:20: error: conflicting declaration 'ExpanderPin LED_BUILTIN'
   49 | extern ExpanderPin LED_BUILTIN;
      |                    ^~~~~~~~~~~
In file included from /esp32/hardware/esp32/3.1.1/cores/esp32/esp32-hal-gpio.h:29,
                 from /esp32/hardware/esp32/3.1.1/cores/esp32/esp32-hal.h:88,
                 from /esp32/hardware/esp32/3.1.1/cores/esp32/Arduino.h:36,
                 from sketch.ino.cpp:1:
/esp32/hardware/esp32/3.1.1/variants/esp32c6/pins_arduino.h:9:22: note: previous declaration as 'const uint8_t LED_BUILTIN'
    9 | static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
      |                      ^~~~~~~~~~~
Error during build: exit status 1

If the board used in Wokwi is Uno/Nano, Wokwi does not import M5GFX.h properly.

In file included from /libraries/M5GFX/src/M5GFX.h:47:0,
                 from /libraries/Arduino_Nesso_N1/src/Arduino_Nesso_N1.h:8,
                 from sketch.ino:1:
/libraries/M5GFX/src/lgfx/v1/platforms/device.hpp:94:10: fatal error: arduino_default/Bus_SPI.hpp: No such file or directory
 #include "arduino_default/Bus_SPI.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Error during build: exit status 1

I see Wokwi is using version 3.1.1 of the "esp32" platform. Support for the Nesso N1 was added later, in version 3.3.3 of the platform.

I don't have any experience using Wokwi, so I'm not sure what the situation is with getting the platform updated. I did a bit of looking around for a request in the issue trackers of their GitHub repositories:

https://github.com/issues/?q=user%3Awokwi%20is%3Aissue%20state%3Aopen%20esp32

Surprisingly, I didn't find anything there. So maybe it is worthwhile to raise an issue in order to ensure it is on the radar for the Wokwi developers.

I believe they will also need to add a Nesso N1 board definition even after updating the platform.

Maybe you can work around the problem by compiling locally using Arduino IDE and then uploading the compiled binary to Wokwi?:

https://docs.wokwi.com/guides/esp32#custom-application-firmware

I have not yet tried making .bin files. I will need to read about it first. Thank you for checking with Nesso on Wokwi. Perhaps they are staying up nights doing this, and I just jumped the gun a bit.

Considering their "esp32" platform has been outdated for almost a year now (3.1.2 was released 2025-01-13), let's hope not for their sake :laughing: