B4R Question OV7670 camera

derez

Expert
Licensed User
Longtime User
I got one and started googling to find how to interface it to Arduino. Very disappointing.
The closest to make some sense for me is this https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno
Does anybody have any experience with this camera ?
cam.png
 
Last edited:

derez

Expert
Licensed User
Longtime User
Trying the following code but I don't get an image:
B4X:
Sub AStream_NewData (Buffer() As Byte)
    bc.ArrayCopy(Buffer,0,full,offset, Buffer.Length)
    offset = offset + Buffer.length
    Log(offset)
End Sub

Sub show_Action
    Dim temp(offset) As Byte
    bc.ArrayCopy(full,0,temp,0,offset)
    iv.SetImage ( BytesToImage(temp))
End Sub

Public Sub BytesToImage(bytes() As Byte) As Image
   Dim In As InputStream
   In.InitializeFromBytesArray(bytes, 0, bytes.Length)
   Dim bmp As Image
   bmp.Initialize2(In)
   Return bmp
End Sub

If the code should work then the reason must be the camera's stream...
 
Upvote 0

tzfpg

Active Member
Licensed User
Longtime User
Hi Derez,

Now I'm using OV7670 camera to write on my project. Do you have any solutions to write this hardware.

Thank you
 
Upvote 0
Top