Tag Archives: Python

Glowing Automatic Light Graffiti

As fun as light graffiti is, it doesn’t necessarily translate to something you can show people in real life.  Fortunately, after a conversation with Susan at the Greenville Makers Group, an idea was hatched to use a “Glow Crazy” toy’s surface to show what I was drawing for longer than, say, a wall would.  Check out the video below to see what I mean:

booth-glow-crazyI designed the “servo light graffiti device a while ago, and Most of the details on this build can be found here, as well as some later changes that made the pixels into “X”s.  Nothing has really changed for the show besides a neat background, and a bin to keep some of the light away.

Unfortunately, it was still pretty bright where my table was located, so only a few “pixels” could be seen at a time.  The video in this post is Read more »

Servo Light Graffiti – “Pixel-Painting” an Image

Drawing a circle with lasers, as seen here, was an interesting project, and really stretched my ability trigonometry-wise (read on for more details).  What would be even better, however, would be to take an image (gif, jpg, or otherwise) and convert it into a light graffiti automatically.  This is my latest experiment with servos, lasers, and the Python programming language using a pyMCU.*  Check out the results in this video:

One should note that the example images are not from the laser moving around in the video, since the same camera is used for the video and long-exposure light graffiti shots.  The physical setup for this fixture is explained in the “servo circle” light graffiti post, and if you want to know how light-graffiti works in general, here’s my intro.  Basically, one opens up the camera’s shutter, records all light coming in, and merges it into an image as if it happened at one time.  Because of this, a servo putting little light dots on a screen can appear to be a coherent image as if it was all there at one time.

Here is the Python code that I used to program my pyMCU* for this project.  The math is a bit less complicated than the circle code, as I just incremented the “mb.PulseOut”* command for the pyMCU by one for each pixel.  The code is based on my previous pixel-machining experiment, and works in a very similar manner.

Moving the servos, and laser timing issues:

One thing that was different with this program is that the pixel-machining routine generated Gcode for  a CNC router, so the machine takes care of actually getting the router to where it’s supposed to go.  In contrast, Read more »

pyMCU + Servos and Foam = Python Head Man!

python-head-onWhat do you get when you cross the glowing LED box with a RC helicopter and the pyMCU microcontroller?  A Python controlled glowing head of course!

This “Python Head Man” is capable of looking up and down in two directions, and lighting up “eyes” and a “mouth.”  This is possibly better explained in the video below.  The ‘bot uses the two servos originally meant to adjust the rc helicopter blades that this frame had on it.  I originally wrote about controlling these servos here, but this setup also has two sets of LEDS that can be independently switched on and off.  Control of the ‘bot is also enhanced with a simple GUI using the Tkinter Python library.  Diffusion of these LEDs is done with a foam cube, similar to the “Solar LED cube” that I made a few months ago.

If you would like to try something like this yourself, Read more »