Coder Social home page Coder Social logo

love-potion-camp's Introduction

Love-Potion-Camp

Tranceporter II Code related to the Burning Man camp called Love Potion.

Tranceporter II is an amazing art car with thousands of LED's that display beautiful animations timed to music.

Processing

The display code runs in a Java-based programming environment called "Processing". Each animation is called a "Sketch". To install Processing on your computer, get the latest version here. Note that you will need at least version 2.0.

Test that you can run one of the sample Sketches that comes with Processing.

Libraries

You will need to install some Java Libraries that the code depends on. The libraries should go in your "sketchbook" folder. The path can be found in Processing preferences. My path looks like this:

/Volumes/Data/skotchvail/Documents/Processing/Libraries

Get the libraries here and move them into your Libraries folder. Ask Skotch for box permission if needed.

If you are not going to drive the LED's

If you are going to drive the LED's, then skip this section.

Life is easier if you don't have to install the TotalControl drivers. If that is your case, you will need to modify some code to get everything to run. Go to TotalControlConsumer.PDE and comment out the import line like this:

 // import TotalControl.*;

Next rename the class TotalControlFake so that it looks like this:

 static class TotalControl

That should be enough to bypass the driver. Be sure that you do not checkin these changes. They are only to allow your system to run with a partial install.

Skip the next section and go to "Test and Run"

Setup to drive the LED's

Using the hardware depends on an interface library that in turn depends on the D2XX library. If you are not going to be driving the hardware, but just want to use the simulation, then you don't need to do this.

Download the latest D2XX library drivers.

Use the following steps to install on your OS X (these assume you have copied the D2XX directory to your desktop):

  1. Open a Terminal window (Finder->Go->Utilities->Terminal).
  2. If the /usr/local/lib directory does not exist, create it
    sudo mkdir /usr/local/lib
  3. if the /usr/local/include directory does not exist, create it
    sudo mkdir /usr/local/include
  4. Copy the dylib file to /usr/local/lib
    sudo cp ~/Desktop/D2XX/bin/10.5-10.7/libftd2xx.1.2.2.dylib /usr/local/lib/
  5. Make a symbolic link
    sudo ln -sf /usr/local/lib/libftd2xx.1.2.2.dylib /usr/local/lib/libftd2xx.dylib
  6. Copy the D2XX include file
    sudo cp ~/Desktop/D2XX/Samples/ftd2xx.h /usr/local/include/
  7. Copy the WinTypes include file
    sudo cp ~/Desktop/D2XX/Samples/WinTypes.h /usr/local/include/
  8. You have now successfully installed the D2XX library.

Make the PaintYourDragon stuff:

$ git clone git://github.com/PaintYourDragon/p9813.git

On Skotch's Mac, he had to modify the two Makefile's (p9813/Makefile and p9813/Processing/Makefile) to use CC = llvm-gcc-4.2 but only try this if you are getting compile or link errors.

If that doesn't fix things, you might want to try the older instructions tried to use a patch found in the parent dir of Love-Potion-Camp checkout: $ patch -p0 < ../Love-Potion-Camp/patch.txt

In any event, you need to run both Makefiles from the command line.

$ cd p9813
$ sudo cp p9813.h /usr/local/include/
$ make clean && make
$ cd processing ; make clean && make && make install

An unfortunate artifact of the Mac and Linux versions of the FTDI driver is that the "Virtual COM Port" kernel extension must be disabled before the p9813 library can be used. Applications such as Arduino depend on the serial port for programming and communication, so these cannot be used at the same time.

Be sure to run

$ make unload

in the p9813 directory before running our app if you have the FTDIUSBSerialDriver installed. When you are done, don't forget to run make load or your other other serial communication such as Arduino programming will not work.

Test and Run

That should be enough to get the simulation to run on your computer. You should be able to load and run TranceporterIIProcessing.pde. You will see an image of the bottle and some animations.

If you get a UnsatisfiedLinkError, try running processing in 32 bit mode to see if it works.

Adding Sketches

See the document ImportingSketches.md for info on how to add Sketches to the system.

Code notes

Processing has a frame buffer. We can read the pixels from that frame buffer and then send them to the LED "Total Control" code.

love-potion-camp's People

Contributors

rdosser avatar ontokyotime avatar ryanobjc avatar ssilverman avatar

Stargazers

 avatar paling avatar  avatar  avatar Gregory V Tomei avatar  avatar  avatar  avatar

Watchers

Gregory V Tomei avatar  avatar  avatar Helge Munk Jacobsen avatar Eugene Feingold avatar  avatar  avatar  avatar  avatar

love-potion-camp's Issues

Review merge

Sanity check on Skotch's merge of my BeatDetector stuff and his latest revisions.

Fix bug that causes programming mode to be not compatible with animation mode

There are two modes in the program

  1. shows the various animations, including the test pattern
  2. colors the LED's based on their locations on the strand to make programming easier.

When in mode 2, we were having some memory issues and had to change code each time we wanted to switch from one mode to the other. We should be able to switch modes programmatically.

API for acceleration detection

Get the hardware working and write an API for acceleration detection. It would be nice if also worked with accelerometers built into the Macbooks so that we can test our animations wihtout having access to the actual Mac Mini that goes on the bus.

Document various keystokes

The program can be controlled either from iOS or from the keyboard. During the development phase, the keyboard is most important. We should document the various key strokes and what they do.

Best of all would be an actual GUI that came up and showed what key strokes there are. It doesn't have to be pretty, and it should go away when not needed.

If this is too hard, writing up a markdown or wiki document should be good enough. As people add new keystrokes, they need to update the information..

Get Mac Mini setup on bus working

We need to be able to see the monitor and program the Mac Mini while it is on the playa. This needs to be proven while we are still in the bay area.

Monitor
Keyboard
Network with Router
iPhone can find server if needed
Controllable from VNC
Audio In
Accelerometer

Remove debugging stuff

Rdosser's committed BeatDetection included spurious debugging delay/println pairs in TranceporterIIProcessing.pde. Remove that shit.

Better Pattern than grid as test pattern

There was some problem with the test grid not "popping" the flaws in the programming. Requires some thought, but we might be able to come up with a pattern that really does show flaws much easier.

In any case, having each square of the checkerboard be a very unique color (needs to be tested on the real LED's) would be a huge help.

On the computer, black out pixels that are not associated with LEDs

Currently we show the Sketch in a rectangle on the computer screen. We need to keep this mode as an option, but there needs to be another mode that blacks out any pixels that are not associated with an LED.

This is critical to testing animations to see if they will appear correctly on the art car.

Better Beat Detection with Equilizer Sketch

Last year beat detection looked iffy. It seemed to work okay on some music and not great on others. It never felt very crisp. It is not clear if our beat detection code is flawed, or if it was the color changing code, or the various scaled inputs that controlled the detection, or the animations themselves.

Focus on the beat detection and get the code working well for various kinds of music. Create an Equalizer Sketch that does not use the color changing code or the scaled inputs to isolate the problems and prove that the beat detection is now crisp and solid.

Read and write a data file in real time for programming the location of the LEDS

Currently the location of the LED's is set in code. Instead, it should be read from disk in files that can change. Use some human readable / modifiable format like XML. The program will also need to be able to write out this format. It should be based on the existing code format that we have worked out, at least as a starting point.

We will also want to have these data files checked into Git, even though they are modifiable in real time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.