benzino77 / tasmocompiler

Web GUI for custom Tasmota compilation
MIT License
510 stars 147 forks source link

Display Support #34

Closed Icefox2k closed 4 years ago

Icefox2k commented 4 years ago

The Checkbox in the GUI for Display Support takes no effect in the compiled Files

At this Time it is possible to define via custom Parameters - Maybe you can fix this easy

benzino77 commented 4 years ago

I can try. Can you describe what has to be added via custom parameters to make display work correctly? As I can see check box on Features step is adding #define USE_SPI to the final override file.

Icefox2k commented 4 years ago

No Problem okay #define USE_SPI is used for SPI Displays. For I2C Displays #define USE_I2C is required. But there are more options which has to be defined. I added full support for all available Displays from the Tasmota Wiki and have no problems on my Wemos D1 Mini. I think you could go with this things activated by the checkbox.

ifdef USE_SPI

undef USE_SPI

endif

define USE_SPI

ifdef USE_I2C

undef USE_I2C

endif

define USE_I2C

define USE_DISPLAY

define SHOW_SPLASH

define USE_AWATCH

define USE_GRAPH

define NUM_GRAPHS 4

define USE_TOUCH_BUTTONS

define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0

define USE_DISPLAY_LCD // [DisplayModel 1] [I2C] Enable Lcd display (I2C 0x27 and 0x3F)

define USE_DISPLAY_SSD1306 // [DisplayModel 2] [I2C] Enable SSD1306 Oled 128x64 display (I2C 0x3C and 0x3D)

define USE_DISPLAY_MATRIX // [DisplayModel 3] [I2C] Enable 8x8 Matrix display

define USE_DISPLAY_ILI9341 // [DisplayModel 4] [I2C] Enable ILI9341 Tft 480x320 display (+19k code)

define USE_DISPLAY_EPAPER_29 // [DisplayModel 5] [SPI] Enable e-paper 2.9 inch display (+19k code)

define USE_DISPLAY_EPAPER_42 // [DisplayModel 6] [SPI] Enable e-paper 4.2 inch display

define USE_DISPLAY_SH1106 // [DisplayModel 7] [I2C] Enable SH1106 Oled 128x64 display (I2C 0x3C and 0x3D)

define USE_DISPLAY_ILI9488 // [DisplayModel 8] [SPI] [I2cDriver38] (Touch)

define USE_DISPLAY_SSD1351 // [DisplayModel 9] [SPI] Enable OLED SSD1351 display

define USE_DISPLAY_RA8876 // [DisplayModel 10] [SPI] [I2cDriver39] (Touch)

define MTX_ADDRESS1 0x71 // [DisplayAddress1] I2C address of first 8x8 matrix module

define MTX_ADDRESS2 0x74 // [DisplayAddress2] I2C address of second 8x8 matrix module

define MTX_ADDRESS3 0x75 // [DisplayAddress3] I2C address of third 8x8 matrix module

define MTX_ADDRESS4 0x72 // [DisplayAddress4] I2C address of fourth 8x8 matrix module

define MTX_ADDRESS5 0x73 // [DisplayAddress5] I2C address of fifth 8x8 matrix module

define MTX_ADDRESS6 0x76 // [DisplayAddress6] I2C address of sixth 8x8 matrix module

define MTX_ADDRESS7 0x00 // [DisplayAddress7] I2C address of seventh 8x8 matrix module

define MTX_ADDRESS8 0x00 // [DisplayAddress8] I2C address of eigth 8x8 matrix module

benzino77 commented 4 years ago

Thanks! There was no need to bother you, because I could check this in my_user_config.h file by myself. Sorry for that. But nevertheless I will need to add some features to the code to address this case. I will try to handle this next week.

benzino77 commented 4 years ago

I'm almost there but it requires polishing. I will probably publish new version next week.

benzino77 commented 4 years ago

Can you tell me how do you use tasmocompiler: Gitpod, docker image, started locally?

Icefox2k commented 4 years ago

i used the online version with gitpod

benzino77 commented 4 years ago

Can you please check this branch on gitpod? https://gitpod.io/#https://github.com/benzino77/tasmocompiler/tree/pa/display-patch

There are some changes on features view (there is no SPI or I2C on the list - those features are included automatically). All you need to do is to check "display support" or "IO port expander" or any other feature. All needed functionality will be included. Additionally, if particular module has some parameters like I2C address, which can be changed by user, those settings will be prefilled in the text field of the next step: Custom Parameters.

Let me know if this works for you.

benzino77 commented 4 years ago

It is already merged to master branch. Docker images should be available in an hour.

martusi61 commented 4 months ago

I have the same problem, I need sensors and SSD1306 Oled at the same time, I compiled online with gitpod, I included the "display" features, but when I set "DisplayModel 2" from the Tasmota console of my WemosD1Mini, it doesn't consider it, so I can't use SSD1306! I also tried the above solution, but without positive result. Help me, please.

benzino77 commented 4 months ago

You probably need to read this: https://tasmota.github.io/docs/Universal-Display-Driver/ and this: https://github.com/arendst/Tasmota/releases/tag/v14.0.0 as from version v14 displays are handled by uDisplay driver.

martusi61 commented 4 months ago

Now everything is clearer to me, thanks to you, I haven't found any indications like yours on the internet. Thanks again, I'll do some testing, but I'm already sure I'll solve it.

martusi61 commented 4 months ago

I have read the migration steps, but I am not very good with ESP8266 code so I don't understand Step 4. Configure GPIOs, everything else seems ok to me.

benzino77 commented 4 months ago

Don't quote me on that, but I think you need to pick "unused" GPIO and set it to "Option A" with value "3". This is the picture I found here:

image

Look at GPIO 14 (D5). The value should be "3" instead of "2".

martusi61 commented 4 months ago

I don't know how to thank you, I'll try later.

martusi61 commented 4 months ago

It works! Thanks again dear