This project titled Sport, at home is designed to allow batters to practice indoors during the Coronavirus Outbreak which combines ARC IOTDK to implement voice recognition to operate the game interface , KINECT V2 to detect batters' motions and UNITY to create a simple 3D baseball game.
The Hardware requirements are as below:
- DesignWare ARC IoT Development Kit
- inmp-441(voice sensor)
- KINECT V2(xbox one)
- PC
- Micro USB To USB x1
The Software requirements are as below:
- embARC Open Source Platform
- MetaWare Development Toolkit & GNU Toolchain
- DSpotter(Cyberon)
- Unity + Kinect plugin
- Kinect for Windows SDK 2.0
- Installing Unity
- Installing Environmental Settings for ARC IoTDK
- Installing Kinect for Windows SDK 2.0
- Connecting INMP441 & ARC
- Connecting ARC (Dataport) & PC by
Micro USB To USB
- Connecting Kinect V2 & PC, then you can test it by
Kinect for Windows SDK 2.0
to confirm whether it works fine
- Downloading
Unity_package
from here - Downloading
embARC/DSpotter_Sport_at_home
from github
- Put
DSpotter_Sport_at_home
into embarc_osp - Use
Visual Code
to open embarc_osp folder - Let
terminal
go toDSpotter_Sport_at_home
- Key in
gmake TOOLCHAIN=mw BOARD=iotdk DIG_NAME=IoTDK gui
- Click
ok
and wait a second - Click
run
- Open
Unity Hub
to create a new 3D repository
- Click Assets -> Import Package -> Custom Package
- Open Sport_at_home.unitypackage
- Import All
- Double Click Scenes -> Baseball, then you can find the blue square appear
- Choose Game -> Display2
- Click Run ! (You can click
Maximize
to maximize the game window, or ClickMaximize On Play
before Click Run)
The list on the left is the instructions that you can release, you can use keyboard or voice to release it.
Example :
At the beginning,
you can key in z
or say 球種設定
in Chinese to set the ball pitch
you can key in x
or say 球速設定
in Chinese to set the ball velocity
you can key in c
or say 位置設定
in Chinese to set the ball position
you can key in space
or say 開始投球
in Chinese to let the ball be thrown to you
The info which is white on the Bottom Right Corner is the setting you set now.
At the beginning,
the ball pitch is Straight ball
the ball velocity is random
the ball position is random
The velocity which is red on the Upper Right Corner is the velocity of this pitch, it will be changed immediately when the next ball be pitched.
At the beginning, it will display 178 km/h
The 9 grids in the middle is 9 possible positions of the ball.
The yellow mark is the position of this pitch, it will be changed immediately when the next ball be pitched.
If you set random
it will first be displayed at middle, then be changed immediately when the next ball be pitched.
If you set 1~9
it will be displayed at the gird you set immediately.
At the beginning, because the ball position is random, it will be displayed at middle.
You can set ball pitch by keying in z
or say 球種設定
in Chinese
Now, we only have Straight ball
You can key in 1
or say 設定直球
in Chinese to set Straight ball
You can key in q
or say 取消設定
in Chinese to quit setting
Initially, it is set Straight ball
You can set ball velocity by keying in x
or say 球速設定
in Chinese
We totally have 10 segments can be chose
You can key in 0
or say 一百公里
in Chinese to set velocity between 100 ~ 109 km/h
You can key in 1
or say 一百一十
in Chinese to set velocity between 110 ~ 119 km/h
You can key in 2
or say 一百二十
in Chinese to set velocity between 120 ~ 129 km/h
You can key in 3
or say 一百三十
in Chinese to set velocity between 130 ~ 139 km/h
You can key in 4
or say 一百四十
in Chinese to set velocity between 140 ~ 149 km/h
You can key in 5
or say 一百五十
in Chinese to set velocity between 150 ~ 159 km/h
You can key in 6
or say 一百六十
in Chinese to set velocity between 160 ~ 169 km/h
You can key in 7
or say 一百七十
in Chinese to set velocity between 170 ~ 179 km/h
You can key in 8
or say 一百八十
in Chinese to set velocity between 180 ~ 189 km/h
You can key in 9
or say 一百九十
in Chinese to set velocity between 190 ~ 199 km/h
You can key in r
or say 隨機設定
in Chinese to set velocity random
which is between 100 ~ 199 km/h
You can key in q
or say 取消設定
in Chinese to quit setting
Initially, it is set random
You can set ball position by keying in c
or say 位置設定
in Chinese
We totally have 9 grids can be chose
You can key in 1
or say 一號位置
in Chinese to set position at Upper Left Corner
You can key in 2
or say 二號位置
in Chinese to set position at Upper
You can key in 3
or say 三號位置
in Chinese to set position at Upper Right Corner
You can key in 4
or say 四號位置
in Chinese to set position at Left
You can key in 5
or say 五號位置
in Chinese to set position at Middle
You can key in 6
or say 六號位置
in Chinese to set position at Right
You can key in 7
or say 七號位置
in Chinese to set position at Bottom Left Corner
You can key in 8
or say 八號位置
in Chinese to set position at Bottom
You can key in 9
or say 九號位置
in Chinese to set position at Bottom Right Corner
You can key in r
or say 隨機設定
in Chinese to set position random
You can key in q
or say 取消設定
in Chinese to quit setting
Initially, it is set random
If you have problem like below image, please check which COM?
is your ARC connecting with PC, then double click Script -> adforce to revise COM3
to your COM?