Showing posts with label laser. Show all posts
Showing posts with label laser. Show all posts

Thursday, August 22, 2013

From Java to Burma

Hands on Python

This month at our local Python user group (PYPTUG), I'll do a hands on session. Could have been in a workshop, code dojo or project night, but it'll be part of the normal monthly meeting.

Attributes, Properties and Descriptors

A lot of people learned C++ or Java in school and some of the normal patterns for these languages are regularly seen in the wild in languages such as C# and Python. Having coded in all of these, and many more, I appreciate greatly some of the features of a given programming language. And when it comes to Python (as Roger Sessions said, paraphrasing Einstein), that "everything should be as simple as it can be, but no simpler".

 The hands on will focus on attributes, and how to keep it simple. And of course, how to get out of trouble, because you have to do something not so simple later, using properties and descriptors.

I will be posting to my bitbucket pyptug repository some material related to the talk, including a log of the interactive session we will be doing.

Audience will be ranging from people who have never coded, to people who have programmed in other languages, to python experts. I love a challenge.


Thursday, February 7, 2013

sudo ./

Tron, Laser, Lissajous, RaspberryPi

Am I throwing together random words for titles now, in a weird captcha induced moment? No,  just condensing my interest in lasers in a few words.

You might have seen the laser digitizer in Tron: Legacy

However, in my case, what triggered my interest in laser, was the original Tron laser digitizer

A few years later, I had the chance to play with a good old HeNe red laser, pumping a mighty 5mW (well, in the 80s, it was impressive) in the college lab. One of the things I did with it was to draw Lissajous figures (or curves) on a wall (a large wall outside, at night - even cooler), using two little speakers and mirrors I had brought (the lab was set up to only do prism and mirror experiments).

Googling, I see a nearby school (Appalachian State) has one such kit in their physics dept:

Anyway, fun stuff, making math and physics a lot more interesting...


There was the artistic connection that also further fueled my interest in lasers. There is a lot to talk about here, since I've composed and performed electronic music for many years (still write some) and hosted a radio show for about 10 years etc, so that'll be for another time.

I will bring up one point right now though: you cant talk about lasers in music shows, without mentioning Jean Michel Jarre.

Jean Michel Jarre, Houston TX 1986
From his incredible live outdoor shows with lasers, lights and fireworks (one, a tribute to oceanographer Cousteau, had an attendance of over 2 million people in France in 1990) to his laser harp. Jarre without lasers wouldn't be the same.

On the road

The Raspberry Pi has a lot of appeal by itself, but I figured that it would probably be a good idea to add a laser in the mix. Since I had a presentation at PyCarolinas, I figured I'd write a script with Python (, hence the title of this article) and build a little rig to project interesting patterns on the wall behind me.

My 50mW laser rig (also 500mW for day use)

The code for the pulsing is basically what is found in the RPI.GPIO dot dash article, and for the motor, in the 2bit H bridge article and PWM article.

So, using a laser in presentations, does it work? Well, at PyCarolinas, I got a lot of feedback on this, both during the presentation, after the presentation and even during other talks (heard during another talk "so we've learned today that lasers are cool")

In the audience: "I just want to say that this is the coolest command, ever."

On twitter:

Calvin Spealman
sudo with actual lasers! #pycarolinas
08:45 PM - 21 Oct 12

And so on and so forth. The conclusion is this: Science needs some showmanship. But please, be careful when playing with lasers!


So I'll leave you with a video of my little rig above controlled by the Raspberry Pi, going to the music of a very British band, doing a cover of the theme of a very British TV show. Very apropos, since the Raspberry Pi is a very British computer, afterall.

Youtube video (Music by Orbital, Doctor? live at BBC)

[edit] I fixed the youtube link