lovyan03 / esp32_screenshotreceiver Goto Github PK
View Code? Open in Web Editor NEWESP32 ScreenShotReceiver. Send jpegs from your Windows PC to the ESP32 receiver.
License: MIT License
ESP32 ScreenShotReceiver. Send jpegs from your Windows PC to the ESP32 receiver.
License: MIT License
Are there any cross-platform ideas? I want to run it on Linux or Mac.
Hi, is it possible to use the sender software on Linux instead of windows?
I'm trying to run this code but I'm having some issues. I'm compiling the source code with the latest version of ESP32 Core (2.0.14) for Arduino and the latest version of LovyanGFX (1.1.12), when I send a screenshot, it does not reach render completely. It renders up to about 25% and then restarts rendering from scratch, that loop repeats 3 or 4 times and then the ESP32 crashes.
Log:
0 fps
0 fps
data request
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40089a14 PS : 0x00060f30 A0 : 0x800d3194 A1 : 0x3ffd2b50
A2 : 0x00000000 A3 : 0x3ffd2c2c A4 : 0x00000030 A5 : 0x00000000
A6 : 0x19252525 A7 : 0x22221919 A8 : 0x00000000 A9 : 0x80000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x80000020 A13 : 0x00000007
A14 : 0x00000005 A15 : 0x00000001 SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x40089a10 LEND : 0x40089a26 LCOUNT : 0x00000002
Backtrace: 0x40089a11:0x3ffd2b50 0x400d3191:0x3ffd2b60 0x40153865:0x3ffd2b80 0x400d420d:0x3ffd2bb0 0x400d427e:0x3ffd2c20
ELF file SHA256: e06386c8f8d5a86b
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
TCPReceiver setup.
display byte per pixel:3
color depth: 18
TCPReceiver setup done.
0 fps
data request
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40089a14 PS : 0x00060f30 A0 : 0x800d3194 A1 : 0x3ffd2b50
A2 : 0x00000000 A3 : 0x3ffd2c2c A4 : 0x00000030 A5 : 0x00000000
A6 : 0x19252525 A7 : 0x22221919 A8 : 0x00000000 A9 : 0x3ffd2af0
A10 : 0x3ffca4d8 A11 : 0x3ffca4d8 A12 : 0x3ffca4d8 A13 : 0x00060523
A14 : 0x00060520 A15 : 0x00000001 SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x40089a10 LEND : 0x40089a26 LCOUNT : 0x00000002
Backtrace: 0x40089a11:0x3ffd2b50 0x400d3191:0x3ffd2b60 0x40153865:0x3ffd2b80 0x400d420d:0x3ffd2bb0 0x400d427e:0x3ffd2c20
ELF file SHA256: e06386c8f8d5a86b
Rebooting...
Another test I did was to compile the firmware with the original versions of both the LovyanGFX library and the ESP32 Core from when the project was created:
Arduino 1.8.12
ESP32 Core 1.0.4
LovyanGFX 0.1.14
As a result, the display is not initialized but it sends the image and fps correctly. I have come to this conclusion based on the information in the log. The amount of FPS and the delay are displayed. Even so, random restarts of the ESP32 occur as in the first test.
Log:
58 fps / delay214
57 fps / delay238
58 fps / delay212
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d5550 PS : 0x00060630 A0 : 0x800d5624 A1 : 0x3ffb1b00
A2 : 0x00000000 A3 : 0x3ffc153c A4 : 0x0000044b A5 : 0x00000001
A6 : 0x00000020 A7 : 0x000000ea A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000003 A11 : 0x00060023 A12 : 0x00060021 A13 : 0x00000008
A14 : 0x00000004 A15 : 0x3ffc10a0 SAR : 0x0000001f EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008 LBEG : 0x40142ab6 LEND : 0x40142ac0 LCOUNT : 0x00000000
Backtrace: 0x400d5550:0x3ffb1b00 0x400d5621:0x3ffb1b20 0x400d1a55:0x3ffb1b40 0x40142a4f:0x3ffb1b60 0x400d48fd:0x3ffb1b90 0x400d5145:0x3ffb1bf0 0x400d42c5:0x3ffb1f50 0x400d7da5:0x3ffb1fb0 0x40088dc1:0x3ffb1fd0
Rebooting...
Hardware used:
LCD TFT 4" ILI9486 SPI (4 wires) 480x320 Display
DO IT ESP32 DevKit V1 Board
Any kind of help will be appreciated.
Thanks in advance.
Best regards.
Hello Lovyan03, it's been a few months since I've bothered you,
but I'm still working on the same project as before and was able to make it a lot better,
I want to know if you would like to have an early prototype of my AR goggles,
here's the PCB (i.g. link), and here's what the goggles video 1 [video 2] look like.
I will open-source once I'm sure they won't catch fire. :)
Let me know if you're interested. I will gladly make you a full kit.
Cheers,
Arnaud
Hello, I really love your project and decided to use it as a base for a simple A.R. project I'm working on.
I want to know if it's possible to use the C.S . pin to use two displays on one esp32 instead of using two esp32 with one diplay each ?
I tried defining the CS pin by myself by using #define TFT_CS -1 in tft e_SPI and defined the CS pin myself in the codes only output an error because "recv.setup(.." will not work with TFT_CS is undefined. I can post my codes if you want,
Thanks
Hi Just see your project and it's very very great looking. Congrats ! As on the lcd support, was all the st7789 lcd that was working with the eSpi lib are just gonna work and faster with your system ? Also, can we pick or foward an ip stream, like from an ip camera ?
thanks
Sorry, I dont have that board but I have an 38p wroom(same chip) and the exactly same display ST7789 1.3" (same display) Can you please make an TFT_ESPI version of this :(
// v1.0.0 を有効にします(v0からの移行期間の特別措置です。これを書かない場合は旧v0系で動作します。)
#define LGFX_USE_V1
#include <esp_wifi.h>
#include "src/TCPReceiver.h"
#include <LovyanGFX.hpp>
class LGFX : public lgfx::LGFX_Device
{
lgfx::Panel_ST7789 _panel_instance;
lgfx::Bus_Parallel8 _bus_instance;
lgfx::Touch_FT5x06 _touch_instance;
public:
// コンストラクタを作成し、ここで各種設定を行います。
// クラス名を変更した場合はコンストラクタも同じ名前を指定してください。
LGFX(void)
{
{ // バス制御の設定を行います。
auto cfg = _bus_instance.config(); // バス設定用の構造体を取得します。
// 8ビットパラレルバスの設定
cfg.i2s_port = I2S_NUM_0; // 使用するI2Sポートを選択 (0 or 1) (ESP32のI2S LCDモードを使用します)
cfg.freq_write = 20000000; // 送信クロック (最大20MHz, 80MHzを整数で割った値に丸められます)
cfg.pin_wr = 40; // WR を接続しているピン番号
cfg.pin_rd = 42; // RD を接続しているピン番号
cfg.pin_rs = 41; // RS(D/C)を接続しているピン番号
cfg.pin_d0 = 0; // D0を接続しているピン番号
cfg.pin_d1 = 1; // D1を接続しているピン番号
cfg.pin_d2 = 2; // D2を接続しているピン番号
cfg.pin_d3 = 3; // D3を接続しているピン番号
cfg.pin_d4 = 4; // D4を接続しているピン番号
cfg.pin_d5 = 5; // D5を接続しているピン番号
cfg.pin_d6 = 6; // D6を接続しているピン番号
cfg.pin_d7 = 7; // D7を接続しているピン番号
_bus_instance.config(cfg); // 設定値をバスに反映します。
_panel_instance.setBus(&_bus_instance); // バスをパネルにセットします。
}
{ // 表示パネル制御の設定を行います。
auto cfg = _panel_instance.config(); // 表示パネル設定用の構造体を取得します。
cfg.pin_cs = -1; // 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; // 回転方向の値のオフセット 0~7 (4~7は上下反転)
cfg.dummy_read_pixel = 8; // ピクセル読出し前のダミーリードのビット数
cfg.dummy_read_bits = 1; // ピクセル以外のデータ読出し前のダミーリードのビット数
cfg.readable = true; // データ読出しが可能な場合 trueに設定
cfg.invert = false; // パネルの明暗が反転してしまう場合 trueに設定
cfg.rgb_order = false; // パネルの赤と青が入れ替わってしまう場合 trueに設定
cfg.dlen_16bit = false; // データ長を16bit単位で送信するパネルの場合 trueに設定
cfg.bus_shared = true; // SDカードとバスを共有している場合 trueに設定(drawJpgFile等でバス制御を行います)
_panel_instance.config(cfg);
}
{ // タッチスクリーン制御の設定を行います。(必要なければ削除)
auto cfg = _touch_instance.config();
cfg.x_min = 0; // タッチスクリーンから得られる最小のX値(生の値)
cfg.x_max = 239; // タッチスクリーンから得られる最大のX値(生の値)
cfg.y_min = 0; // タッチスクリーンから得られる最小のY値(生の値)
cfg.y_max = 319; // タッチスクリーンから得られる最大のY値(生の値)
cfg.pin_int = -1; // INTが接続されているピン番号
cfg.bus_shared = false; // 画面と共通のバスを使用している場合 trueを設定
cfg.offset_rotation = 0;// 表示とタッチの向きのが一致しない場合の調整 0~7の値で設定
// I2C接続の場合
cfg.i2c_port = 0; // 使用するI2Cを選択 (0 or 1)
cfg.i2c_addr = 0x38; // I2Cデバイスアドレス番号
cfg.pin_sda = 8; // SDAが接続されているピン番号
cfg.pin_scl = 9; // SCLが接続されているピン番号
cfg.freq = 400000; // I2Cクロックを設定
_touch_instance.config(cfg);
_panel_instance.setTouch(&_touch_instance); // タッチスクリーンをパネルにセットします。
}
setPanel(&_panel_instance); // 使用するパネルをセットします。
}
};
static LGFX lcd;
static TCPReceiver recv;
void setup(void)
{
Serial.begin(115200);
Serial.flush();
lcd.begin();
//lcd.setColorDepth(24);
lcd.setRotation(0);
if (lcd.width() < lcd.height())
lcd.setRotation(1);
lcd.setFont(&fonts::Font2);
Serial.println("WiFi begin.");
lcd.println("WiFi begin.");
// 記憶しているAPへ接続試行
WiFi.mode(WIFI_MODE_STA);
WiFi.begin();
// 接続できるまで10秒待機
for (int i = 0; WiFi.status() != WL_CONNECTED && i < 100; i++) { delay(100); }
// 接続できない場合はSmartConfigを起動
// https://itunes.apple.com/app/id1071176700
// https://play.google.com/store/apps/details?id=com.cmmakerclub.iot.esptouch
if (WiFi.status() != WL_CONNECTED) {
Serial.print("SmartConfig start.");
lcd.println("SmartConfig start.");
WiFi.mode(WIFI_MODE_APSTA);
WiFi.beginSmartConfig();
while (WiFi.status() != WL_CONNECTED) {
delay(100);
}
WiFi.stopSmartConfig();
WiFi.mode(WIFI_MODE_STA);
}
Serial.println(String("IP:") + WiFi.localIP().toString());
lcd.println(WiFi.localIP().toString());
recv.setup( &lcd );
}
void loop(void)
{
recv.loop();
}
@lovyan03 Hi! How can I solve the color problem?
Hello, I've been trying to quite unsuccessfully to write my own version of the screenShotSender,
I can connect to the esp32, see that it is receiving some bytes, but I can't get the display to turn on. the serial message I get from the device is "Broken data" so that probably means the data isn't right,
My question is, how should I format the data? I'm sure I'm missing something, could you please direct me on how to format the image to be sent,
thanks,
Arnaud
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.