Hello everyone. The pinout is correct. only instead of 3.3v I have 5v. but this is not critical. I’ll wait a long time for this connector, so I took the oscilloscope apart and soldered to the board). CPU2102 is working correctly. But for me, usb is not suitable for work for many reasons. therefore, to take screenshots, I connected esp32. RX TX GND and 5V. Who is interested in the program for screenshots on wifi.#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>
extern "C" {
#include "libb64/cencode.h"
}
const char *ssid = "Tek";
const char *password = "12345678";
WiFiServer server(80);
String inputString = "";
boolean stringComplete = false;
void setup() {
Serial.begin(38400);
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
server.begin();
}
void loop() {
serialEvent();
WiFiClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
client.println("<html>");
client.println(" <body>");
if (stringComplete) {
client.print(" <img src=\"data:image/png;base64,");
client.print(base64_encode_utf((uint8_t*)&inputString[0], inputString.length()));
client.println("\" alt=\"\" />");
inputString = "";
stringComplete = false;
}
client.println(" <p>Tektronix tds3000 snapshot</p>");
client.println(" </body>");
client.println("</html>");
break;
}
}
client.stop();
}
}
String base64_encode_utf(uint8_t * data, size_t length)
{
size_t size = base64_encode_expected_len(length) + 1;
char * buffer = (char *) malloc(size);
if(buffer) {
base64_encodestate _state;
base64_init_encodestate(&_state);
int len = base64_encode_block((const char *) &data[0], length, &buffer[0], &_state);
len = base64_encode_blockend((buffer + len), &_state);
String base64 = String(buffer);
free(buffer);
return base64;
}
return String("-FAIL-");
}
void serialEvent() {
while (Serial.available()) {
char inChar = (char)Serial.read();
inputString += inChar;
if (inChar == '\n') {
stringComplete = true;
}
}
}
set the speed on the device to 38400, instead of printing to the printer, select printing to the serial port. press the print button, the data will go to esp32, and when connected from the browser the picture will fly there. generally interesting idea for the weekend)