Peter Wentworth
Peter Wentworth
  • 5
  • 2 649
YetAnotherCamToLCD
Project streams 25 frames per second 320x240xRGB565 data from OV7670 camera to LCD screen. ESP32 coordinates activity, and can read a snapshot image from the LCD framebuffer and send it over serial link to a PC.
มุมมอง: 531

วีดีโอ

ESP32 WRover Kit: LCD and OV7670 camera conflictESP32 WRover Kit: LCD and OV7670 camera conflict
ESP32 WRover Kit: LCD and OV7670 camera conflict
มุมมอง 6416 ปีที่แล้ว
ESP32 WRover Kit has a socket for plugging in a camera, but the GPIO pin assignments conflict with the built-in LCD screen. So plugging in the camera kills the LCD. Here I explore a relatively unknown feature of the camera that allows us to put it to sleep, and tri-state some lines. Then the LCD works. Putting the camera to sleep via a hardware pin worked, but I wasn't able to do "software slee...
ESP32 fast data rate to TFT LCDESP32 fast data rate to TFT LCD
ESP32 fast data rate to TFT LCD
มุมมอง 1.3K6 ปีที่แล้ว
Shows how to get an ESP32 to drive 320x240x16-bit display really fast, in excess of 40 full frames per second. You can find the code at 7-fountains.com Follow the link to the free stuff.
20160927 V2 Sierpinski20160927 V2 Sierpinski
20160927 V2 Sierpinski
มุมมอง 298 ปีที่แล้ว
Rebuilt the machine (low slung GTX version, closer to the work, hoped to improve backlash and inaccuracy), improved the Sierpinski algorithm (it never lifts the tool on the triangles), bought a narrower carving bit (improved resolution). But the problems and play are still very obvious! There is clearly more force on the cutting bit than I imagined. And my drive belts are mounted on what now ap...
The first cut on my CNC machineThe first cut on my CNC machine
The first cut on my CNC machine
มุมมอง 1058 ปีที่แล้ว
My home-built CNC machine does its first cut. I didn't have plans that I worked to, and it has become obvious that there is too much play to keep the spindle steady when it changes direction. But my idea was get it to the point that it can start cutting its own "second design generation" of improved plates.

ความคิดเห็น

  • @walterhynson2898
    @walterhynson2898 2 ปีที่แล้ว

    So the whole thing is a scam or do I just buy another boare with built in camera and run the data from one to the other

  • @Ahmadnaweed786
    @Ahmadnaweed786 3 ปีที่แล้ว

    Well done

  • @pascalgorisse5005
    @pascalgorisse5005 4 ปีที่แล้ว

    Nice to ear your about that I would like to know in addition if we can use pins of this board (in fact it seems that this board is not expandable for other usage as to light up a led as there is no available pins: We then cannot use this board !):

    • @peterwentworth8993
      @peterwentworth8993 4 ปีที่แล้ว

      Plenty of pins can be used for whatever you like. All those IO pins on the left of the picture, and the camera pins too if you do not have a camera plugged in and the screen is not using the line.

    • @walterhynson2898
      @walterhynson2898 2 ปีที่แล้ว

      @@peterwentworth8993 so we need to use alternative pins for the camera. Are they available or is there a SPI or I2C camera?

  • @jedandecko5585
    @jedandecko5585 5 ปีที่แล้ว

    Hi, great stuff, thanks for sharing :) One question, can this code be adapted to read data from SD card and then show it to screen in same speed aka 25fps?

    • @peterwentworth8993
      @peterwentworth8993 5 ปีที่แล้ว

      I've not tried it, but I think it unlikely. In this project most of the heavy lifting for the incoming video data is done behind my back by the I2C / DMA hardware 8 bits at a time, in parallel, which means we have buit-in hardware support to handle high-speed inbound camera data. Your data is likely to be a movie or something. The Iinput from the SD card is likely serial, and the video data is heavily compressed by CODECs (coder/decoder). If you don't do this compression the movie will be huge on the SD card, and you won't have the bandwidth to load 25fps.) So the big challenge is to write the movie decompressor that can read the SD card and produce frames to display. There are hardware chips for decompressing some formats, but not built into the ESP32. So I doubt you'll have nearly enough processing firepower to input the coded video data, decompress it, and display it at any kind of decent framerate. Please someone, let me know if I am wrong!

    • @jedandecko5585
      @jedandecko5585 5 ปีที่แล้ว

      I get the point, my intention was to store image files in .h or .c format and by changing them create illusion of animation, 25 fps is just for making it smooth. Basicly it can be 4-5 img per second. That is too much for esp memory but it is small for any SD card. I tried TFT_eSPI but got tearing when I clear screen. Also I dont know c/c++ , know how to use loops etc, basic simple stuff.. That is way I asked you for help. Understand a concept but cant reproduce it :)

    • @peterwentworth8993
      @peterwentworth8993 5 ปีที่แล้ว

      @@jedandecko5585 OK, my screen is not SPI, it is the older parallel one (can be faster, but uses up many more ESP32 pins, and doesn't make use of built-in hardware SPI support in the ESP32). So this technique is not going to drive your screen.

    • @jedandecko5585
      @jedandecko5585 5 ปีที่แล้ว

      Ok, thanks for your time.

  • @DavidtheSwarfer
    @DavidtheSwarfer 6 ปีที่แล้ว

    hi Pete, so is the camera output natively compatible with the LCD input or have you had to put glue code in the camera?

    • @peterwentworth8993
      @peterwentworth8993 6 ปีที่แล้ว

      Hi David - both camera and LCD have setup registers supporting RGB565 format (two-bytes-per-pixel) format. (Both camera and LCD can also do other formats, but the RGB565 is the common one I use.) The camera also has some settings to swap the order of the bytes, swap the RED and BLUE channels in the RGB encoding, I think it can swap order of bits within the byte, it can invert the colours, suppress the pixel clock when there are no pixels, change the drive strength on the pins, invert its timing signals, etc. etc. And it has Auto Exposure, White Balance, gamma correction options, etc. So lots of generality, but badly documented. And the LCD has general ways about how to place the incoming pixels into the frame buffer (top-to-bottom, left-to-right, and so on). So no glue code required other than getting the options set up right in the first place (most of that work I inherited from predecessor projects). The pixel data itself does not come through the ESP32 for any processing.

  • @peterwentworth8993
    @peterwentworth8993 6 ปีที่แล้ว

    Code and writeup at github.com/cspwcspw/ESP32_YetAnotherCamToLCD

  • @DavidtheSwarfer
    @DavidtheSwarfer 6 ปีที่แล้ว

    nice one Pete

  • @SiR0CX0
    @SiR0CX0 6 ปีที่แล้ว

    Very impressive results. Even 3x times faster than the Teensy library written by Paul Stoffregen two years ago. Electrodacus made some nice improvements too last year for the STM32 MCUs. Thanks for this great how-to very well explained. I'm not sure I understood it all yet though. May I ask why did you go for bitbanging instead of using the SPI bus ? Did you benchmark the Core0 CPU load while sending the data to the screen ?

    • @peterwentworth8993
      @peterwentworth8993 6 ปีที่แล้ว

      Thanks. My cheaper LCD device has an 8-bit parallel bus, no serial SPI. So that brings the advantage of more wires to move data faster. If you look on the Adafruit web page their original LCD was parallel, then they discontinued that one in favour of a Serial SPI version which they admit is a bit slower. So it is a tradeoff: I need more pins and wires than I would for SPI, but I can get better throughput if I can write all 8 bits at the same time. I didn't look at the CPU usage.