<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>憂藍夢境‧部落格 &#187; Embedded</title>
	<atom:link href="http://blog.linym.net/archives/tag/embedded/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.linym.net</link>
	<description>我的學習心得、筆記</description>
	<lastBuildDate>Fri, 09 Dec 2011 12:33:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>移植 Flite 到 ARM 平台</title>
		<link>http://blog.linym.net/archives/182</link>
		<comments>http://blog.linym.net/archives/182#comments</comments>
		<pubDate>Thu, 20 Sep 2007 17:09:41 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[flite]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.linym.net/archives/182</guid>
		<description><![CDATA[Flite (Festival-Lite) 是一套 TTS(Text To Speech) 系統，透過語音合成技術，不需要錄一堆龐大的語音資料庫就可以朗讀文句。Flite 顧名思義就是有名的 Festival 重寫精簡版，更適合應用在嵌入式系統上，編譯完的執行檔只有 2.5MB 左右，也由於是使用 C 寫的，所以可以很容易和自己的程式結合，試了半天總算可以在 2410 Arm Linux 上面跑起來了。 1. 跨平台編譯 編譯方式和大多數 Open Source 差不多。 # ./configure CC=arm-linux-gcc --host=arm-linux # make # arm-linux-strip bin/flite 完成就會得到 flite 執行檔，下載到板子測試： # flite -t &#34;Hello, How are you?&#34; 嗯，沒有聲音，只有第一次出現 0.x 秒的雜音，再試試： # flite &#34;Hello, How are you?&#34; test.wav 會將語音存成 test.wav，抓到 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.speech.cs.cmu.edu/flite/index.html" target="_blank">Flite</a> (Festival-Lite) 是一套 TTS(Text To Speech) 系統，透過語音合成技術，不需要錄一堆龐大的語音資料庫就可以朗讀文句。Flite 顧名思義就是有名的 <a href="http://www.cstr.ed.ac.uk/projects/festival/" target="_blank">Festival</a> 重寫精簡版，更適合應用在嵌入式系統上，編譯完的執行檔只有 2.5MB 左右，也由於是使用 C 寫的，所以可以很容易和自己的程式結合，試了半天總算可以在 2410 Arm Linux 上面跑起來了。</p>
<p><strong>1. 跨平台編譯</strong><br />
編譯方式和大多數 Open Source 差不多。<br />
# ./configure CC=arm-linux-gcc --host=arm-linux<br />
# make<br />
# arm-linux-strip bin/flite</p>
<p>完成就會得到 flite 執行檔，下載到板子測試：<br />
# flite -t &quot;Hello, How are you?&quot;<br />
嗯，沒有聲音，只有第一次出現 0.x 秒的雜音，再試試：<br />
# flite &quot;Hello, How are you?&quot; test.wav<br />
會將語音存成 test.wav，抓到 PC 上播放，很正常。所以猜想應該是放音部份的問題。</p>
<p><strong>2. 修改 src/audio/au_oss.c</strong><br />
覺得這一段怪怪的，因為記得 S3C2410 採用的 UDA1341 音效晶片只有 Ch1 和 Ch2<br />
    if (ad->channels == 0)<br />
	ad->channels = 1;<br />
改成<br />
    if (ad->channels == 1)<br />
	ad->channels = 2;<br />
重新編譯後再測試，有了，有聲音出來了，不過速度太快了，根本聽不清楚再唸什麼，所以要再改一下。</p>
<p><strong>3. 修改 lang/cmu_us_kal/cmu_us_kal.c</strong><br />
    /* Intonation */<br />
    feat_set_float(v->features,&quot;int_f0_target_mean&quot;,95.0); //音色<br />
    feat_set_float(v->features,&quot;int_f0_target_stddev&quot;,11.0); //音調<br />
    feat_set_float(v->features,&quot;duration_stretch&quot;,1.1);  //速度<br />
前兩個互相搭配可以調整出不同的聲音，實際測試結果發現在 ARM 平台及 PC 上播放會差滿多的，PC 上照預設值就很好聽，ARM 則是調整到下面這樣才比較能接受。<br />
    /* Intonation */<br />
    feat_set_float(v->features,&quot;int_f0_target_mean&quot;,167.0); //音色<br />
    feat_set_float(v->features,&quot;int_f0_target_stddev&quot;,65.0); //音調<br />
    feat_set_float(v->features,&quot;duration_stretch&quot;,2.5);  //速度</p>
<p>英文 TTS 差不多都已經滿純熟了，中文 TTS 不少業界或實驗室也都有不錯成果，不過都是要付費居多，如果是 Windows 則有微軟的 Speech SDK 可以使用。<br />
另外有找到 <a href="http://www.sounding.com.tw/modules/tinyd3/index.php?id=1" target="_blank">SD178A</a> 這顆 IC，應該是個不錯的東西。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/182/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在嵌入式 Linux 架設 Boa Webserver</title>
		<link>http://blog.linym.net/archives/180</link>
		<comments>http://blog.linym.net/archives/180#comments</comments>
		<pubDate>Tue, 18 Sep 2007 10:16:13 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[boa]]></category>

		<guid isPermaLink="false">http://blog.linym.net/archives/180</guid>
		<description><![CDATA[Boa 是一套小型的網頁伺服器，很適合應用在 Embedded System 上，並且內建就可以直接支援以 C 寫的 CGI 網頁，這篇是移植 Boa 到 ARM9 S3C2410 平台的過程，Linux 版本為 2.6.17.4，使用 arm-linux toolchain 3.4.1 編譯。 1. 產生 Makefile 下載 Source code 並解壓縮進到 src 目錄。 # ./configure --host=arm-linux 2. 修改 Makefile 使用跨平台編譯 CC = arm-linux-gcc CPP = arm-linux-gcc -E # make (如果編譯或執行時有錯誤請看Q&#038;A) # arm-linux-strip boa 3. 配置 Boa 可以在源碼目錄找到這個設定檔，放到 /etc/boa 裡面，有修改的部份如下： [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.boa.org/" target="_blank">Boa</a> 是一套小型的網頁伺服器，很適合應用在 Embedded System 上，並且內建就可以直接支援以 C 寫的 CGI 網頁，這篇是移植 Boa 到 ARM9 S3C2410 平台的過程，Linux 版本為 2.6.17.4，使用 arm-linux toolchain 3.4.1 編譯。</p>
<p><strong>1. 產生 Makefile</strong><br />
下載 Source code 並解壓縮進到 src 目錄。<br />
# ./configure --host=arm-linux</p>
<p><strong>2. 修改 Makefile 使用跨平台編譯</strong><br />
CC = <span style="color:blue">arm-linux-</span>gcc<br />
CPP = <span style="color:blue">arm-linux-</span>gcc -E<br />
# make (如果編譯或執行時有錯誤請看Q&#038;A)<br />
# arm-linux-strip boa</p>
<p><strong>3. 配置 Boa</strong><br />
可以在源碼目錄找到這個設定檔，放到 /etc/boa 裡面，有修改的部份如下：<br />
User 0<br />
Group 0<br />
#DirectoryMaker /usr/lib/boa/boa_indexer<br />
CGIPath /bin:/usr/bin:/var/www/cgi-bin<br />
ScriptAlias /cgi-bin/ /var/www/cgi-bin/</p>
<p>然後需要放一個 <a href='http://blog.linym.net/wp-content/uploads/2007/09/mime.zip' title='mime.zip'>mime.types</a> 檔案在 /etc，我是直接複製 ubuntu 裡的檔案。</p>
<p><strong>4. 加入 boa 執行檔</strong><br />
將編譯好的 boa 執行檔加入檔案系統 /bin，要啟動 server 只要輸入 boa 即可，可到 /var/log/boa 查看 log。</p>
<p><strong>問題 Q&#038;A：</strong><br />
<span id="more-180"></span><br />
<strong>Q：使用 toolchain 3.4.1 編譯出現錯誤</strong><br />
arm-linux-gcc  -g -O2 -pipe -Wall -I.   -c -o util.o util.c<br />
util.c:100:1: pasting &quot;t&quot; and &quot;->&quot; does not give a valid preprocessing token<br />
make: *** [util.o] Error 1<br />
A：修改 src/compat.h<br />
找到<br />
#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff<br />
修改成<br />
#define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff</p>
<p><strong>Q：執行 boa 出現 &quot;gethostbyname::No such file or directory&quot;</strong><br />
A：需將 boa.conf 裡的 ServerName 開頭註解拿掉</p>
<p><strong>Q：無法啟動 Boa，error log 顯示 &quot;boa.c:266.icky Linux kernel bug!:No such file&quot;</strong><br />
A：修改 src/boa.c，將底下判斷式註解掉：<br />
/*if (setuid(0) != -1) {<br />
    DIE(&quot;icky Linux kernel bug!&quot;);<br />
}*/<br />
重新編譯</p>
<p><strong>Q：無法啟動 Boa，error log 顯示 &quot;boa.c:211 - getpwuid....略&quot;</strong><br />
A：修改 src/boa.c，將底下兩個判斷式註解掉：<br />
/*if (passwdbuf == NULL) {<br />
    DIE(&quot;getpwuid&quot;);<br />
}<br />
if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {<br />
    DIE(&quot;initgroups&quot;);<br />
}*/<br />
重新編譯</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/180/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>S3C2410 RTC Driver 問題</title>
		<link>http://blog.linym.net/archives/179</link>
		<comments>http://blog.linym.net/archives/179#comments</comments>
		<pubDate>Mon, 17 Sep 2007 16:54:04 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.linym.net/archives/179</guid>
		<description><![CDATA[在 Linux 系統中的時鐘，可分為硬體時鐘及系統時鐘。硬體時鐘可以依賴輔助電源(電池)持續累計時間；而系統時鐘則每次重新啟動就會重置，所以一般 Linux 在開機時會做個和硬體時鐘同步的動作(hwclock -s)，但是在 Embedded Linux 中是要手動操作的。 首先必須正確驅動 S3C2410 的 RTC(Real-Time Clock) 模組才能使用 hwclock 指令，Linux 2.6.10 版本之後應該都有內建驅動，不過在 2.6.14.7 版本中有些問題，會跑出 Segmentation fault 訊息，需要作以下修改。 1. 重新編譯 Kernel 選項 # make menuconfig 在 Device Drivers ---> Character devices ---> < > Enhanced Real Time Clock Support (不要選擇) [*] S3C2410 RTC Driver 2. 修改 arch/arm/mach-s3c2410/mach-smdk2410.c 在 struct [...]]]></description>
			<content:encoded><![CDATA[<p>在 Linux 系統中的時鐘，可分為硬體時鐘及系統時鐘。硬體時鐘可以依賴輔助電源(電池)持續累計時間；而系統時鐘則每次重新啟動就會重置，所以一般 Linux 在開機時會做個和硬體時鐘同步的動作(hwclock -s)，但是在 Embedded Linux 中是要手動操作的。</p>
<p>首先必須正確驅動 S3C2410 的 RTC(Real-Time Clock) 模組才能使用 hwclock 指令，Linux 2.6.10 版本之後應該都有內建驅動，不過在 2.6.14.7 版本中有些問題，會跑出 Segmentation fault 訊息，需要作以下修改。</p>
<p><strong>1. 重新編譯 Kernel 選項 </strong><br />
    # make menuconfig<br />
    在 Device Drivers ---> Character devices ---><br />
    < > Enhanced Real Time Clock Support (不要選擇)<br />
    [*] S3C2410 RTC Driver</p>
<p><strong>2. 修改 arch/arm/mach-s3c2410/mach-smdk2410.c</strong><br />
在 struct platform_device *smdk2410_devices[] 當中加入 <strong>&#038;s3c_device_rtc,</strong>，這個結構已經在 arch/arm/mach-s3c2410/devs.c 定義，應該是忘記加了，修改好後再編譯即完成。</p>
<p><strong>3. 確認驅動載入</strong><br />
Driver 有正確載入開機應該會有<br />
S3C2410 RTC, (c) 2004 Simtec Electronics<br />
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling<br />
並且有 /dev/misc/rtc 裝置</p>
<p><strong>4. 使用 hwclock</strong><br />
先利用 date 指令調整好系統時間，再用 hwclock -w 寫入硬體時鐘，往後開機只要自動執行用 hwclock -s 即可抓到正確的時間囉！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/179/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 下透過 GPRS 上網</title>
		<link>http://blog.linym.net/archives/171</link>
		<comments>http://blog.linym.net/archives/171#comments</comments>
		<pubDate>Fri, 24 Aug 2007 16:14:10 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[系統筆記]]></category>
		<category><![CDATA[GPRS]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[PPP]]></category>

		<guid isPermaLink="false">http://blog.linym.net/archives/171</guid>
		<description><![CDATA[基本需求： 可連上 GPRS 的硬體設備 編譯 Kernel 使其支援 PPP 擁有 pppd、chat 兩個程式 PPP 連線的 script 檔案 1. 可連上 GPRS 的硬體設備 可以是專用的 GPRS Modem 或是手機，不過當然要先配置好相關設定及驅動，我是使用 Wavecom Q2403A 這個 GSM/GPRS 模組透過 com port 來實驗。 2. 編譯 Kernel 使其支援 PPP # make menuconfig 選擇 Device Drivers ---> Network device support ---> PPP (point-to-point protocol) support，底下的子項目如果不確定就全選即可。 核心更新後請檢查 /dev/ppp 是否存在，若無可用 mknod [...]]]></description>
			<content:encoded><![CDATA[<p><strong>基本需求：</strong></p>
<ul>
<li>可連上 GPRS 的硬體設備</li>
<li>編譯 Kernel 使其支援 PPP</li>
<li>擁有 pppd、chat 兩個程式</li>
<li>PPP 連線的 script 檔案</li>
</ul>
<p><strong>1. 可連上 GPRS 的硬體設備</strong><br />
可以是專用的 GPRS Modem 或是手機，不過當然要先配置好相關設定及驅動，我是使用 Wavecom Q2403A 這個 GSM/GPRS 模組透過 com port 來實驗。</p>
<p><strong>2. 編譯 Kernel 使其支援 PPP</strong><br />
# make menuconfig<br />
選擇 Device Drivers ---> Network device support ---> PPP (point-to-point protocol) support，底下的子項目如果不確定就全選即可。<br />
核心更新後請檢查 /dev/ppp 是否存在，若無可用 mknod /dev/ppp c 108 0 建立。</p>
<p><strong>3. 擁有 pppd、chat 兩個程式</strong><br />
如果是一般 PC 版本應該都已經有內建了；<del datetime="2007-09-16T01:38:33+00:00">Embedded 平台則可以考慮使用 busybox，裡面也有包含這兩個程式；</del>再不然就自行下載 <a href="http://ppp.samba.org/ppp/download.html" target="_blank">source code</a> 來編譯。</p>
<p><strong>4. PPP 連線的 script 檔案</strong><br />
建立 script 來做 PPP 連線，通常可以在 /usr/share/doc/ppp/examples/scripts 底下找到 ppp-on、ppp-off、ppp-on-dialer 三個範例檔案，不過用範例檔的設定不一定能成功，請參考<a href="http://blog.linym.net/wp-content/uploads/2007/08/gprs.zip">我的檔案</a>，已測試中華電信可以成功。</p>
<p>相關的設定及原理可以參考：</p>
<ul>
<li><a href="http://tldp.org/HOWTO/PPP-HOWTO/">Linux PPP HOWTO</a> (另有<a href="http://linux.cis.nctu.edu.tw/chinese/how-to/PPP-HOWTO.html">中譯版</a>)</li>
<li><a href="http://wiki.openmoko.org/wiki/Manually_using_GPRS">Manually using GPRS</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/171/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB 無線網卡驅動移植(ARM)</title>
		<link>http://blog.linym.net/archives/170</link>
		<comments>http://blog.linym.net/archives/170#comments</comments>
		<pubDate>Fri, 17 Aug 2007 17:59:01 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[porting]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://blog.linym.net/archives/170</guid>
		<description><![CDATA[平台資訊： 核心板：Samsung S3C2410 ARM920T 無線網卡：PCI GW-US54GXS Linux Kernel：2.6.14.7 Cross Compile：arm-linux-gcc 3.4.1 PCI 所推出的無線網卡大多採用 ZB1211(B) 的晶片，算是滿普遍的一種，所以相容性還不錯，成功移植機率比較大。先到官方下載好網卡的 Linux Driver。 1. 解壓縮檔案 tar zxvf GW-US54GXS_Linux_v2.15.0.0_CE.tar.gz 2. 修改 Makefile # Cross Compile CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc CPP=/usr/local/arm/3.4.1/bin/arm-linux-g++ LD=/usr/local/arm/3.4.1/bin/arm-linux-ld ---------------------------------------------------------------------------- # 修改 Kernel Source 所在路徑 KERN_26=y KERNEL_SOURCE=/opt/linux-2.6.14.7 ---------------------------------------------------------------------------- # 修改 MOD_PATH MODPATH=/opt/linux-2.6.14.7/Modules_install/lib/modules/2.6.14.7 ---------------------------------------------------------------------------- # 修改 KDIR KDIR :=/opt/linux-2.6.14.7/Modules_install/lib/modules/2.6.14.7/build ---------------------------------------------------------------------------- 存檔離開 3. 開始編譯 make [...]]]></description>
			<content:encoded><![CDATA[<p><strong>平台資訊：</strong></p>
<blockquote><p>核心板：Samsung S3C2410 ARM920T<br />
無線網卡：PCI GW-US54GXS<br />
Linux Kernel：2.6.14.7<br />
Cross Compile：arm-linux-gcc 3.4.1
</p></blockquote>
<p>PCI 所推出的無線網卡大多採用 ZB1211(B) 的晶片，算是滿普遍的一種，所以相容性還不錯，成功移植機率比較大。先到<a href="http://www.planex.com.tw/" target="_blank">官方</a>下載好網卡的 Linux Driver。</p>
<p><strong>1. 解壓縮檔案</strong><br />
    tar zxvf GW-US54GXS_Linux_v2.15.0.0_CE.tar.gz</p>
<p><strong>2. 修改 Makefile</strong><br />
# Cross Compile<br />
CC=<span style="color:green">/usr/local/arm/3.4.1/bin/arm-linux-</span>gcc<br />
CPP=<span style="color:green">/usr/local/arm/3.4.1/bin/arm-linux-</span>g++<br />
LD=<span style="color:green">/usr/local/arm/3.4.1/bin/arm-linux-</span>ld<br />
----------------------------------------------------------------------------<br />
# 修改 Kernel Source 所在路徑<br />
KERN_26=y<br />
KERNEL_SOURCE=<span style="color:green">/opt/linux-2.6.14.7</span><br />
----------------------------------------------------------------------------<br />
# 修改 MOD_PATH<br />
MODPATH=<span style="color:green">/opt/linux-2.6.14.7/Modules_install/lib/modules/2.6.14.7</span><br />
----------------------------------------------------------------------------<br />
# 修改 KDIR<br />
KDIR :=<span style="color:green">/opt/linux-2.6.14.7/Modules_install/lib/modules/2.6.14.7/build</span><br />
----------------------------------------------------------------------------<br />
存檔離開</p>
<p><strong>3. 開始編譯</strong><br />
make ZD1211REV_B=1</p>
<p><strong>4. 完成</strong><br />
沒錯誤就會得到 zd1211b.ko，將它加入檔案系統並用 insmod 載入即可。</p>
<p>延伸閱讀</p>
<ul>
<li><a href="http://www.jollen.org/blog/2006/10/03/jollen.org_Lecture_8_%20Mesh%20Router%20Project.pdf">Embedded Linux + ARM</a></li>
<li><a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html">Wireless Tools for Linux</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/170/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>StepMotor Driver &amp; Test program</title>
		<link>http://blog.linym.net/archives/137</link>
		<comments>http://blog.linym.net/archives/137#comments</comments>
		<pubDate>Wed, 16 May 2007 17:34:33 +0000</pubDate>
		<dc:creator>lym520</dc:creator>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://lym.fyman.idv.tw/blog/archives/137</guid>
		<description><![CDATA[FS2410XP 是滿多學校的嵌入式教學實驗平台，板子上有兩個馬達模組，廠商的 demo 程式有一些範例，我將步進馬達完整移植到 Embedded Linux 上，方便作更多的應用。附件包含驅動程式、測試程式及投影片。 在 DOS 的 C 程式有個有個函數叫 kbhit()，可動態偵測鍵盤有無輸入，不用停住等待，不過在 Linux 上沒有 kbhit() 及 getch() 可以用，好在國外有人實作出相同功能的函數，請參考 kbhit.c StepMotor 用法： 進入 linux cd /tmp 輸入 rz 上傳 stepper.o、step_test insmod stepper.o mknod /dev/stepper c 225 0 chmod 755 step_test ./step_test]]></description>
			<content:encoded><![CDATA[<p>FS2410XP 是滿多學校的嵌入式教學實驗平台，板子上有兩個馬達模組，廠商的 demo 程式有一些範例，我將步進馬達完整移植到 Embedded Linux 上，方便作更多的應用。附件包含驅動程式、測試程式及投影片。</p>
<p>在 DOS 的 C 程式有個有個函數叫 kbhit()，可動態偵測鍵盤有無輸入，不用停住等待，不過在 Linux 上沒有 kbhit() 及 getch() 可以用，好在國外有人實作出相同功能的函數，請參考 <a href="http://my.execpc.com/~geezer/software/kbhit.c">kbhit.c</a></p>
<p><a href='http://blog.linym.net/wp-content/uploads/2007/05/stepmotor.exe' title='StepMotor'>StepMotor</a></p>
<p><strong>用法：</strong></p>
<ol>
<li>進入 linux</li>
<li>cd /tmp</li>
<li>輸入 rz 上傳 stepper.o、step_test</li>
<li>insmod stepper.o</li>
<li>mknod /dev/stepper c 225 0</li>
<li>chmod 755 step_test</li>
<li>./step_test</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.linym.net/archives/137/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

