December 14, 2017

Lots of Pi

Filed under: Main — Tags: , — admin @ 12:01 am

Originally it was on a lark. I wanted to buy the $20 “computer on a card.” Physically, the thing is the same size as a playing card. It’s a fully functional computer: SD card storage, USB interfaces, networking, sound. It’s a Raspberry Pi.

Recently, I updated my Wambooli PorchCam software to run on the Pi. It’s run well since, with only one minor hiccup: An old problem, actually, but the webcam occasionally refuses to generate an image. I solved that problem by updating the software and it’s run flawlessly since.

In fact, the PorchCam machine, which I call porchcampi, runs so well that I disconnected its monitor, mouse, and keyboard. The thing now runs “headlessly” as its own system. I can remotely access the porchcampi system from my Mac to review the logs or update the software. I’m pleased.

Feeling satisfied with the PorchCam update, I decided to purchase another Pi and find a project for it. While browsing, I spotted the Sense HAT attachment, shown below. It’s an LED matrix along with some other sensors (direction, temperature, and so on). I saw no practical application for this gizmo, or for even buying another Pi, other than I just want to mess around. So I bought it.

Figure 1. My new Pi, which has the Sense HAT attachment. (It’s too bright to capture the LEDs while they’re on.)

I’d like to program the LED lights in C, which is possible. The recommended programming language is Python, which comes with a handy library that does all the tricks for you. I don’t know Python, yet I’ve written some code that displays various messages on the Pi, flashes the pixels in interesting patterns, and does other humorous things. I still want to learn how to code it in C, which is probably my next leisure-time activity.

Another activity will be to formally and finally learn Python. I don’t know why I’ve put that joy aside for so long. The deal with programming languages is that once you learn one, the second one is easier. In fact, any accomplished programmer can write some code in another language and have the thing work. It won’t be elegant or efficient, but the code works.

Another thing that amazed me as that I could scrounge enough parts from the boneyard to use with the new Pi as a monitor, keyboard, and mouse. The monitor required a DVI-to-HDMI adapter, which I had, and everything worked just fine. I’d prefer to use the Pi’s wireless Bluetooth. While I can readily find (and use) Bluetooth mice, I’ve had difficulties obtaining a useful Bluetooth keyboard. The $15 model I bought on Amazon is just useless.

I’ll give you updates on my progress as I continue to fiddle with the new Pi over the Christmas break. Maybe I’ll figure out how to capture the LED without having the picture look all junky. I’ve attached Figure 2 to this post to demonstrate what I’m referring to. Yuck.

Figure 2. The LEDs are so bright that the camera can’t capture them clearly or all on at once .

4 Comments

  1. Ahh, the Pi made so many things possible but I bet a good 90% are used for media servers. The actual GPIO on them is good idea but as it runs through the IO its too slow for many things that you would want to control (Robots in my case). The best bet is to get a GertBoard this board comes with an Ardrino built in so you can give it commands via Python which are interperated by the Ardrino and get pretty good contol. I find Python odd to code in similar to C but just odd enough to confuse.

    Comment by glennp — December 16, 2017 @ 4:58 pm

  2. I’m learning Python right now, though I chose the wrong book. It’s supposed to be a “tutorial” but it’s just a verbose, cumbersome reference. The guy covers too much to have an effective teaching method.

    Comment by admin — December 16, 2017 @ 5:31 pm

  3. Python seemed to me to be trying to do all things, as usual some good, some bad & some why?… I am using the ‘Python for the absolute begginer’ a little slow but covers most things.

    Comment by glennp — December 17, 2017 @ 3:48 am

  4. I’ll find a good Python book. If not, I’ll write one.

    Comment by admin — December 17, 2017 @ 7:09 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress