esp32 wroom and camera ov7670

Gaston1980
Posts: 18
Joined: Sun Oct 06, 2024 10:26 am

esp32 wroom and camera ov7670

Postby Gaston1980 » Tue Oct 22, 2024 4:03 pm

Finally I was able to get the frames but I'm trying to send those values to uart. Im checking this code from here https://github.com/bitluni/ESP32CameraI ... Camera.ino

Code: Select all

void displayY8(unsigned char * frame, int xres, int yres)
{
  tft.setAddrWindow(0, 0, yres - 1, xres - 1);
  int i = 0;
  for(int x = 0; x < xres; x++)
    for(int y = 0; y < yres; y++)
    {
      i = y * xres + x;
      unsigned char c = frame[i];
      unsigned short r = c >> 3;
      unsigned short g = c >> 2;
      unsigned short b = c >> 3;
      tft.pushColor(r << 11 | g << 5 | b);
    }  
}
why i takes those values? I though that each byte inside the frame contains pixel data.
I'm trying to get a 320x240 frame with esp32 generating a 8Mhz clock. Right now I'm trying to get the test BAR from the camera (reg 7 - 17 - 71) but got nothing
the data is arrange in this way SM_0A0B_0C0D.

How can I send this c value through uart if uart_write_bytes takes a pointer?
Regards
Gastón

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 73 guests