Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S3-Touch-LCD-1.28 (porting) #2

Open
Santix29 opened this issue Apr 21, 2024 · 24 comments
Open

ESP32-S3-Touch-LCD-1.28 (porting) #2

Santix29 opened this issue Apr 21, 2024 · 24 comments
Labels
help wanted Extra attention is needed

Comments

@Santix29
Copy link

Santix29 commented Apr 21, 2024

I flashed the firmware into the esp32-s3 but it doesn't show me anything. What can I do about it?

@fbiego
Copy link
Owner

fbiego commented Apr 21, 2024

You need to check your connections, how are you connecting your display?

@Santix29
Copy link
Author

I'm using ESP32-S3-Touch-LCD-1.28, so the display is attached to the microcontroller. I will add the shematic pdf here and a photo of the esp32-s3
ESP32-S3-Touch-LCD-1.28-Sch.pdf
esp32-s3-touch-lcd-1 28-07
ESP32-S3-Touch-LCD-1 28-details-7

@fbiego
Copy link
Owner

fbiego commented Apr 21, 2024

Have you gotten your display working before?
Check https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class

Then you will need to change this to match your display

Arduino_DataBus *bus = new Arduino_ESP32SPI(21 /* DC */, 22 /* CS */, 18 /* SCK */, 23 /* MOSI */, -1 /* MISO */, VSPI /* spi_num */);
Arduino_GC9A01 *gfx = new Arduino_GC9A01(bus, 19, 0 /* rotation */, true /* IPS */);

@Santix29
Copy link
Author

I changed this line and doesn't seem to work even with these modifies

@fbiego
Copy link
Owner

fbiego commented Apr 22, 2024

At least provide how you've modified the code, other wise i can't help much

@Santix29
Copy link
Author

Santix29 commented Apr 22, 2024

sure
Arduino_ESP32SPI *bus = new Arduino_ESP32SPI(8 /* DC */, 9 /* CS */, 10 /* SCK */, 11 /* MOSI */, 12 /* MISO */);

@fbiego
Copy link
Owner

fbiego commented Apr 22, 2024

What about the next line?

@Santix29
Copy link
Author

Santix29 commented Apr 22, 2024

Arduino_GC9A01 *gfx = new Arduino_GC9A01(bus, 19, 0 /* rotation */, true /* IPS */);

@fbiego
Copy link
Owner

fbiego commented Apr 22, 2024

You need to change 19 to 14 in that line

Also change this line to match the BL pin (2)

@Santix29
Copy link
Author

I changed this: Arduino_GC9A01 gfx = new Arduino_GC9A01(bus, 14, 0 / rotation /, true / IPS */);
and this: #define BL 2
but it doesn't work

@fbiego
Copy link
Owner

fbiego commented Apr 22, 2024

It would be advisable to search and check for code that already works with your board first. Especially one that uses the same library (Arduino GFX)

@Santix29
Copy link
Author

Santix29 commented Apr 22, 2024

i found a code that works on my esp32-s3 with Arduino GFX Library:

#define TFT_BLK 2
#define TFT_RES 14

#define TFT_CS 9
#define TFT_MOSI 11
#define TFT_MISO 12
#define TFT_SCLK 10
#define TFT_DC 8

#define GFX_BL TFT_BLK

Arduino_ESP32SPI *bus = new Arduino_ESP32SPI(TFT_DC, TFT_CS, TFT_SCLK, TFT_MOSI, TFT_MISO, HSPI, true); // Constructor
Arduino_GFX *gfx = new Arduino_GC9A01(bus, TFT_RES, 0 /* rotation */, true /* IPS */);

in this code all the gpio for the display are defined and it have hspi
the code seem more simpler than yours so idk if that can help

@fbiego
Copy link
Owner

fbiego commented Apr 23, 2024

In that case, you may need to include HSPI and true in the constructor

Arduino_DataBus *bus = new Arduino_ESP32SPI(21 /* DC */, 22 /* CS */, 18 /* SCK */, 23 /* MOSI */, -1 /* MISO */, VSPI /* spi_num */);
Arduino_GC9A01 *gfx = new Arduino_GC9A01(bus, 19, 0 /* rotation */, true /* IPS */);

Arduino_ESP32SPI *bus = new Arduino_ESP32SPI(8 /* DC */, 9 /* CS */, 10 /* SCK */, 11 /* MOSI */, 12 /* MISO */, HSPI, true);
Arduino_GC9A01 *gfx = new Arduino_GC9A01(bus, 14, 0 /* rotation */, true /* IPS */);

You also need to make sure the display pins are not conflicting with other declarations, so change unused to -1

#define BL 5
#define CHARGE 34
#define BATT 27
#define MOTOR 25
#define B0 0
#define BT1 33
#define BT2 32
#define MPU_INT 13

#define BL 5
#define CHARGE -1
#define BATT -1
#define MOTOR -1
#define B0 -1
#define BT1 -1
#define BT2 -1
#define MPU_INT -1

Also set you touch pins, the existing ones conflict with the display

#define TSCL 4
#define TSDA 2
#define TINT 14
#define TRST 15

#define TSCL 7
#define TSDA 6
#define TINT 5
#define TRST 13

Important

Double check the pins again with the schematics

Warning

The IMU in your board is different, probably you will have to comment out the current IMU code

@Santix29
Copy link
Author

i think the IMU code is this: QMI8658

@Santix29
Copy link
Author

i changed this: Arduino_ESP32SPI bus = new Arduino_ESP32SPI(8 / DC /, 9 / CS /, 10 / SCK /, 11 / MOSI /, 12 / MISO */, HSPI, true);
Arduino_GC9A01 gfx = new Arduino_GC9A01(bus, 14, 0 / rotation /, true / IPS */);

this: #define TSCL 7
#define TSDA 6
#define TINT 5
#define TRST 13

and this: #define BL 2
#define CHARGE -1
#define BATT -1
#define MOTOR -1
#define B0 -1
#define BT1 -1
#define BT2 -1
#define MPU_INT -1
but nothing has changed

@fbiego
Copy link
Owner

fbiego commented Apr 23, 2024

You had some code that worked, can you share the full code in the repo? Also include the board configuration and IDE used

@fbiego fbiego changed the title problem after flashing the firmware ESP32-S3-Touch-LCD-1.28 Apr 23, 2024
@fbiego fbiego added the help wanted Extra attention is needed label Apr 23, 2024
@fbiego fbiego changed the title ESP32-S3-Touch-LCD-1.28 ESP32-S3-Touch-LCD-1.28 (porting) Apr 23, 2024
@Santix29
Copy link
Author

The code is this:
clock.zip
for this code I used Arduino IDE, while for yours I used visual studio code.

@fbiego
Copy link
Owner

fbiego commented Apr 24, 2024

What board are you selecting in Arduino IDE,
You need to match the same in VS Code

board = esp32doit-devkit-v1

@Santix29
Copy link
Author

yes, i have already changed that because he would give me an error

@fbiego
Copy link
Owner

fbiego commented Apr 24, 2024

This is as far as i can help you since I don't have the same board as you. Maybe someone with more experience and with the same board can help you out. I'll leave the issue open

@Santix29
Copy link
Author

Ok, I understand. Thanks anyway for your help

@Santix29
Copy link
Author

i solved the problem. I found a code on github (forked from yours) that was for the esp32-s3 mini, I changed the pins and now it works. but now I have another problem, when the esp32-s3 receive a notification or I want to send a watchfaces, it seems to reset and lose the connection with the smartphone. i saw the diagnostics of chronos app and it says "WATCH_ERROR_133".

@Rck27
Copy link

Rck27 commented Jul 14, 2024

i solved the problem. I found a code on github (forked from yours) that was for the esp32-s3 mini,.

Hey, how is it working now, and which fork is it? i cant find the fork that yo mentioned

@fbiego
Copy link
Owner

fbiego commented Jul 14, 2024

https://github.com/fbiego/esp32-c3-mini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants