gemu2015 / Sonoff-Tasmota

Tasmota Fork TCS34725,PN532_i2,ccc1101 Moritz support,m5stack 4,7 epaper, hotplug drivers
GNU General Public License v3.0
24 stars 19 forks source link

Connection Display (SS1351 128x128 OLED Display) #9

Open chkbln opened 5 years ago

chkbln commented 5 years ago

Hello gemu2015 I would like to use the display (SS1351 128x128 OLED Display). How is the display connected? About 4-SPI or I2C? I2C SLC = GPIO 5 SDA = GPIO 4 Would that be correct?

How is the connection via 4-SPI? What must the necessary entries look like in my_user_config.h?

many Greetings

gemu2015 commented 5 years ago

hi chkbln,

the display is connected via 3 wire hardware spi. (you must set up the jumper on the display for 3 wire spi)

in user_config_overwrite specify #define USE_SSD1351

then in Tasmota config GPIO define

MOSI to SSPI_MOSI on GPIO13 SCLK to SSPI_SCLK on GPIO14 and CS to SSPI_CS on GPIO15

Gerhard

chkbln commented 5 years ago

Hello gemu2015 I have to specify the DisplayMode in the Tasmota Console. Which one would that be?

Unfortunately, they gave me the monochrome display in the store. That's why I have I2C and 4-SPI 4. Must now exchange the display once.

many Greetings

gemu2015 commented 5 years ago

ok, you must specify =>

define USE_SPI

define USE_DISPLAY

define USE_DISPLAY_SSD1351

undef USE_DISPLAY_MODES1TO5 // because i do not support modes 1-5

define SHOW_SPLASH // nice to see when display comes up

Am 01.07.2019 um 22:00 schrieb chkbln <notifications@github.com mailto:notifications@github.com>:

Hello gemu2015 I have to specify the DisplayMode in the Tasmota Console. Which one would that be?

Unfortunately, they gave me the monochrome display in the store. That's why I have I2C and 4-SPI 4. Must now exchange the display once.

many Greetings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gemu2015/Sonoff-Tasmota/issues/9?email_source=notifications&email_token=ACY3QY2RR2TMJSQJLENXRU3P5JO5BA5CNFSM4H4VDES2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY7F5PQ#issuecomment-507403966, or mute the thread https://github.com/notifications/unsubscribe-auth/ACY3QY3RYNH2EECPPPGDBN3P5JO5BANCNFSM4H4VDESQ.

chkbln commented 5 years ago

Hi, unfortunately my display stays dark. Do you have any idea how to find the mistake? Unfortunately, SHOW_SPLASH is not displayed. greeting

gemu2015 commented 5 years ago

Hardware: ssd1351module => ESP

GND => GND VCC => 3,3 V (5 Volt will damage the display) DIN => MOSI (GPIO13) CLK => SCLK (GPIO14) CS => SPI_CS (GPIO15) DC => GND RST => 3,3 V

jumper BS on the display soldered to "1" (is at "0" at delivery)

Tasmota GPIO selector (note must set to SSPI not SPI, because software spi may be a later option) GPIO13 => SSPI_MOSI GPIO14 => SSPI_SCLK GPIO15 => SSPI_CS

in Tasmota console check displaymodel , should show 9 displayrotate should show 0 then enter displaydimmer 100

you should see "SSD1351" centered on the screen

greeting

chkbln commented 5 years ago

Hi, Now I have SSD1351 on the display lights up. Supi When compiling with the Arduino IDE I got the following error message. grafik

I then commented out the entry. What effects does this have or how can I get rid of the error?

grafik

How do I get values, e.g. Temperature displayed on the display. Does it work like the e-paper? You had once published a Word document.

many Greetings

gemu2015 commented 5 years ago

ok, this include was actually not needed, i removed it. (otherwise it had to be uppercase )

my drivers do only support display mode 0.

you have to display data with the cmd "displaytext"

you may either do this remotedly with home automation or with rules or easier with scripter. see scripter.md for doc and examples

to enable scripter:

undef USE_RULES

define USE_SCRIPT

in the WEBUI config menu you find an entry "edit script" there you can enter scripts

here is an example:

; define variables >D temp=0 hum=0

; called during boot >B ; clr screen =>displaytext [z]

; called during telemetry >T ; catch sensor values temp=BME280#Temperature hum=BME280#Humidity

;print values to console for debugging =>print %temp% : %hum%

; called every second >S ; now print to display ; print at position x=0,y=20 with index color 2 (red) and font 1 (epd font 12) =>displaytext [x0y20Ci2f1] Temperature=%temp% ; print with index color 3 (green) at y pos 60 =>displaytext [x0y60Ci3] Humidity=%hum%

for detailed explanation of displaytext see displaytext.md

remarks on OLED displays:
oled display modules have an expected lifetime of about 10000 hours (416 days) which means they should not be on permanently. you may use a proximity sensor to turn the display on and off. dimming the display will also expand the lifetime. (dimming to 50% expands the lifetime to about 25000 hours)

so best to dim as low as possible with e.g. displaydimmer 50

have fun

chkbln commented 5 years ago

Hi

I wanted to recompile the sketch today to try scripter. Unfortunately, I get the following error messages.

xdrv_10_scripter: 2979: 62: error: 'FAT_TIME' was not declared in this scope 'FAT_DATE' was not declared in this scope

Is the error in the xdrv_10_scripter.ino? many Greetings

chkbln commented 5 years ago

When I comment out this line, the compilation runs through

//#define USE_SCRIPT_FATFS 4