cribskip / TTGoCameraPlus_MQTT

TTGO Camera Plus as a digital MQTT doorbell
GNU General Public License v3.0
8 stars 4 forks source link

No image drawn on ST7789 #1

Open dfpreda opened 3 years ago

dfpreda commented 3 years ago

Hello! I really liked your peephole project and rushed to buy the ttgo board, but i can't seem to make it work. I succesfully flashed your code using arduino ide (wifi credential changed and uploaded right away) but it doesn't want do display the live feed on the 1.3 inch display (i only have the backlight on). The wifi part works and i can get still images using the http app.(no stream) Could i have a newer board version with different pinout (v2.1)? I bought it from the same seller you did and it looks exactly the same.

Any help would be really appreciated as i really want to finish this interesting project.

Thank you!

ElPolloDiabloGDC commented 3 years ago

Hy pred4nie,

download the latest version of TFT_eSPI (2.3.60)

then comment in TFT_eSPI/User_Setup_Select.h: #include <User_Setup.h>

and uncomment: #include <User_Setups/Setup44_TTGO_CameraPlus.h>

after that comment(or delete) in ESP_DoorCam.ino:

// Config for TFT_eSPI (User_Setup.h) #define ST7789_DRIVER // Full configuration option, define additional parameters below for this display #define TFT_CS 12 // Chip select control pin D8 #define TFT_DC 15 // Data Command control pin #define TFT_RST -1 // Reset pin (could connect to NodeMCU RST, see next line) #define TFT_BL 2 // LED back-light (only for ST7789 with backlight control pin) #define TFT_MISO 22 #define TFT_MOSI 19 #define TFT_SCLK 21 #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-. #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts #define SMOOTH_FONT #define SPI_FREQUENCY 80000000 #define SPI_READ_FREQUENCY 20000000 #define SPI_TOUCH_FREQUENCY 2500000 #define USE_HSPI_PORT

and

tft.setSwapBytes(true);

now it should run ;)

img

dfpreda commented 3 years ago

@ElPolloDiabloGDC Thank you! You're my hero! Never thought i'd see it work. Have you succeeded starting the web stream too? I'll try bodging together some code even though i don't understand most of the stuff, wish me luck

ElPolloDiabloGDC commented 3 years ago

you are welcome. yes web stream works too. u have to put in your wifi credentials at line 50, 51.

// WiFi Credentials const char* ssid = ""; const char* password = "";

if u open the serial monitor(@115200 baud) in the arduino app, u will get the cam ip.