Giter VIP home page Giter VIP logo

Comments (18)

lovyan03 avatar lovyan03 commented on August 16, 2024 1

Hello, Thank you for your message.
I am not currently using TFT_eSPI for this project. Instead, I am using LovyanGFX.
LovyanGFX is capable of handling multiple panels. First make sure that you can use multiple panels with LovyanGFX.
If you can do that, you will be able to work with multiple panels in this project as well.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

@a-RN-au-D
I have updated the "unstable" branches of both LovyanGFX and ESP32_ScreenShotReceiver.
You can use "#include<TCPReceiverDual.h>" to include A single ESP32 can draw a screen for two panels, VSPI and HSPI.
The usage is " recv.setup( &lcd , &lcdB ); "

Please give it a try.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

Hello, Dimision.
Speeds will be slowed down by WiFi congestion. If there are many access points in the vicinity, the situation will be tougher.
The ESP32 can't handle jumbo frames, so the JPEG data will be in a single packet of UDP. It does not fit. Therefore, packet loss and variation in the order of arrival can cause rendering errors.
This project was created using UDP at first, but due to high packet loss, it could not display a stable picture. The problem with TCP was that it was not able to display a stable picture, so we changed to TCP. I am not going to try UDP as it has been resolved.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

I've already tried it.
You can try. You probably won't get any speed.

By the way, here's an Issue on multi-panels that a-RN-au-D set up.
If you want to continue with more irrelevant replies, please make a new Issue.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

@a-RN-au-D
I'm Sorry.
I updated my local branch but didn't update github.
I just added TCPReceiverDual.h to the unstable branch.
Please try it out and see.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

@a-RN-au-D
The WiFiServer class has an initial parameter of "max_clients=4" , so it may be able to maintain a connection with multiple clients, but I don't know if it can communicate with more than one client at a time.
image
I think it's a good thing you're trying, but I don't want to complicate the communication part, so I recommend splitting a single JPEG image in two.

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024 1

I added "TCPReceiverDual.h" in unstable branch.
Two LCDs are passed to one TCP receiver to make it work.
The usage is " recv.setup( &lcd , &lcdB ); "

https://github.com/lovyan03/ESP32_ScreenShotReceiver/blob/unstable/ScreenShotReceiver/src/TCPReceiverDual.h

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024 1

Yet another update in my adventure, It worked!! your TCPReceiverDual.h did the job. The reason why it wouldn't work was because I only downloaded only the "TCPReceiverDual.h" files instead of all of them. After doing so, the display worked out of the box. There's is a small issue when passing the screen definition here " recv.setup( &lcd, &lcdB);", when I switched the panel order in this way " recv.setup( &lcdB,&lcd);", it would render one of the display unusable.
But now everything works, I'm going to add a gyroscope and see if I can complete my cheap smart glasses,
Thanks again 👍 +1

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

Thanks for your quick answer, I have tried to setup your GFX library but couldn't get the 1_simple_use to work with my esp32 board "Lolin esp32 lite". The display I'm using is based on the ST7789 chip, so I have defined "#define LGFX_LOLIN_D32 // LoLin D32 Pro" as mcu but my display stays dark
Here is my pin setup

#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS 5 // Chip select control pin
#define TFT_CS_A -1 // Chip select control pin
#define TFT_CS_B -1 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to RST pin)
#define TFT_BL 32 //

is there a way for me to manually set this in the code?
Thanks

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

Please ignore my previous post, I was able to run your GFX library by defining ESP-WROVER-KIT instead of LoLin D32 Pro,
it was clearly written in your readme too, Sorry I definitively did not catch that,
ST7789 (TTGO T-Watch, DSTIKE D-duino-32 XS, ESP-WROVER-KIT)"
Now I'll try to see it I can run the multi displays like I have in mind, I'll post my codes once I get it working,
Thanks again

from esp32_screenshotreceiver.

lovyan03 avatar lovyan03 commented on August 16, 2024

Also see this for ESP-WROVER-KIT. You probably shouldn't choose it.
lovyan03/LovyanGFX#25 (comment)

I have added English comments to "examples/HowToUse/2_spi_setting" of the unstable branch. Please take a look at it here.
https://github.com/lovyan03/LovyanGFX/blob/unstable/examples/HowToUse/2_spi_setting/2_spi_setting.ino

And for LovyanGFX questions, please visit the LovyanGFX Issue Board.

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

I tried configuring my own esp32, but still can't use multiple displays,
I will close this thread and reopen it in the LovyanGFX if I still can't figure it out,
Thanks for your help +1

from esp32_screenshotreceiver.

Dimision avatar Dimision commented on August 16, 2024

That's really a great project.
If we use this system for streaming videos, Is it necessary to use UDP protocol instead of TCP protocol to optimise the latency of network transmission? In my case, I use the 1.3" 240x240 ST7789 panel which has 3-wire SPI bus and works at 40MHz, the serial monitor shows the latency is floating between around 10~300(Quality=60), and I'm not sure it caused by network transmitting or JPG decoding.

from esp32_screenshotreceiver.

Dimision avatar Dimision commented on August 16, 2024

Hi Lovyan, thanks for your patient replying.
UDP protocol seems to be a dead end, but I realized the jpgRead function seems try to separate the TCP package into pieces and receive them, I got some ESP32 modules few days ago which integrated 8MB pSRAM, maybe we can use these babies to buffering whole TCP package instead of receiving it piece by piece?

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

Hello Lovyan03, I think I made some progress with the dual displays but I still get stuck at feeding the data to both at the same time but I think I may have zeroed out on what may be causing me the problems.
my current dual arduino screenviewer setup: https://pastebin.com/QyACsJzc
First thing I did was to duplicate the "TCPReceiver.h" into "TCPReceiverB.h" and included it in my codes like this : >> my second tcpreceiver file: https://pastebin.com/8raVGsqm
#include "src/TCPReceiver.h" #include "src/TCPReceiverB.h"

This is my TCPReceiverB settings:
` LovyanGFX* _lcdB;

uint16_t* _dmabufs[2];
uint16_t* _dmabuf;
WiFiServer _tcpB;
WiFiClient _client;
TJpgD _jdec;
int32_t _recv_remainB = 0;
uint32_t _sec = 0;
int32_t _lcd_widthB;
int32_t _lcd_heightB;
int32_t _out_width;
int32_t _out_height;
int32_t _off_x;
int32_t _off_y;
int32_t _jpg_x;
int32_t _jpg_y;
uint32_t _drawCount = 0;
uint32_t _delayCount = 0;
uint32_t _rowskip = 2;
uint8_t _tcpBuf[TCP_BUF_LEN];
bool _recv_requested = false;
then I can use this settings in void setup() and void loop(); setup: recv.setupA( &lcd ); //DISPLAY RIGHT
recvB.setupB( &lcdB ); //DISPLAY LEFT`
loop:
recv.loopA(); // //DISPLAY RIGHT
recvB.loopB(); // //DISPLAY LEFT


The settings above work and allow me to turn on either right and left display and get the video stream in them. One trick I have learned is that by setting two columns and duplicating the ip, in ScreenShotSender, it actually divides the image perfectly.

now if I put "recv.setupA( &lcd );" above " recv.setupB( &lcdB );" recv.loopA() will be the only one getting a data feed not the other one, if I do the inverse and put " recv.setupB( &lcdB );" above, then recv.loopA() will be the one getting the data feed.

The interesting thing is that with the ScreenShotSender set up with 2 columns, when either display are working, they are displaying the right side of the image. Now it gave me an idea, maybe by closing the client at the end of the loop in both TCPReceiver will do the job but it had no real effects, I would still get the feed but not on both.

So my question is, would it be possible to have two clients running at the same time and getting a feed from the same port: 63333, I will still try to crack it but maybe you will see a path I'm not seeing,
Cheers :)

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

Thanks a lot for your quick answer again, I'm not too good at coding but I'm good at finding solutions,
could you give me some indications on where to look to split the jpgs?

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

That is so awesome!! I Will give it a run now and report the issues I get, 👍 +1

from esp32_screenshotreceiver.

neofuturism avatar neofuturism commented on August 16, 2024

I just did a test to the receiveDual code and this is the output. I believe it doesn't pick up the display size anymore.
here are the pictures: https://imgur.com/a/w8KRdD1, It similar to when the display config isn't correct

from esp32_screenshotreceiver.

Related Issues (11)

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.