
Chinese: 
這是我之前的相機教程視頻的後續
我的OV7670項目已經具備了功能
通過USB電纜發送圖像
在這個視頻中
我將向您展示如何設置
下載並打開LiveOV7670項目
鏈接在說明框中
現在切換到setup.h
並將示例1更改為示例3
這將激活ExampleUart.cpp
本教程需要
在這裡，我進行了四種預配置模式
默認情況下，分辨率為320 x 240
並以每秒1兆位的速率傳輸
模式1分辨率相同

English: 
This is a follow-up to my previous camera tutorial video
My OV7670 project already has the capability
to send image over the USB cable
In this video
I am going to show you how to set it up
Download and open LiveOV7670 project
Link is in the description box
Now switch to setup.h
and change example 1 to example 3
This activates ExampleUart.cpp
which is required for this tutorial
Here I have made four pre-configured modes
By default, it is 320 by 240 resolution
and baudrate at one megabit per second
Mode 1 is the same resolution

Chinese: 
但以每秒2兆位的速度波特
但是至少對我來說這是不可靠的
並在最終圖像中出現故障
第三種模式是160 x 120分辨率
每秒一兆位
分辨率較小但速度較快
第四種模式也是160 x 120
但這要慢得多
這是用於調試
如果您對較高的波特率有毛刺
稍後我將演示所有不同的模式
但現在讓我們以240載入默認的320
以每秒1兆位的速度到達Arduino
接下來下載基於Java的
Arduino Image Capture項目
鏈接到Github頁面在下面的描述框中
您也可以使用Eclipse
或在命令行上編譯
但由於我習慣於使用IntelliJ IDE
在我的日常工作中
我將用它來演示

English: 
but baudrate at two megabits per second
But at least for me this is unreliable
and has glitches in the final image
The third mode is 160 by 120 resolution
at one megabit per second
It is smaller resolution but faster
And the fourth mode is also 160 by 120
but it is much slower
It is for debugging
if you have glitches at higher baudrates
Later I will demonstrate all the different modes
but now let's load the default 320 by 240
at one megabit per second to the Arduino
Next download the Java-based
Arduino Image Capture project
Link to the Github page is in the description box below
You can also use Eclipse
or compile it on the command line
but since I am used to using IntelliJ IDE
in my everyday work
I'm going to use that for demonstration

English: 
You can download IntelliJ community edition for free
Click import project
Then select the project folder
you downloaded from Github
and press ok
Next next next next next
I have JDK already installed
But if you don't have it
you have to go to Oracle's page and download it
Then you can click this plus sign
and that your installed JDK version
And finally, click Next
and finish
Now click on this little arrow and edit configurations
plus and application
Name the configuration
and select main class
Now it compiles
but when we try to run it

Chinese: 
您可以免費下載IntelliJ社區版
點擊導入項目
然後選擇項目文件夾
您從Github下載
然後按確定
下一個下一個下一個下一個下一個
我已經安裝了JDK
但是如果沒有
您必須轉到Oracle的頁面並下載它
然後您可以單擊此加號
以及您安裝的JDK版本
最後，單擊下一步
並完成
現在單擊此小箭頭並編輯配置
加號和應用
命名配置
然後選擇主班
現在可以編譯
但是當我們嘗試運行它時

Chinese: 
它會抱怨找不到圖書館
所以我們需要將Java庫路徑添加到VM選項
我有適用於Windows的64位版本的Java
如果還有別的
然後您可以相應地修改路徑
成功構建並運行後
您應該會看到此窗口彈出
選擇Arduino IDE中使用的相同端口
用於微控制器編程
並選擇一百萬
因為那是模式
我們用於LiveOV7670項目
如果看到這樣的紅色矩形
那麼這意味著Java應用程序和Arduino
都正常工作
如果幾秒鐘沒有出現
然後嘗試按Arduino板上的Reset按鈕
在製作此視頻時，我發現

English: 
it will complain that it cannot find libraries
So we need to add Java library path to the VM options
I have 64-bit version of Java for Windows
If you have something else
then you can modify the path accordingly
After a successful build and run
you should see this window pop-up
Select the same port that was used in the Arduino IDE
for programming the microcontroller
And select one million
since that is the mode
we used for the LiveOV7670 project
If you see a red rectangle like this
then this means that the java application and Arduino
are both working properly
If it doesn't appear in a couple of seconds
then try pressing reset button on Arduino board
While making this video I discovered

Chinese: 
由於某種原因，真正的Arduino Uno
無法處理每秒1兆位的波特率
紅色矩形始終在右側邊緣出現故障
這個問題不存在
與中國的Arduino克隆
對於真正的烏諾
您可以將通訊模式切換為4
使用較低的波特率
另一個不幸的是，無論是Mac OS
或Mac的RXTX庫
不支持1兆波特率
無法打開串行連接
因此，如果您嘗試在Mac上使用它
您必須將UART模式4加載到Arduino
並使用較低的波特率

English: 
that for some reason the Genuine Arduino Uno
cannot handle the one megabit per second baudrate
The red rectangle is always glitchy at the right edge
This problem does not exist
with Chinese Arduino clones
For a Genuine Uno
you can switch the communication mode to 4
to use a lower baudrate
Another unfortunate thing is that either Mac OS
or the RXTX library for Mac
Doesn't support one megabit baudrate
It fails to open the serial connection
So if you try to use it on Mac
you have to load UART mode 4 to Arduino
and use a lower baudrate

Chinese: 
在接線方面，它比屏幕版本更容易
因為您只需要連接相機
對於這個項目
您需要OV7670的非FIFO版本
Arduino Uno
最好是中國克隆
因為它適用於1兆波特率
一堆電線
我沒有分開像素線
因為那樣的話，接線就少了一些麻煩
兩個10k電阻用於I2C連接
一組1k和680歐姆電阻
為XLCK創建分壓器
當然還有麵包板
讓我們從創建兩個電源軌開始
適用於3.3伏電壓和接地
然後我們就可以對恆定功率連接進行接線

English: 
In terms of wiring, it is easier than the screen version
since you only have to connect the camera
For this project
you need the non-FIFO version of OV7670
Arduino Uno
preferably a Chinese clone
since it works with one megabit baudrate
A bunch of wires
I didn't separate pixel wires
because then the wiring is a bit less messy
Two 10k resistors for the I2C connection
One set of 1k and 680-ohm resistors
to create voltage divider for XLCK
And of course a breadboard
Let's start by creating two power rails
for 3.3 volts and for ground
Then we can wire the constant power connections

Chinese: 
相機的3.3電源輸入和RESET引腳
至3.3伏電源軌
相機的地面輸入和PWDN輸入
接地軌
接下來，我們將創建一個分壓器
用於XLCK信號
1k歐姆接地電阻
和680歐姆電阻
到分壓器的引腳3側
和相機的XCLK引腳之間的兩個電阻
兩個10k電阻將I2C信號上拉至3.3伏
I2C時鐘引腳-A5
連接到相機的數據時鐘引腳
I2C數據引腳-A4
連接到相機的數據引腳
現在我們可以進行中點測試

English: 
Camera's 3.3 power input and RESET pin
to 3.3-volt power rail
Camera's ground input and PWDN input
to ground rail
Next, we are going to create a voltage divider
for the XLCK signal
1k ohm resistor to the ground
and 680-ohm resistor
to the pin 3 side of the voltage divider
And camera's XCLK pin between the two resistors
Two 10k resistors to pull I2C signals up to 3.3 volts
I2C clock pin - A5
is connected to camera's data clock pin
I2C data pin - A4
is connected to camera's data pin
Now we can do a midpoint test

English: 
Before we saw a red rectangle
but now if everything is connected correctly
we should see a green rectangle
If you don't see it in a couple of seconds
Then press reset button on Arduino
If it still doesn't appear or you see a red rectangle
then check your wiring
There will be no picture yet
since pixel data wires are not connected
Now rest of the connections to read pixel data
Arduino pin 2 connects to camera's VSYNC pin
Arduino pin 12 connects two camera's PCLK pin
For pixel data, Arduino pins A0 to A3
must be connected to camera's D0 to D3
Arduino pins D4 to D7
must be connected to camera's D4 to D7

Chinese: 
在我們看到一個紅色矩形之前
但是現在，如果一切都正確連接
我們應該看到一個綠色的矩形
如果幾秒鐘後看不到
然後按Arduino上的Reset按鈕
如果仍然沒有出現或您看到一個紅色矩形
然後檢查接線
還沒有圖片
由於未連接像素數據線
現在其餘的連接讀取像素數據
Arduino引腳2連接到相機的VSYNC引腳
Arduino引腳12連接兩個相機的PCLK引腳
對於像素數據，Arduino引腳A0至A3
必須連接到相機的D0至D3
Arduino引腳D4至D7
必須連接到相機的D4至D7

English: 
And now you should start seeing images
from the camera.
It is pretty slow since serial connection is slow
It is only one megabit per second
while the SPI connection to the screen
was eight megabits per second
Let's switch it over to mode 1
with two megabits per second baudrate
As you can see there are random glitched rows
it seems that sometimes a pixel byte gets lost
and this messes up the line
Mode 3 with lowered resolution

Chinese: 
現在您應該開始看到圖像
從相機。
這很慢，因為串行連接很慢
每秒只有一兆位
SPI連接到屏幕時
每秒八兆位
讓我們將其切換到模式1
每秒2兆的波特率
如您所見，隨機出現故障行
似乎有時一個像素字節丟失了
這弄糟了
分辨率降低的模式3

English: 
This is much faster, but the image is very small
And mode 4 with significantly lower baudrate
Thank you for watching!

Chinese: 
這快得多，但是圖像很小
模式4的波特率大大降低
感謝您的收看！
