Aug 202012
 

I guess I’ve been using Blender for so much for so long that I tend to look for ‘Blender-like’ controls in a/v projects. So inevitably when I started working with LED strips I immediately tried to weasel out of having to think through functions and loops in arduino code to create effects I could do intuitively in Blender.

So after a few bad UI attempts I thought – hey, wish I could just design a light sequence in Blender and run it with ALT-A. So that’s what I did.

On the arduino side it’s using the FastSPI and CmdMessenger libraries for LED and serial communications.

The Blender script just reads the diffuse color in r-g-b from each LED objects material and spits it out to the USB port. Getting the pyserial library hooked up in Blender wasn’t a breeze but the “sys.path.append” line should help anyone having the same issues I did.

Here’s the arduino code and Blender file

(Using Arduino Duemilanove 328 and LED strip with WS2801 chips)

EDIT:

Blendernation article (Thanks Bart!)

I forgot to mention I’m using Ubuntu so the sys.path.append thing wont work for windows, you’ll have to find the pyserial library solution elsewhere (there’s plenty of reference out there)

Also – the script runs on each frame change. Here’s how that works (WARNING: kinda hacky) http://funkboxing.com/wordpress/?p=236

QUESTION: For any API guru’s out there – currently this script opens and closes the serial port on each framechange. I know this is radically inefficient. Any ideas on how to keep the serial port open persistently but to close it when blender closes?

 

 

 

 

Aug 182012
 

I have to post this because I don’t know any other way to get in touch with this tech super-hero to say thanks for his work.

Hey Eirik Taylor, thanks buddy, you’re an inspiration and an outstanding reference.

You gave me a huge head start with the Android code for your BT car. I’d still be struggling with the BT Chat example in the SDK if it weren’t for all well commented code.

http://uzzors2k.4hv.org/index.php?page=welcome

https://sites.google.com/site/uzzors2k/home

His website has a bunch of great projects and his documentation is awesome and he posts all his code.

Thanks again buddy, hope you read this and it makes you feel warm and fuzzy.

 

Aug 162012
 

Here’s an Arduino LED backlighted sign I made.

Electronics are:
(1) Arduino Nano – $16
(1) Bluetooth TTL- $10
(23) Addressable LED Strip (SMD5050/WS2801) – $20

Then some foamcore, paint, and hot glue.

I’m using a android bluetooth terminal program to send serial commands to the arduino. Right now the program just calls ‘Modes’, which are different effects I hacked together in the arduino IDE. Later I’ll write a more versatile program so you can more directly control the LED’s with an Android app or something.

FYI – The Q is for Quixote Studios.

Dec 272011
 

This is an attempt to merge Blenders Dynamic Paint feature with cellular automata. It started as a python script but then became even more of an educational experience when I realized python wasn’t going to be fast enough to run conway’s life on a 64x grid, let alone a 4Kx one, which was my initial goal. These ended up being 512x grids. I could have gone bigger but I’m using a little netbook for all this so I didn’t go nuts.

After figuring out that python wasn’t going to be fast enough I set out to make a c++ version, not in Blender, just in c++. Long story short it’s an atrocity of loops inside a main function. I didn’t even bother to pass any arguments, just recompiled every time I changed paths. Anyway it ended up being lots faster than the py scripts and I finally had an excuse to write a function I knew very well in a language I’ve been intimidated by for some time (and still very much am).

The c++ code uses the ImageMagick++ library, which made things much easier, but you’ll have to get this lib if you want to compile and use this. Hopefully this whole process has prepared me to get on porting the lighting generator to c++, which really needs to happen if if it’s ever going to be more than a gimmick.

So anyway, here’s the c++ code and here’s the Blender python script that I abandoned in favor of doing it in c++. For the record- this is bad, bad code. Very bad. Also here’s the command line to compile with g++ and imageMagick++, since that took awhile to get past.

conway_cpp_py.zip

user@pc:~$ g++ `Magick++-config –cxxflags –cppflags` conway.cpp -o conway `Magick++-config –ldflags –libs`

Here’s the process for using this to dynamic paint with conways life.

1) dynamically paint a canvas with a brush. This will paint ‘live’ cells onto the canvas
Turn on ‘dissolve’ and set to dissolve in 1-3 frames. Otherwise these become ‘immortal’ cells, which makes for a weird simulation.
I used red channel only for these demos.

2) compile and run the c++ code.
This will run the simulation on the dynamic paint cache images. It runs the simulation from the initial frame, but always includes the red cells from the next dynamic paint frame so they will be used in the next simulation step.

3) use this simulation output as a map in place of the dynamic paint output.
Sounds easy, and it kind of is, and kind of isn’t.
So if you want to do this yourself- if you know c++ it should be easy. If you don’t it will be very hard. If you’re just learning c++ it may be worthwile to try.

Not sure where I’m going with all this, as usual it was just something to do. Hope you dig it.

 

 

Dec 182011
 

Here’s a simple script that lets you ‘bookmark’ camera positions.

It’s a little redundant since the same thing can be accomplished a number of different ways but after a discussion with another BR BUG member I thought I’d take a swing. So here’s the script (right-clk>save as)

camera_marks

Just uncompress, then copy the script to your addons folder and then activate.

You get a panel in the 3DView>Toolbar that lets you add, delete, and change marks.

 

 

 

 

 

It saves the loc/rot/dofdist/lens to a textblock called CAMERAMARKS. I know this is a hacky implementation but I’m a hack and that’s just what I do. It’s super rudimentary now but it was only about 3 hours of coding and most of that was looking through old code to remember how to setup the UI, which I needed a refresher on anyway so this was a good little project. So tell me what you think, if it’s useful, what it needs to become useful, etc.

Nov 242011
 

My family
Imagination
Resourceful Teachers
Peace wherever it can be found
Open-Source
Free Speech
Forgiveness
Mortality
Reeces peanut-butter cups
Coffee
The Christmas Truce
What I know
What I have to learn
Unabashed enthusiasm
The Apollo Program
Fallen Astronauts, Cosmonauts, and Tychonauts
Dedicated Engineers
Macgyver
Musicians with day jobs
Artists with soul
The “Not on My Watch” Attitude
Purpose
Solitude
The right tool for the job
The tool that works anyway
Opposable thumbs
Light
Rage against the dying of the light
Honey mustard
Creole mustard
Futurama
Albert Einstein
Sir Isaac Newton
Ton Rosendaal
Ludwig van Beethoven
Jonas Sark
Stomatopods, especially Peacock Mantis Shrimp
Caring Doctors and Nurses
Loyal Dogs
Friendly Ferrets
Tireless Horses
Deadly and beautiful creatures
Cameras with low f-stop telephoto Lenses
Brave but cautious nature photographers
Miester Eckhart
Dreams
Employing my demons for good
Anonymous gifts
SETI
Unselfish prayers
Originality
Luigi Serafini and The Codex Seraphinianus
Copper heat-sinks
Balsa Planes
The stone that missed my head when I was little
The poor Lego-man that was crushed by that stone instead
Model Rockets
Cannabis
Robert Heinlein
Ray Bradbury
Isaac Asimov
Douglas Adams
Firefly
Orsen Scott Card
When truth and reconciliation defeat revenge
When right breaks with law
When reason prevails over violence
Elegant solutions
Unapproachable enigmas
Commitment to quality
Chiropractors
Self-education
Wikipedia
Public Librarys
IEEE and ISO
Those sounds only I can hear
Knowing deep down where those sounds really come from
History
The future
This moment
Protecting something truly precious
The certainty that I am alone, but that we are not
Consequences
Elephants
Logos (The Word)
Wishing for nothing
The infinite, uncountable, and unquantifiable
Unknowable truths
Calculated defiance
Thich Quang Duc
Falon Gong
Tank Man
George Washington
Clair Cameron Patterson
Journalists with scruples
Terry Gilliam Films
Transcendence
Khentrul Lodrö Thayé Rinpoche
Beauty in all its forms
Especially the female form
Bernadette Peters
That girl, whether or not we ever find each other
The fact that the universe is witnessing itself through my eyes
The true belief that vanity is not an inevitable cost of consciousness
The undeserved gifts bestowed upon humanity by Gautama Buddha, Jesus of Nazareth and all those unknown souls that should be recognized as synonymous with those names.

Oct 292011
 

Here are pictures of some balsa planes I made with balsa planks (1″x12″) I got from a pallet of donated educational stuff. They were with the expendables marked for the mechanical demonstration ‘modules’ on the pallet. One of the modules probably cracked them under a given load. Now they are planes.

I still have a bunch of planks left too.

Hope you like. Thanks

Oct 262011
 

I recently received a FUNcube dongle SDR for filling in teaching a class. I don’t know much about HAM radio or SDR but I’ve been wanting to learn and now I have a great toy to motivate me to learn.

It took me awhile to get the thing recognized on Lubuntu. Had to add a rule in udev, also had to get qthid2.2 to update the firmware so I could use qthid3.1. Then had to compile quisk and finally started getting lots and lots of static.

Then I started reading more about HAM radio and found about about IF and OF and got far enough to get some garbled non-static from the local NPR station. Then I took a little video on my phone. Then I uploaded it to youtube, then I typed this. So here it is.

Looking forward to spending lots and lots of time learning and playing with this thing.

Maybe by next post I’ll have decoded some telemetry data from an AMSAT. That would be cool.