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 (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!