LiveOV7670 project now supports Arduino Mega

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • This is another follow-up to "Arduino OV7670 live image to screen" video. I added Arduino Mega 2560 support for the LliveOV7670 project. Some PINs needed to be re-arranged.
    LiveOV7670 project (Arduino):
    github.com/ind...
    Buy from AliExpress.com:
    OV7670: s.click.aliexp...
    Mega clone: s.click.aliexpr...
    1.8" Display: s.click.aliexp...
    Breadboard: s.click.aliexpr...
    Jumper Wires: s.click.aliexpr...
    Disclosure: Bear in mind that some of the links in this post are affiliate links and if you go through them to make a purchase I will earn a commission. Keep in mind that I link these companies and their products because of their quality and not because of the commission I receive from your purchases. The decision is yours, and whether or not you decide to buy something is completely up to you.
    Music from RUclips audio library.

Комментарии • 73

  • @jojionigiri
    @jojionigiri 5 лет назад +4

    I want to save the output to SD Card can you pls provide some Arduino IDE codes for me pls i need for my school project thank you

    • @himanshujahagirdar6261
      @himanshujahagirdar6261 4 года назад +1

      Hey, did you manage to achieve this? I am trying to do the same, can you help me with some resources

  • @iamNaddy_
    @iamNaddy_ 2 месяца назад

    So the code used for uno can also be used for mega? Do I have to modify anything on the given code you provided on github? Or can just upload right away to the arduino mega board??

  • @s.kenurshan3182
    @s.kenurshan3182 4 года назад +1

    I am doing a project based on "if thermal sensor (hw-691) detect the body temperature, camera (ov7670) capture the image and send to storage using Arduino mega board" can u tell the code for it? And wire connection diagram?

  • @quiksilver409
    @quiksilver409 5 лет назад +2

    Hello! Do you have any ideas or advice on getting this project to work on a 3.5" TFT Display opposed to the 1.8"? Any feedback would be great, thanks!

  • @dipty6667
    @dipty6667 3 года назад +1

    Hey Indrek, I have connected OV 7670 properly to the arduino uno but only white screen comes on the tft screen, please help me

    • @IndrekL
      @IndrekL  3 года назад

      Hey! This means that there is something wrong with the screen connections. Did you short the J1 on the back of the screen?

    • @dipty6667
      @dipty6667 3 года назад

      @@IndrekL thanks, but I have that orange 2.4inch tft screen which has a shield that sits perfectly on top of arduino uno

  • @yannsimo7025
    @yannsimo7025 Год назад

    Hey Indrek! Thank you for the project. Is there a possibility to include the code to activate the camera in an "if" loop?

  • @przemek2775
    @przemek2775 Год назад

    Hello @Indrek! I'm using Arduino mega and is it possible to change 2st, 9st and 12st pins to another from 14-21 and 29-53? It's necessary for me because i gonna place TFT display shield on this board and these pins will be used

  • @aminekidane5757
    @aminekidane5757 4 года назад

    okay thanks for the tutorial given... But if possible can we save the image taken from the camera to an SDcard

    • @IndrekL
      @IndrekL  4 года назад

      It can but you have to use a camera with FIFO to do that. Writing to SD card is slow and Arduino doesn't have enough memory to buffer the image while it is saving to the SD card.

  • @toddlundberg5498
    @toddlundberg5498 5 лет назад +1

    Hey Indrek, I am trying to use a servo motor to move the camera in my project and I am wondering if there is a way I can add code to the one you provide on github to allow other components.

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад

      I was actually able to get it working on my own by putting my code in the ExampleTftBufferedCameraFrame tab in the sections you labeled as setup and loop. It seems to work okay!

    • @IndrekL
      @IndrekL  5 лет назад +1

      Yes, if you use Arduino Mega then you have plenty of pins for other modules. You can add the code in the main loop. But you should not add any delays. The added code should execute as fast as possible. If it takes too long you may skip a frame.

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад +1

      @@IndrekL I am almost finished with my project and I just wanted to thank you for videos and all of the feedback you gave me. I seriously could not have done it without you. Thank you for everything!

    • @IndrekL
      @IndrekL  5 лет назад +1

      @@toddlundberg5498 You are welcome!
      Did you get the back light issue resolved?

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад

      @@IndrekL I was able to get everything for my project working great on the bread board but just today I hooked things up permanently and it is no longer working. I'm not sure what the issue is. I used a multi meter to double check all of my connections and they all are connected correctly, but the screen wont flash red or green it just stays black. Do you know why it might do that?

  • @dashamjot6240
    @dashamjot6240 4 года назад

    In which folder did u initialized the pinouts of the camera??

    • @IndrekL
      @IndrekL  4 года назад

      All the used pins are defined in the CameraOV7670.h:
      github.com/indrekluuk/LiveOV7670/blob/master/src/lib/LiveOV7670Library/CameraOV7670.h
      I read the ports directly. For example to read VSYNC from PIN 2 I do this:
      PIND & 0b00000100
      It is much faster thant digitalRead(2);

  • @aminekidane5757
    @aminekidane5757 4 года назад

    Thanks again...I like your tutorials and helped me have live images for the "Mega." But can you help me how can I send an image via MMS using GPRS sim900. Because I'm really troubling here!!!

    • @IndrekL
      @IndrekL  4 года назад

      I haven't done any wireless experimentations yet. In the future, I plan to do it, but I haven't had time for it yet.

  • @toddlundberg5498
    @toddlundberg5498 5 лет назад +1

    Hello, I was wondering if the code you provide on github can still be used as is with the mega. If not, what do I need to change?
    Thank you!

    • @IndrekL
      @IndrekL  5 лет назад +1

      Hey! You don't have to change the code but you have to use different PINs when connecting camera to Mega.
      On the project's Github page there is a section named "Connections for Arduino Mega". For example camera's XCLCK is connected to PIN 9 on Mega (it's PIN 3 for Uno).

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад

      @@IndrekL Dude you are the best thanks so much!! I have one more question if you can help. I am trying to make a security camera for my front door and I want to use a button to turn the camera/display on and off while keeping the arduino running. Where in your code do you think I could add this? Do you know what command I should use? Hope this made sense. Thanks again!

    • @IndrekL
      @IndrekL  5 лет назад +1

      Maybe it would be enough for you if you just switched off the back light of the screen? Then you could just add a switch to the screen's LED pin and you don't have to change Arduino code at all.

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад

      @@IndrekL Yes I think that would work, great idea! Thanks again, I really appreciate it.

    • @toddlundberg5498
      @toddlundberg5498 5 лет назад

      @@IndrekL Hi, I have one more question I was hoping you could help answer. I was able to get a live image to display on the screen successfully, but it is extremely dim. Do you know what could cause this? I was thinking maybe a thicker wire for the 3v3 volt and ground but I don't know if that will do anything. I am currently using 24 gauge wire for all connections. Thanks again for all of your help!

  • @lachiestewart3013
    @lachiestewart3013 5 лет назад +1

    Great video

  • @christophertercero
    @christophertercero 5 лет назад

    hi i’ve download your zip ov7670 but my arduino IDE cannot read any library who’s in there. could you help me?

    • @IndrekL
      @IndrekL  5 лет назад

      You have to copy the content of "lib" folder to Arduino's "libraries" folder. On Window it should be
      C:\Users\\Documents\Arduino\libraries

    • @christophertercero
      @christophertercero 5 лет назад

      Indrek ok thx i’ll try and let you know

  • @denniskamala3516
    @denniskamala3516 5 лет назад

    @indrek what can i do in your code in github because I am using 2.4 spi TFT module with 240x320

    • @IndrekL
      @IndrekL  5 лет назад

      You should switch out the currently used TFT library with correct one for your screen. It would take some experimentation to get it working.

  • @sabuta100
    @sabuta100 5 лет назад

    Hi @Indrek!
    Should it be possible to change camera data ports in mega? I'm using 22-29 for TFT ili9341data ports (parallel-8b). I tried changing it from your OV7670 library by setting PINC besides PINA but it didn't work (decided to change camera ports because it was easier to find those declarations), however I managed myself to get the green screen.
    Hope you could help me.
    Thanks in advance.
    PD: I'm trying the buffered camera example.

    • @IndrekL
      @IndrekL  5 лет назад

      Hey! Yes, if pins on port C aren't used for anything else then you should be able to just replace "b=PINA;" with "b=PINC ;" in "CameraOV7670.h"
      Green screen means that the xclock signal is working (PIN 9 on Mega). Does the screen stay green forever? If yes, then you should try to check if VSYNC (PIN 2) and pixel clock (PIN 12) are working. If you have an oscilloscope available then the easiest would be to check if you see any pulses on those pins.

    • @sabuta100
      @sabuta100 5 лет назад

      @@IndrekL It goes green for about 3 or 4 seconds, after that it turns black but I've just realized what the problem should be. My TFT seems not to have SCLK and SDA ports ans since they are not connected I do not receive any signal to be displayed on the TFT. Should I open an issue at your github repo so then you could help me by taking a look at the images that comes with the datasheet?
      Well, TFT actually has the SCLK and SDA but I'm wondering if they're just for specific purpose because they might work just with the TFT SD card slot.
      I think VSYNC is workin properly, but I'll try to check it with the oscilloscope tomorrow at school.
      Thanks for aswering. ^^

    • @IndrekL
      @IndrekL  5 лет назад

      If the screen turns black after green then the VSYNC and Pixel clock probably do work since it would stay green if it didn't receive those signals.
      Since you are using parallel connection to the screen you probably do not need SCLK and SDA. Those a probably for SPI or for the SD card reader as you suggested.
      Yes, you can open an issue in the github. Then you can upload pictures of what you are seeing. Is the image completely black or do you see some noise also?

    • @sabuta100
      @sabuta100 5 лет назад

      @@IndrekL With the TFT it's filled all black, not even receiving some pixels. In a few hours I'll have access to an oscilloscope to check out the signals.
      I also gave a try to your UART example with an original Arduino Uno and got images from the ov7670 already but they're noisy, also I discovered that it only works at 1M, couldn't get anything with the other options, not even the red or green screen or something else.

    • @IndrekL
      @IndrekL  5 лет назад

      If you want to try lower baud rates you also have to change the Arduino code. You have to change the "#define UART_MODE 2" to another value in ExampleUart.cpp to use different baud rates.

  • @SlavVjache
    @SlavVjache 5 лет назад +1

    good !

  • @IlMagodelComputer670
    @IlMagodelComputer670 5 лет назад

    Hello Indrek, I'm having troubles with connecting OV7670 with the Arduino Mega. I've perfectly hooked up all the connections but the TFT disply always gives me red screen. I've also tried using Arduino UNO and it works on that... Are you able to help me? Thanks

    • @IndrekL
      @IndrekL  5 лет назад

      Did you connect it to mega like this (some PINs are different from Uno):
      VSYNC - PIN2
      XCLCK - PIN9 (must be level shifted from 5V -> 3.3V)
      PCLCK - PIN12
      SIOD - PIN20-SDA (I2C data) - 10K resistor to 3.3V
      SIOC - PIN21-SCL (I2C clock) - 10K resistor to 3.3V
      D0..D7 - PIN22..PIN29 (pixel data bits 0..7)
      3.3V - 3.3V
      RESET - 3.3V
      GND - GND
      PWDN - GND

    • @IlMagodelComputer670
      @IlMagodelComputer670 5 лет назад

      @@IndrekL yes... I've checked the connections 5 times!

    • @IndrekL
      @IndrekL  5 лет назад

      @@IlMagodelComputer670 Do you happen to have Oscilloscope available? It would be good if you could check if XCLCK reaches the camera and if camera is outputting Pixel clock.

    • @IlMagodelComputer670
      @IlMagodelComputer670 5 лет назад

      @@IndrekL Nope, i do not have it!

    • @IndrekL
      @IndrekL  5 лет назад

      @@IlMagodelComputer670 Maybe something happened to the camera? If you try it again with UNO is it still working?

  • @muzammilzainuddin291
    @muzammilzainuddin291 5 лет назад

    But still can't view the video into smartphone

    • @IndrekL
      @IndrekL  5 лет назад +1

      Hey! I have some plans to try to do it with a wifi module. It wouldn't be as fast as directly to the screen but it takes time to get it working.

    • @binodkhemka1725
      @binodkhemka1725 5 лет назад

      ​@@IndrekL If you are planning to do something, please do it as fast as possible and it will be helpful if done with the Blynk app.....

  • @jojionigiri
    @jojionigiri 5 лет назад

    Please i need it as soon as possible can you make a code that the output can be saved to SD card using Arduino mega
    Thank you so much

    • @IndrekL
      @IndrekL  5 лет назад

      Hey! You should use the FIFO version of the camera if you want to save to SD card. Writing to SD card is slow and Arduino doesn't have enough memory to store the image while it is saving.

    • @ibnumrichaflor
      @ibnumrichaflor 5 лет назад

      @@IndrekL hello, what if i want to save my picture in database (mysql, using PHpMyadmin) ?
      please response :"
      i need ur advice for my collage project :"
      thank you

    • @IndrekL
      @IndrekL  5 лет назад

      @@ibnumrichaflor Hello! Currently my java application displays the image on the screen and can save it into a file. You can add database connection to the Java program and save it into a database table.

    • @ibnumrichaflor
      @ibnumrichaflor 5 лет назад

      @@IndrekL which java aplication do you mean? is java aplication on this video (ruclips.net/video/L9DTW1ulsT0/видео.html)?
      thank you for your response

  • @Voha
    @Voha 4 года назад +1

    Вау! Это гениально!

  • @GastonDE-BOIGNE
    @GastonDE-BOIGNE Год назад

    HELP