Bookmark, share, and hop your favorite sites with SiteHoppin Toolbar for Firefox!書籤,分享與合您最喜愛的網站與sitehoppin用於Firefox的工具欄!



DIY HACK - HOWTO make some sounds with Arduino! diy哈克-如何作出一些聲音與伊諾! Sound Part 3 - Playing a Melody良好的第3部分-發揮了旋律

Posted in張貼在 Arduino伊諾 , Audio音頻 , Circuits集成電路 , Cool涼爽的 , DoItYourself! doityourself ! , Hack哈克 , Microcontroller微控制器 , Music音樂 by max on the November 24th, 2007 at 3:30 am由Max於2007年11月24日在上午03時30分

diy哈克-如何作出一些聲音與伊諾!良好的第3部分-發揮了旋律

Check out the簽出 Part 3 of “HOWTO make sounds with Ardunio” and learn to play melody第3部分“如何使聲音與ardunio ”和學習中發揮的旋律 .

Bit-Banging Sound比特砰砰聲
To bit-bang sound we toggle an output pin at the desired frequency.以位元邦健全,我們切換1輸出引腳在理想的頻率。 To play a musical note, we need to use specific frequencies and play the sound for a specific amount of time.扮演一個音符,我們需要使用特定的頻率和發揮的聲音為某一特定數額的時間。

Generating the desired frequency big-bang style means figuring out what the period or cycle time of the desired frequency is.發電所需的頻率大爆炸式的手段,搞清楚什麼時期或週期時間所期望的頻率。 This is easy to calculate, it’s the reciprocal (1/F) of the frequency.這是很容易計算,它的交互( 1 / f )的頻率。 As we found in part 2, 1KHz is 1000 cycles per second.正如我們發現在第2部分, 1千赫,是1000赫茲。 So, one cycle takes 1 one-thousandth (1/1000) of a second or 0.001 seconds (1 millisecond).所以,一個週期需要1 1 -千分之一( 1 / 1000 )第二次或0.001秒( 1毫秒) 。 We need to toggle the pin at this rate so we want to keep it low for 1/2 the time then high for 1/2 the time.我們需要切換引腳在這個率,所以我們希望保持它的低,為1 / 2的時間,然後高為1 / 2的時間。 Therefore we want to set the I/O pin low for 500uS, then high for 500uS and do this over and over for as long as the duration requires.因此,我們要設置I / O引腳低為500us ,那麼高為500us ,以及這樣做以上和超過因為只要時間要求。

Part I and Part II第一部分和第二部分

via uchobby通過uchobby

Related Posts:相關文章:

diy哈克-如何作出伊諾啤酒t hermostat3

HOWTO make Beer Thermostat with Arduino如何使啤酒恆溫與伊諾

http://zedomax.com/image/200611/audiovideocontroller.jpg

Here’sa cool audio and video controller DIY using Arduino.以下是冷靜的音頻和視頻控制器diy使用伊諾。


, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet) (尚無評)
Loading ... Loading ...載入中...