Hello, I try to build a project with the esp32 S3 amoled touch 1.75 from waveshare and I try to use platformio for it.
I have tried using the following ressource of the official waveshare : Setup Arduino IDE
Then I tried a default code that works that just print a timer and it works well. Then I would like to add some Wifi functionalities and there is a issue.
This is the platformio.ini:
[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
; Display configuration
board_build.partitions = default.csv
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
; Memory settings
board_upload.flash_size = 16MB
board_upload.maximum_ram_size = 327680
; Monitor settings
monitor_speed = 115200
monitor_dtr = 1 ; Important pour ESP32
monitor_rts = 1
monitor_filters = esp32_exception_decoder
; Upload settings
upload_speed = 460800
build_flags =
-I include
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DLV_CONF_INCLUDE_SIMPLE
lib_deps =
Wifi
lvgl/lvgl@^8.4.0
lewisxhe/SensorLib@^0.3.1
moononournation/GFX Library for Arduino@1.6.0
lzw655/ESP32_IO_Expander@^1.1.0
lewisxhe/XPowersLib@^0.2.6
https://github.com/ricmoo/QRCode.git
https://github.com/espressif/arduino-esp32.git
And this is the code that don’t work :
#include <Arduino.h>
#include "Arduino_GFX_Library.h"
#include "pin_config.h"
#include <Wire.h>
#include <time.h>
#include <Preferences.h>
#include <WiFi.h>
#include <qrcode.h>
Arduino_DataBus *bus = new Arduino_ESP32QSPI(
LCD_CS, LCD_SCLK, LCD_SDIO0, LCD_SDIO1,
LCD_SDIO2, LCD_SDIO3);
// CO5300 driver - 466x466
Arduino_CO5300 *gfx = new Arduino_CO5300(
bus, // DataBus
LCD_RESET, // RST pin
0, // Rotation (0, 1, 2, 3)
false, // IPS mode (false pour ce modèle)
LCD_WIDTH, // Largeur
LCD_HEIGHT, // Hauteur
6, // col_offset1
0, // row_offset1
0, // col_offset2
0 // row_offset2
);
unsigned long lastUpdate = 0;
const unsigned long UPDATE_INTERVAL = 1000;
void QRcode_generation(const char *text, int x, int y, int size) {
QRCode qrcode;
uint8_t qrcodeData[qrcode_getBufferSize(3)];
qrcode_initText(&qrcode, qrcodeData, 3, ECC_LOW, text);
for (int i = 0; i < qrcode.size; i++) {
for (int j = 0; j < qrcode.size; j++) {
if (qrcode_getModule(&qrcode, j, i)) {
gfx->fillRect(x + j * size, y + i * size, size, size, RGB565_BLACK);
} else {
gfx->fillRect(x + j * size, y + i * size, size, size, RGB565_WHITE);
}
}
}
}
void setup(void) {
Serial.begin(115200);
delay(1500);
Wire.begin(IIC_SDA, IIC_SCL);
if (!gfx->begin()) {
Serial.println("gfx->begin() failed!");
return;
}
gfx->fillScreen(RGB565_BLACK);
gfx->setBrightness(255);
// Initialisez l'heure du système (optionnel)
configTime(0, 0, "pool.ntp.org", "time.nist.gov");
Serial.println("Horloge ready!");
QRcode_generation("https://example.com", 10, 10, 5);
delay(4000);
}
void loop() {
}
When I try to upload this I got the error :
In file included from .pio/libdeps/esp32-s3-devkitc-1/ArduinoOTA/src/ArduinoOTA.cpp:20:
.pio/libdeps/esp32-s3-devkitc-1/ArduinoOTA/src/ArduinoOTA.h:18:10: fatal error: Network.h: No such file or directory
*****************************************************************
* Looking for Network.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Network.h"
* Web > https://registry.platformio.org/search?q=header:Network.h
*
*****************************************************************
#include "Network.h"
^~~~~~~~~~~
I saw on some feed that I can use a custom opensource platform of dev but it doesn’t work too I have issue with the FreeRtos.h
Does someone knows how can I do it ?
Thanks in advanced !!