Git Product home page Git Product logo

esp-simhub-esp32s3-screen's Introduction

ESP-SimHub-ESP32S3-SCREEN

Configuration based on the full/generic ESP-SimHub firmware: https://github.com/eCrowneEng/ESP-SimHub Discord: https://discord.gg/pnAXf2p3RS

A simple SimHub firmware to drive these screens using the created by: https://github.com/MoemenMostafa/simhub-esp-dashboard https://www.youtube.com/watch?v=wgdSPFE3QUg

You'll need to install their customProtocol-dashBoard.txt in the Arduino -> My Hardware -> Custom Protocol field.

These screens and similar using the ESP32-S3 and ILI screens https://www.aliexpress.us/item/3256804601832939.html

ESP32-S3:

  • 8048S043
  • 4827S043

esp-simhub-esp32s3-screen's People

Contributors

ecoreng avatar

Stargazers

Marcos avatar  avatar

Watchers

 avatar Marcos avatar

esp-simhub-esp32s3-screen's Issues

Change ESP32RGPPanel settings for 8048S3043 board

Hi,

First of all thank you for your work in setting this up. I bought a 4.3 800x480 board to play with SimHub dashboard and I was having some issues getting your example to work as I was only getting a white screen.

After some search I was able to get it working by changing the definition of Arduino_ESP32RGBPanel to the following:

Arduino_ESP32RGBPanel rgbpanel = new Arduino_ESP32RGBPanel(
40 /
DE /, 41 / VSYNC /, 39 / HSYNC /, 42 / PCLK /,
45 /
R0 /, 48 / R1 /, 47 / R2 /, 21 / R3 /, 14 / R4 /,
5 /
G0 /, 6 / G1 /, 7 / G2 /, 15 / G3 /, 16 / G4 /, 4 / G5 /,
8 /
B0 /, 3 / B1 /, 46 / B2 /, 9 / B3 /, 1 / B4 /,
0 /
hsync_polarity /, 8 / hsync_front_porch /, 4 / hsync_pulse_width /, 16 / hsync_back_porch /,
0 /
vsync_polarity /, 4 / vsync_front_porch /, 4 / vsync_pulse_width /, 4 / vsync_back_porch /,
1 /
pclk_active_neg /, 16000000 / prefer_speed */
);
You may want to include this as an option.

i use ESP32-2432S028 :

SPI
Two separate SPI busses are being used for the display and the touchscreen.

spi:

  • id: lcd
    clk_pin: GPIO14
    mosi_pin: GPIO13
    miso_pin: GPIO12
  • id: touch
    clk_pin: GPIO25
    mosi_pin: GPIO32
    miso_pin: GPIO39

https://macsbug.wordpress.com/2022/08/17/esp32-2432s028/

LIbrary Lovyan GFX 使用により多くの事が容易にできます。
日本語Fontは 綺麗で簡単に使用できます。
 
Lovyan GFX 設定:
 Display:ILI9341 :SPI2 HOST:SPI2_HOST
 cfg.freq_write : Max 40MHz
 Touch:XPT2046:SPI3 HOST:VSPI_HOST
 Touch:cfg.pin_int = 36; Touchが動作しない場合は -1 にします。

/```
/----------------------------------------------------------------------
// https://github.com/lovyan03/LovyanGFX/blob/master/examples/HowToUse/2_user_setting/2_user_setting.ino
class LGFX : public lgfx::LGFX_Device{
lgfx::Panel_ILI9341 _panel_instance;
lgfx::Bus_SPI _bus_instance;
lgfx::Light_PWM _light_instance;
lgfx::Touch_XPT2046 _touch_instance;
//----------------------------------------------------------------------
public:LGFX(void){
{ // バス制御の設定を行います。
auto cfg = _bus_instance.config();// バス設定用の構造体を取得します。
// SPIバスの設定
cfg.spi_host = SPI2_HOST; // 使用するSPIを選択 (VSPI_HOST or HSPI_HOST)
cfg.spi_mode = 0; // SPI通信モードを設定 (0 ~ 3)
cfg.freq_write = 40000000; // 送信時のSPIクロック(最大80MHz,80MHzを整数割値に丸め)
cfg.freq_read = 16000000; // 受信時のSPIクロック
cfg.spi_3wire = false; // 受信をMOSIピンで行う場合はtrueを設定
cfg.use_lock = true; // トランザクションロックを使用する場合はtrueを設定
cfg.dma_channel= 1; // 使用DMAチャンネル設定(1or2,0=disable)(0=DMA不使用)
cfg.pin_sclk = 14; // SPIのSCLKピン番号を設定 SCK
cfg.pin_mosi = 13; // SPIのMOSIピン番号を設定 SDI
cfg.pin_miso = 12; // SPIのMISOピン番号を設定 (-1 = disable) SDO
cfg.pin_dc = 2; // SPIのD/C ピン番号を設定 (-1 = disable) RS
// SDカードと共通のSPIバスを使う場合、MISOは省略せず必ず設定してください。
_bus_instance.config(cfg); // 設定値をバスに反映します。
_panel_instance.setBus(&_bus_instance);// バスをパネルにセットします。
}
{ // 表示パネル制御の設定を行います。
auto cfg = _panel_instance.config();// 表示パネル設定用の構造体を取得します。
cfg.pin_cs = 15; // CS が接続されているピン番号(-1 = disable)
cfg.pin_rst = -1; // RST が接続されているピン番号(-1 = disable)
cfg.pin_busy = -1; // BUSYが接続されているピン番号(-1 = disable)
cfg.memory_width = 240; // ドライバICがサポートしている最大の幅
cfg.memory_height = 320; // ドライバICがサポートしている最大の高さ
cfg.panel_width = 240; // 実際に表示可能な幅
cfg.panel_height = 320; // 実際に表示可能な高さ
cfg.offset_x = 0; // パネルのX方向オフセット量
cfg.offset_y = 0; // パネルのY方向オフセット量
cfg.offset_rotation = 0; // 回転方向の値のオフセット 07 (47は上下反転)
cfg.dummy_read_pixel= 8; // ピクセル読出し前のダミーリードのビット数
cfg.dummy_read_bits = 1; // ピクセル外のデータ読出し前のダミーリードのビット数
cfg.readable = true; // データ読出しが可能な場合 trueに設定
cfg.invert = false; // パネルの明暗が反転場合 trueに設定
cfg.rgb_order = false; // パネルの赤と青が入れ替わる場合 trueに設定 ok
cfg.dlen_16bit = false; // データ長16bit単位で送信するパネル trueに設定
cfg.bus_shared = false; // SDカードとバスを共有 trueに設定
_panel_instance.config(cfg);
}
{ // バックライト制御の設定を行います。(必要なければ削除)
auto cfg = _light_instance.config();// バックライト設定用の構造体を取得します。
cfg.pin_bl = 21; // バックライトが接続されているピン番号 BL
cfg.invert = false; // バックライトの輝度を反転させる場合 true
cfg.freq = 44100; // バックライトのPWM周波数
cfg.pwm_channel = 7; // 使用するPWMのチャンネル番号
_light_instance.config(cfg);
_panel_instance.setLight(&_light_instance);//バックライトをパネルにセットします。
}
{ // タッチスクリーン制御の設定を行います。(必要なければ削除)
auto cfg = _touch_instance.config();
cfg.x_min = 300; // タッチスクリーンから得られる最小のX値(生の値)
cfg.x_max = 3900; // タッチスクリーンから得られる最大のX値(生の値)
cfg.y_min = 200; // タッチスクリーンから得られる最小のY値(生の値)
cfg.y_max = 3700; // タッチスクリーンから得られる最大のY値(生の値)
cfg.pin_int = -1; // INTが接続されているピン番号, TP IRQ 36
cfg.bus_shared = false; // 画面と共通のバスを使用している場合 trueを設定
cfg.offset_rotation = 6; // 表示とタッチの向きのが一致しない場合の調整 0~7の値で設定
// SPI接続の場合
cfg.spi_host = VSPI_HOST;// 使用するSPIを選択 (HSPI_HOST or VSPI_HOST)
cfg.freq = 1000000; // SPIクロックを設定
cfg.pin_sclk = 25; // SCLKが接続されているピン番号, TP CLK
cfg.pin_mosi = 32; // MOSIが接続されているピン番号, TP DIN
cfg.pin_miso = 39; // MISOが接続されているピン番号, TP DOUT
cfg.pin_cs = 33; // CS が接続されているピン番号, TP CS
_touch_instance.config(cfg);
_panel_instance.setTouch(&_touch_instance); // タッチスクリーンをパネルにセットします。
}
setPanel(&_panel_instance);// 使用するパネルをセットします。
}
};
LGFX tft; // 準備したクラスのインスタンスを作成します。
//=====================================================================
  



Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.