• 沒有找到結果。

以 Ev3dev 控制 EV3 設定介紹

N/A
N/A
Protected

Academic year: 2022

Share "以 Ev3dev 控制 EV3 設定介紹"

Copied!
34
0
0

加載中.... (立即查看全文)

全文

(1)

以 Ev3dev 控制 EV3 設定介紹

機器人教學成長社群 2014/10/1

(2)

 Ev3dev 與 Lego EV3

 第 1 步:準備一片 microSD 卡

 第 2 步:下載最新的 ev3dev 映像檔

 第 3 步:寫入映像檔到 SD 卡

 第 4 步:啟動 USB TCP/IP 網路

 第 5 步:啟動 ev3dev

 第 6 步:使用 SSH (host computer 端 ) 經由 USB TCP/IP 網路連接到 EV3 主機 ( 以 Windows 為例 )

 第 7 步:登入 ev3dev 首先要做的設定

 第 8 步:開始玩!

Outline

(3)

ev3dev 是一個完整的 Debian7(wheezy) Linux dis tribution

客製化的 LEGO MINDSTORMS EV3 控制器

目的是盡可能提供多種的程式語言環境

(EV3)300MHz ARM9-based Sitara AM1808 system-o n-chip and CC2560 Bluetooth chipset, 64MB of RAM, 16MB of internal flash, and a 32GB micro SD slot

ev3dev

Debian on LEGO MINDSTORMS EV3!

(4)

第 1 步:準備一片 microSD 卡

 microSD

 microSDHC

 microSDXC is not supported 

(5)

第 2 步:下載最新的 ev3dev 映像檔

 (image file)ev3dev-jessie-2014-07-12.img

 https://github.com/ev3dev/ev3dev/releases

 ev3dev-jessie-2014-07-12.img.zip

 ev3dev-jessie-2014-07-12.img.xz

 Source code

(6)

第 3 步:寫入映像檔到 SD 卡

 host computer /PC

 Windows 下

Win32DiskImager (graphical interface)

 http://sourceforge.net/projects/win32diskimager/

(7)

第 4 步:啟動 USB TCP/IP  網路

 host computer /PC 上的設定

 編輯 EV3_BOOT(SD 卡 ) 之 ev3dev.rc.local

 Windows 下

export EV3_GADGET="g_ether“

...

#export EV3_GADGET="g_cdc"

 Linux / Mac 下

#export EV3_GADGET="g_ether"

...

export EV3_GADGET="g_cdc“

Windows users - do not use Notepad or Wordpad.

(8)

第 5 步:啟動 ev3dev

 插入 SD 卡到 EV3 的 SD 插槽

 啟動電源開機

 先啟動 SD 卡上的作業系統

 顯示 Debian GNU/Linux 7 (wheezy) 後,可使用 上、下、左、右鍵

 螢幕顯示

(9)

第 6 步:使用 SSH (host computer 端 ) 經由 USB T CP/IP  網路連接到 EV3 主機

( 以 Windows 為例 )

(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)

 設定 EV3 的 IP

 ( 法一 EV3 上 ) 插入 USB 鍵盤到 EV3 的 USB 插槽,並登入。

(root , r00tme)

指令 ifconfig 顯示網路設定狀態

 ( 法二 PC 上 ) 命令提示字元下輸入

for /l %x in (2,1,254) do ping -n 1 -w 10 192.168.137.%x | find "Reply“

host computer/PC( 區域網路 EV3) : RNDIS/Ethernet Gadge t

設 IP 192.168.137.1 EV3 :

執行

ifconfig usb0 192.168.137.2 netmask 255.255.255.0

(24)

 以 SSH 連接 EV3( 請下載 PuTTY)

 執行 PuTTY

(25)

第一次連接 EV3 成功

warning about the new RSA

fingerprint

(26)

登入畫面

userid : root password : r00tme

(27)

第 7 步:登入 ev3dev 首先要做的設定

 Change your root password

 Set up a new user

 Set the time zone ( 時區 )

 Set the locale ( 語言環境 )

 Grow your file system to use the entire SD card

 Update packages

(28)

root@ev3dev:~# passwd ( 指令 )

Enter new UNIX password: 自行設定 Retype new UNIX password: 重新輸入 passwd: password updated successfully

可暫時省略

Change your root password

(29)

root@ev3dev:~# adduser user ( 新增使用者 user) Adding user `user' ...

Adding new group `user' (1001) ...

Adding new user `user' (1001) with group `user' ... Creating home directory `/

home/user' ...

Copying files from `/etc/skel' ...

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

Changing the user information for user Enter the new value, or press ENTER for the default

Full Name []:

Room Number []:

Work Phone []:

Home Phone []:

Other []:

Is the information correct? [Y/n] y

root@ev3dev:~# usermod -a -G sudo,plugdev,audio,video user

Set up a new user

(30)

root@ev3dev:~# dpkg-reconfigure tzdata

Set the time zone

(31)

root@ev3dev:~# dpkg-reconfigure locales 內訂 en-US ,可省略

Set the locale

(32)

root@ev3dev:~#

lvextend --extents +100%FREE –resizefs /dev/ev3devVG/root /dev/mmcblk0p3

Grow your file system to use the entire SD card

(33)

root@ev3dev:~# apt-get update root@ev3dev:~# ap t-get upgrade root@ev3dev:~# apt-get dist-upgra de

If a new kernel package is installed, you will need to reboo t.

root@ev3dev:~# reboot

Update packages

(34)

第 8 步:

開始玩!

參考文獻

相關文件

The ontology induction and knowledge graph construction enable systems to automatically acquire open domain knowledge. The MF technique for SLU modeling provides a principle model

• When a system undergoes any chemical or physical change, the accompanying change in internal energy, ΔE, is the sum of the heat added to or liberated from the system, q, and the

• To enhance teachers’ knowledge and understanding about the learning and teaching of grammar in context through the use of various e-learning resources in the primary

Xianggang zaji (miscellaneous notes on Hong Kong) was written by an English and translated into Chinese by a local Chinese literati.. Doubts can therefore be cast as to whether

vs Functional grammar (i.e. organising grammar items according to the communicative functions) at the discourse level2. “…a bridge between

(b) reviewing the positioning of VPET in the higher education system in Hong Kong, exploring the merits of developing professional vocational qualifications at the degree

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

Huang, A nonmonotone smoothing-type algorithm for solv- ing a system of equalities and inequalities, Journal of Computational and Applied Mathematics, vol. Hao, A new