Light Painting

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
davidh
 
Posts: 155
Joined: Sat Feb 25, 2012 12:32 am

Light Painting

Post by davidh »

Hi,

I was on RaspberryPi.org and saw the Light Paintings. Really liked it. Did you use LED cables?

Cheers
David

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Light Painting

Post by adafruit »

davidh wrote:Hi,

I was on RaspberryPi.org and saw the Light Paintings. Really liked it. Did you use LED cables?

Cheers
David

http://learn.adafruit.com/light-paintin ... spberry-pi

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Light Painting

Post by pburgess »

Thanks David!

The project used this LED strip, just short of 3 meters worth.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Light Painting

Post by pburgess »

Sure! Here's the ones I think worked out best...
fireloop.png
fireloop.png (27.34 KiB) Viewed 2528 times
tronbike.png
tronbike.png (51.6 KiB) Viewed 2528 times
cokecan.png
cokecan.png (32.32 KiB) Viewed 2528 times

User avatar
bentpins
 
Posts: 5
Joined: Wed Sep 14, 2011 1:19 am

Re: Light Painting

Post by bentpins »

Hello Phil,

I put one of these together yesterday with a 32 pixel strip from Adafruit strapped to a PVC pipe. I got something, but the image was not displaying correctly. Then I looked at the test images you posted (thanks for those, they helped connect the dots :)). Based on the resolution, your strip must have been 92 pixels long right?

You must have been traveling at a good clip too? To get results from my setup, it had to really be moving!

I love the POV thing but got intrigued with the idea of a matrix. I read some of the other posts about this and I started putting together a matrix that will be 10x16 from the 5 meter LPD8806 strip I also bought and wondered what it would take in the code to make it display on the matrix?

I ran the strips in a zig-zag pattern and bought the 10 amp unit as well to handle the power required.

I'm new to Python and electronics, so just looking for a push in the right direction.

Thanks,
Bent

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Light Painting

Post by pburgess »

Yep, 92 pixel strand, arranged in a circle rather than a line. Not sure of my speed, but I'd guesstimate it was at least 5mph...did this on the back of my bike so the images would be smooth and not have the sort of "jumpiness" I've seen on hand-carried light paintings.

User avatar
scooter1015
 
Posts: 3
Joined: Sat Sep 29, 2012 2:29 pm

Re: Light Painting

Post by scooter1015 »

Hey! So I read this piece and knew I had to give this a shot. I'm getting the software up and running but have a problem when I try and run the code that you gave. The following error is what I keep getting:

File "lightpaint.py", Line 7 in <module>
import RPi.GPIO as GPIO, Image, Time
ImportError: No module named Image

I've installed the GPIO libraries but when I try and run 'sudo apt-get install python-imaging-tk' it cannot fetch some of the archives. Any suggestions to get this going?

Ty

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Light Painting

Post by pburgess »

Hmm...afraid I'm away from my Pi at the moment, but will try to help. Is this using the Occidentalis distribution or something else? And could you copy-and-paste the exact error messages here? (Or just an initial subset, if the list is hugely long.) Might also try:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
to bring everything else up to date, then try installing python-imaging-tk again.

User avatar
scooter1015
 
Posts: 3
Joined: Sat Sep 29, 2012 2:29 pm

Re: Light Painting

Post by scooter1015 »

The update did the job, Thanks! The board must have had an issue talking with some of the mirrors to get the downloads. I tried to redownload the whole package a few times, but didn't have success until I used the update command instead! Thanks again!

thebignasty
 
Posts: 2
Joined: Sat Oct 13, 2012 12:49 am

Re: Light Painting-python noob

Post by thebignasty »

my coding experience is dated and python is new to me. i am getting two different errors-one is file "lightpaint.py", line 54 SyntaxError: Non-ASCII character '\xc2' in file lightpaint.py on line 54 but no encoding declared;

then if i add # -*- coding: utf8 -*- i get the following error
file "lightpaint.py" line 54 spidev.write(column[x]) indentationError: expected an indented block

any ideas? thanks in advance

thebignasty
 
Posts: 2
Joined: Sat Oct 13, 2012 12:49 am

Re: Light Painting

Post by thebignasty »

k-i worked through the code and got the syntax correct. i run the program and it says that it is displaying. the led light strip just stays solid white. i double checked to make sure i am on the correct pins. i am a soldering novice as well-but the wires seem to be soldered well. any suggestions?

tdk1007
 
Posts: 6
Joined: Fri Sep 07, 2012 3:21 pm

Re: Light Painting

Post by tdk1007 »

I'm having the same issue. The code looks correct, but nothing is happening with the light strip, it just stays a solid white.

I tried using these scripts as well
https://github.com/trizz/PiLed

but the Pi does not seem to communicate with the light strip.
Any suggestions? I'm using Occidentals, just updated & upgraded the apt-get, and grabbed the python-imaging-tk again.

apophisnico
 
Posts: 5
Joined: Fri Oct 19, 2012 6:31 pm

Re: Light Painting

Post by apophisnico »

Hi all,

I have a problem too. I checked all the connections, voltage .. no problem
I am using occidentalis 0.2; with lsmod i am seing my spidev module. A modprobe do nothing... I saw no error in /var/log/messages...

The python script write "displaying" but i have nothing...leds stay off.
I tested too with a raspbian wheezy with spi module activated and the result is the same but unique difference that i have 4 leds light on when i plug the pi to the sector.

Piled python scripts don't work too.

I am using one meter of leds (32 leds)

an idea?

thank you
PS: sorry for my english :-D

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Light Painting

Post by pburgess »

The Pi is still sort of "bleeding edge." If you have an Arduino (or access to one), I'd suggest working through the Digital LED Strip Tutorial. This might help narrow down whether it's a problem with the strip or with the code on the Raspberry Pi.

tdk1007
 
Posts: 6
Joined: Fri Sep 07, 2012 3:21 pm

Re: Light Painting

Post by tdk1007 »

I finally got my rig working after wrestling with power issues! I had forgotten to connect the ground pin of the GPIO port and all of my issues there after came from running the Pi off of battery power.

I have a question about the code though. Is there a way to make it display the image over a longer period of time? I almost need to be jogging to display a picture at its correct proportions.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”