Today is Happy Hina-Festival(ひなまつり@ja) day!

This program plays a Japanese song of this festival.


Why do you hear the sound?

The sound is the wave of the air pressure. The wave waves your eardrum of ears.
The wave has a frequency.
The unit of frequescy is Helz(Hz). 1Hz means 1 wave per 1 second.
Mankind named 440 Hz is tone A(ラ@ja). If the frequency become doubles to 880 Hz, you will hear the higher tone A.

Reconnect the sounder to GND-OUT3, and type this command.

PWM 3,227/2,227

PWM (Pulse Width Modulation) is a IchigoJam command to output continuously pulses.
This setting is 2.27 milliseconds period (1/0.00227 = 440.529Hz).
You can select 2 base periods (OUT2-5 is group A, OUT6 is group B)

Try play 3 tones harmony on IchigoJam!

本ブログの記事や写真は「Creative Commons — CC BY 4.0」の下に提供します。記事内で紹介するプログラムや作品は、それぞれに記載されたライセンスを参照ください。
CC BY / @taisukef / アイコン画像 / プロフィール画像 / 「一日一創」画像 / RSS