Raspberry Pi Virtual Fireplace

I’d been struggling to put one of my old Raspberry Pies to good use. For the better part of the last several months it’s been just idle, waiting to be tinkered with. I have all kinds of components to build a variety of wicked projects. But in the past, most of my attempts to make something interesting have been met with failure. So I decided to use this holiday season to finally bring something to life from the boxes of breadboards, transistors, and LEDs that are just taking up space in my Man-Corner.

Most importantly I wanted to utilize and old LCD composite monitor which stared blankly at us in the dining room each night. I came across an interesting guide to making a Pireplace that seemed doable. Something basic but fun. A video on a loop of a fireplace crackling that started on boot. Add a little LED Christmas light razzle-dazzle and now you got something interesting.

I set out to work using oshlab.com’s guide as a template. First on my list though was getting an old Raspberry Pi Model B (yep, we’re going old school) up to snuff to handle this project. I decided to use Dietpi as my OS since it offered a small enough image and could give me a minimal X environment (LXDE) to run the video from. I also put to use a 32 gigabyte USB stick to hold the mp4 video file. (plus any additional media for other projects down the line) This was necessary, since even this minimal DietPi install was pushing my 4 gigabyte SD card to capacity. I edited the /etc/fstab to mount it on boot.

Once I got all that squared away and finally got my USB WiFi dongle to work (remember that bullshit?), I started to get my project underway.

I used some random YouTube video downloader in browser to take a 1 hour fireplace video (there are quite a few to choose from), re-encode it at a lower resolution (to save space, and my first generation Pi can only handle so much), then uploaded it to my 32 gig USB stick attached to the Pi.

Next came getting the video to play. I tried the recommended omxplayer but was having some issues. So instead I went with MPlayer (a very similar, minimalist video player). That got my video playing fairly well. Then I wrote a shell script that simply executes my video playing on a loop in full screen mode through MPlayer. I placed that script in my /etc/xdg/lxsession/LXDE/autostart file so that my virtual fireplace starts burning away with no hassle after I ignite my Pi with the microUSB cable. (aka, boot the OS)

This worked wonderfully. Aside from some buffer overload issues that causes the fireplace’s sound to periodically drop out from time to time (video memory is not the original Pi’s strong suit), my Pireplace is a wonderful addition to our tiny Japanese apartment.

But of course, I wasn’t done there. Next came a Christmas light show to put everyone in the holiday spirit.

I busted out an 8×8 LED matrix and used some ready made C code from Sunfounder to drive the lights in a swirling psychedelic extravaganza. (just cut and paste, no C coding on my end) I compiled my code and then added that to my autostart as well. Light show complete!

Sunfounder’s schematics aren’t the easiest to follow when you are wiring something as complex as an LED matrix
Calm down folks, it’s just some LEDs. But whatever you do, DO NOT cut the red wire!

Well, not quite finished. I still had a lot of unused GPIO pins that I wasn’t about to waste. Python skills don’t fail me now! I wired up 5 LEDs and worked on some code to get them flowing in a nice little timed pattern. Then added it to the autostart, and now my virtual fireplace Christmas wonderland is complete.

Blogvember Retrospective

Well, that was interesting. 30 blog posts in 30 days. Some were better than usual. Some were just content for content’s sake. I learned a lot in the process. I became even more familiar with some of the nuances of WordPress. I mastered the use of the WordPress Mobile app. I was also able to fix some technical issues with the sight, and discover a few yet to be resolved bugs. It is always a work in progress.

Most importantly I learned to be free with my writing. Nothing is too delicate to blog about. I didn’t hold back. Will that bight me in the butt someday? Maybe, but I doubt it.

The Trans-Siberian Railway Dining Car

When I set off on my Russian trip in the spring of 2003 I had zero expectations, and was totally unprepared. I new more about some tiny ancestral village in the Ukraine, my final destination, than the thousands of miles of railway journey between there and Vladivostok. I did zero research on the language, people, or customs.

The flight from Niigata, Japan on Vladivostok Air set the tone for the whole trip. Broken tray tables, flight attendants with horrible fashion sense, and a runway disembark that featured soldiers with AK’s – all so charming. My only comfort came from the fact that I had paid MIR Corp a hefty sum to hold my hand after I cleared immigration.

My Russian visa is a direct reflection of my stay: gloomy, mishandled, and uncomfortable. Notice the conspicuous lack of departure stamp near the bottom. Apparently I never left, which feels about right deep in my soul.

Waiting in the arrival lobby with my name on a placard, was Ivan, my driver. I soon learned that Ivan spoke no English, listened to one Moby song on a loop, and that the road from the airport needs work.

Luckily my guide was waiting for me at the hotel, and she spoke English wonderfully. We set a morning pickup time for my one day in Vladivostok, and I got situated for the night.

Aside from some random phone calls to my room by local hookers working in conjunction with the hotel (a regular occurrence throughout my time in Russia), my short stay went well. I caught some excellent views of the navy’s sub pens in the harbor, was escorted to the bank for a cash exchange, and saw some stuffed Siberian tigers at the natural history museum.

My guide got me on the overnight train to Ulan Ude in the late afternoon, and all was right with the world. I had a nice 2nd class cabin all to myself (or so it seemed). But I was getting hungry. I would have to leave my protective bubble and venture towards the dining car.

I wandered a few cars down and luckily came across what appeared to be a restaurant. Now came the real challenge, ordering. Let’s just say that the proprietor/cook wasn’t exactly pleased with my presence.

Realizing that this Americanski spoke no Russian, he gruffly belched “You sit – now!” and gestured toward a booth with two other youngish Russian men. This despite the fact that there was quite a few empty seats, and this joint wasn’t going to be jumpin’ any time soon (or ever). But I wasn’t about to argue with the guy.

I looked at the Cyrillic menu like I had a clue, and tried just pointing to a few of the items.

“What you want?!”

I pointed again in fear.

“Borscht, you want borscht?!”

I nodded. I suppose I did. My other dinner companions were just as confused. They were handled just as curtly despite sharing the same mother tongue.

Of course our order took a painfully long time. We sat on uncomfortable silence for at least 30 minutes. When the food did arrive we all ate it quickly and got the hell out of there. Not my proudest international travel moment.

Fortunately, there were numerous other uncomfortable moments throughout my journey like: Doing vodka shots with the Russian soldier meant to be patrolling the train’s corridors, having my 2nd class cabin bunk mate change three times in the course of a night from hot redhead to shriveled babushka to sour construction worker, and having both the Russian and Ukrainian Authorities forget to stamp my passport at the border.

All of these and more can be experienced on the Trans-Siberian Railway!


Japanese Free Time

Quite a few years ago, before I set foot in the Japans, there was a policy shift in the Japanese school system. They stopped holding Saturday classes and cut back on some coursework. It seemed a step in the right direction. It was supposed to help invigorate the youth, help them to more independently discover their passions. All that good stuff.

It sounds reasonable on paper. But Japan looks good on paper in a lot of categories. When you put it under the microscope you find all kinds of discrepancies.

Case in point: school club activities.

With all this free time students would be having, of course joining clubs (sports, cultural, academic) would seem like an obvious direction many students would take.

I was in a few clubs throughout junior and senior high. I was on the no-cut soccer team in 7th grade, before it became competitive. Then in 8th I tried out for the golf team. That was an utter failure. I did some creative writing, sporadically worked on the yearbook staff, and got hoodwinked into building sets for the school theater productions.

There were also whole chunks of time I wasn’t involved in anything. School would end around 3 PM and I was running out the door, eager to get home, to just chill.

But here in ganbare Japan that luxury doesn’t seem to exist. I’ve been taking informal surveys of my 7th (1年生) and 8th (2年生) grade classes. Of the 35 kids in each class almost all of them are in a school club. That’s a pretty remarkable participation level for something I have been told is voluntary. But social/peer pressure is so intense in Japan that most students, teachers, and parents see not joining a club as some kind of failure.

Remember when Japan stopped holding Saturday classes? Well, guess what replaced that. Club activities. Clubs practice or meet six and sometimes seven times a week. But doesn’t that cut into their study time, you say? Sure. But my kid has to go to juku after school, Japanese mothers will complain. Don’t worry, Japanese schools have a remedy for such concerns: Club practice before school.

You heard me right. Many Japanese school clubs practice/meet before school. Nothing like coming to school before 7 in the morn for some table tennis practice seven days a week. Besides, who needs sleep? “Not the developing minds of teenagers,” said no modern doctor ever.

Have you ever tried teaching 35 unmotivated teenagers first period on a Monday morning. It sucks. Now add some intense one hour basketball drills into the mix just before that. Sign me up!

It all comes down to an almost primal fear of idleness by Japanese society. Every hour needs to be planned out. Should free time protrude into a young persons life, then a life of crime, drugs, and moral ineptitude will surely take hold.

This literally was once expressed to me by an insane eikaiwa owner. A junior high school student who had been coming to that eikaiwa 5 days a week since she was in kindergarten, happened to be absent from evening class one day. The director pulled me into her office to discuss the “situation with Sakura.” I was perplexed. The director then started reeling of a litany of horrible and destructive life choices that Sakura might be turning to in that 2 hours of freedom. “She could be on drugs!” was the director’s logical conclusion.

Drugs? As if that is even a viable option for a middle school aged girl in Japan from a upper class family. I am not saying it can’t happen, but youth illicit drug use and addiction shouldn’t be the first conclusion one draws for a juku student skipping class. My more reasonable suggestion – that she probable is just getting a little tired of attending the same academy day after day for 12 years – was quickly brushed aside.

So the point is this. We need idleness. Japan needs idleness. It will help the country grow.

Winter False Start

It came and then it went. The snow began falling pretty heavily last weekend. It looked like an early start to snowshoeing season. I planned out my winter routes, prepared my Tubbs Wilderness snowshoes, got my gaiters ready – very exciting!

But just as it has been in the past, this snowfall was a short term visitor. A few days later the temperature shot back up above zero, and a rains came. This cycle will most likely continue for a few more weeks. Snow, then rain melting the snow, then the watery streets refreezing overnight. It makes my morning walking commute a real ankle breaker.

This part of the year is really some of the worst for outdoor enthusiasts. Snow can’t accumulate enough for snowshoeing or crampons. Trails are muddy, slushy, and too treacherous for even experienced hikers. Unfortunately, there is nothing to do but be patient. Hang in there folks!

Sapporo Christmas Market

It’s the most wonderful time of the year. The 17th annual Sapporo Munich Christmas Market. It’s has a selection of vendors from Russia, Poland, Germany, Japan, and other far flung nations. They’ve got roasted nuts, matryoshka dolls, Christmas ornaments, and novelty foods galore. Multiple varieties of hot wine, cider, and beer are available. Want a nice soft pretzel? That will set you back a minimum of ¥400. So if your on a budget this might not be your cup of tea. But makes for a nice stroll in Odori Park near the TV Tower. And it lasts until Christmas Day.

Also, Santa is there! And white guy Santa to boot! Sorry, Asian Santa freaks me out, that won’t ever change.

Japanese Thanksgiving

This year, Japanese Labor Day fell on Friday the 23rd of November. This coincided nicely with American Thanksgiving (Thursday, November 22nd). So we took advantage of this synchronization by assembling our own massive meal. (Well, my expert chef wife did all the cooking.) Most of these ingredients were purchased at Costco, or found at local import food shops.

Whole roasted chicken with mixed veggies

We invited a friend over and had a cozy meal that none of us could finish. Chicken soup for a week!

A chicken dinner with all the fixin’s: mac and cheese, jalapeño/olive deviled eggs, rice stuffing, and green salad with beans

Of course, things went over the limit with homemade rare cheesecake and a creamed filled pastry (シュークリーム) from Mother’s.

Arrested Development

Stickers, stuffed animals, Disney pen cases, a furry mascot. What do all these things hold in common? They are all objects held in high regard for the Japanese young adult. Is that a problem? Well, I sit on two sides of the fence on this one.

Every day I see 12-15 year old junior high school kids obsess over these objects. One part of me is happy that they aren’t joining gangs or worse. They have found some kind of outlet for their anxieties that is soft and warm. The other part of me is highly concerned.

You see, this affinity for childhood things doesn’t just linger into those pre-teen years. It continuous well into high school and than beyond. My wife sat next to a forty something salaryman yesterday on the bus. He was clutching a rather large stuffed fox and tenderly caressing it the whole journey. This is a suit wearing, briefcase toting, adult. He had spent the day at the office. He is carrying around a stuffed animal.

The police force has a mascot. Hell, everything has a mascot! My first take on that was, “Gee, that’s interesting.” Now, after relentlessly being onslaughted with mascots, and plush toys, and echoing high pitched screams of “kawaii!”, I am worried.

What’s really going on here? You don’t see this in most other nations (it has crept into Korea and China). I have a theory, or perhaps I remember reading this theory, that this is a case of arrested development. A very pronounced, society wide case of it. It makes perfect sense. Elementary school is really the last vestige of freedom for most people here. After 6th grade (and often before) students free time is squashed by juku (塾), then high school entrance exams, more juku, college entrance exams, a brief 2 year college “study time” reprieve, followed by 2 years of company recruitment sessions. Then the salaryman/office lady hamster wheel begins.

So it makes perfect sense for the public to pine over those childhood days, to reach out and remain intimately connected with those idols of the past.

The rest of us have to put up with it I suppose.

Death & Destruction of Japanese Domiciles

With an aging society (as discussed earlier), you would expects there to be a huge surge in available home to purchase. But you would be terribly wrong. In fact, because of a variety of cultural-economic issues, purchasing a used home is anathema to the Japanese way of life.

This saddens me because every day I see a multitude of vacant Japanese homes which I would love to be seen put to use.

One of many classic wooden homes that are slowly disappearing from Sapporo’s streets

But the same pattern keeps emerging. Older home remains abandoned for several months. Then, older house is completely demolished over the course of a few days. Lot then remains vacant for several months. Finally new home is built and new family full on moves in, like they’ve have lived there for decades.

A beautiful cottage kept guard over this Asahiyama Park access point until a month ago. Now it’s mud.

I realize that land values increase without old homes occupying them (which flies in the face of conventional wisdom). But what about respect for the past? What about Japan’s dedication to the concept of もたいない (not wasting). The amount of construction materials that are wasted in this process and the damage to Japan’s environment is ridiculous.

For once I’d like the sons and daughters of the deceased to take some pride in their former childhood home pass it on to another generation. Or is the financial stakes too high? Seriously, asking for a friend.

Geriatric Japan

Everyone knows Japan has a demographic problem. It’s society is aging rapidly, and this is constantly referenced in economic projections for the coming decades. But what does that mean on the ground, away from the statistics?

I’m no spring chicken. I’m approaching forty at the time of this post. But on my daily commute and strolls around Sapporo I feel positively juvenile in comparison to much of the humanity I encounter.

I had an early afternoon commute yesterday, around 2:00 PM. I glanced around my bus, just to do a head count. Approximately 20 people, 15 of them were easily 60 or older (that’s being generous). The same ratio held true for the subway carriage that I took later.

We all grow old. I’ll be joining those pensioners sooner than I care to admit. But my concern is with the ratio of elderly and how it effects this country’s policies and political climate.

You see, the one thing older folks love to do, and have the time to do, is vote. They do that a lot here (the elderly, not younger adults). Essentially the elderly run the country. And what do they vote for? They vote for things not to change. They vote for things to remain the same.

The 70+ crowd wants things exactly as they were in late Showa Era (1980’s) Japan. Before the bubble burst. Who wouldn’t. The economy was thriving. Japan as #1. The world was in love with Japan!

But being trapped in past manifests itself in many unique ways: Fax machines still get regular use, blackboards and chalk are the default in the classroom, nearly all daily transactions are done with cash, and the general populace is still fearful of internet shopping. Starbucks is still the only place I can get reliable, hassle free, Wi-Fi.

There’s countless other examples of retrograde customs and procedures that permeate Japanese society. They are an indirect reflection of an aged voting and policy making populace. I don’t pretend to offer any easy solutions. But it often pains me to see Japan still portrayed in international media as a kind of hyper-modern, technologically advanced, utopia. That seems a long ways away.