Celebrating Happy Hacking Day in Japan

August 8th is Happy Hacking Day in Japan, because "Happy Hacking" sounds like 8 8.

This year, I put a speaker to FSM-55 so that we can enjoy some application.

The board

The board is FSM-55 (Flying Stone Mini Go! Go!), which I designed in 2014: http://www.seeedstudio.com/depot/FSM55-LED-Matrix-Display-p-2121.html

Originally, it is a board to fly "Hacker Emblem", but we can enjoy other applications.

Speaker

I bought a speaker of http://akizukidenshi.com/catalog/g/gP-01251/

Then, solder it to the connector K1 2-pin and 3-pin. The GPIO PF1 controls the output to the speaker.

Photo of FSM-55 + Speaker

We use ST-Link/V2 to write the firmware into FSM-55.

FSM-55 with Speaker and ST-Link/V2

Chopstx and examples

The firmware I put to this board is in the Chopstx distribution:

http://git.gniibe.org/cgit/chopstx/chopstx.git/?id=04a948024aae8cd78db65321ae0b2ee8c1aae0ae

Chopstx is a minimum thread library for such an application.

I develop Chopstx for Gnuk and NeuG, but it is very useful for these particular purposes like flying Hacker Emblem or some toy applications.

The applications are in example-fsm-55/ directory. We have three applications. One is hh.c (the Hacker Emblem), another is debian-logo.c (displaying Debian Logo), and last one is for my children.

I modified the last one to play "Tulip" composed by Takeshi Inoue.

It's simple music. Doe-Ray-Me! The text for music is:

static const char *musical_score =
  "c4d4e2c4d4e2g4e4d4c4d4e4d2"
  "c4d4e2c4d4e2g4e4d4c4d4e4c2"
  "g4g4e4g4a4a4g2e4e4d4d4c2";

We have a thread 'spk' for speaker control and another thread 'music' which interprets musical score and instructs 'spk' thread.

In early 80's, I played something like this with the Intel's chip 8253.

I know that the MCU is powerful enough and it would be even possible to do speach synthesis.

Well, something simpler is better in some cases.

Happy Hacking!