Skip to content

Commit

Permalink
manually forking hackrockcity/domeTransmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenstell committed May 14, 2012
1 parent 7b70ca4 commit d74a37a
Show file tree
Hide file tree
Showing 190 changed files with 983 additions and 0 deletions.
130 changes: 130 additions & 0 deletions Dacwes.pde
@@ -0,0 +1,130 @@
import hypermedia.net.*;

/**
* This class can be added to your sketches to make them compatible with the sign.
* Use Sketch..Add File and choose this file to copy it into your sketch.
*
* void setup() {
* // Constructor takes this, width, height.
* Dacwes dacwes = new Dacwes(this, 16, 16);
*
* // Change this depending on how the sign is configured.
* dacwes.setAddressingMode(Dacwes.ADDRESSING_VERTICAL_FLIPFLOP);
*
* // Include this to talk to the emulator.
* dacwes.setAddress("127.0.0.1");
*
* // The class will scale things for you, but it may not be full brightness
* // unless you match the size.
* size(320,320);
* }
*
* void draw() {
* doStuff();
*
* // Call this in your draw loop to send data to the sign.
* dacwes.sendData();
* }
*
**/

public class Dacwes {
public static final int ADDRESSING_VERTICAL_NORMAL = 1;
public static final int ADDRESSING_VERTICAL_HALF = 2;
public static final int ADDRESSING_VERTICAL_FLIPFLOP = 3;
public static final int ADDRESSING_HORIZONTAL_NORMAL = 4;
public static final int ADDRESSING_HORIZONTAL_HALF = 5;
public static final int ADDRESSING_HORIZONTAL_FLIPFLOP = 6;

PApplet parent;
UDP udp;
String address;
int port;
int w;
int h;
int addressingMode;
byte buffer[];
int pixelsPerChannel;

public Dacwes(PApplet parent, int w, int h) {
this.parent = parent;
this.udp = new UDP(parent);
this.address = "192.168.1.130";
this.port = 58082;
this.w = w;
this.h = h;
int bufferSize = 3*(w*h)+1;
buffer = new byte[bufferSize];
this.addressingMode = ADDRESSING_VERTICAL_NORMAL;
this.pixelsPerChannel = 8;

for (int i=0; i<bufferSize; i++) {
buffer[i] = 0;
}
}

public void setAddress(String address) {
this.address = address;
}

public void setPort(int port) {
this.port = port;
}

public void setAddressingMode(int mode) {
this.addressingMode = mode;
}

public void setPixelsPerChannel(int n) {
this.pixelsPerChannel = n;
}

private int getAddress(int x, int y) {
if (addressingMode == ADDRESSING_VERTICAL_NORMAL) {
return (y * w + x);
}
return 0;
}

public void sendMode(String modeName) {
byte modeBuffer[] = new byte[modeName.length()+1];

modeBuffer[0] = 2;
for(int i = 0; i < modeName.length(); i++) {
modeBuffer[i+1] = (byte)modeName.charAt(i);
}

udp.send(modeBuffer,address,port);
}

public void sendData() {
PImage image = get();

// if (image.width != w || image.height != h) {
// image.resize(w,h);
// }

image.loadPixels();

int r;
int g;
int b;
buffer[0] = 1;
for (int y=0; y<h; y++) {
for (int x=0; x<w; x++) {
//r = int(brightness(image.pixels[y*w+x]));
r = int(red(image.pixels[y*w+x]));
g = int(green(image.pixels[y*w+x]));
b = int(blue(image.pixels[y*w+x]));

buffer[(getAddress(x,y)*3)+1] = byte(r);
buffer[(getAddress(x,y)*3)+2] = byte(g);
buffer[(getAddress(x,y)*3)+3] = byte(b);
}
}

udp.send(buffer,address,port);
}
}


Binary file added data/AmericanTypewriter-16.vlw
Binary file not shown.
Binary file added data/Disorient-16.vlw
Binary file not shown.
Binary file added data/Disorient-8.vlw
Binary file not shown.
Binary file added data/FFFAtlantis-10.vlw
Binary file not shown.
Binary file added data/FFFAtlantis-16.vlw
Binary file not shown.
Binary file added data/FFFAtlantis-8.vlw
Binary file not shown.
Binary file added data/FFFAtlantis-9.vlw
Binary file not shown.
Binary file added data/anim-ddr/frame1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame10.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame12.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame13.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame14.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame15.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame17.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame18.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame19.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame20.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame21.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame22.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame23.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame24.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame25.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame26.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame27.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame28.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame29.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame31.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/anim-ddr/frame32.png
Binary file added data/anim-ddr/frame33.png
Binary file added data/anim-ddr/frame34.png
Binary file added data/anim-ddr/frame35.png
Binary file added data/anim-ddr/frame36.png
Binary file added data/anim-ddr/frame37.png
Binary file added data/anim-ddr/frame38.png
Binary file added data/anim-ddr/frame39.png
Binary file added data/anim-ddr/frame4.png
Binary file added data/anim-ddr/frame40.png
Binary file added data/anim-ddr/frame41.png
Binary file added data/anim-ddr/frame42.png
Binary file added data/anim-ddr/frame43.png
Binary file added data/anim-ddr/frame44.png
Binary file added data/anim-ddr/frame45.png
Binary file added data/anim-ddr/frame46.png
Binary file added data/anim-ddr/frame47.png
Binary file added data/anim-ddr/frame48.png
Binary file added data/anim-ddr/frame49.png
Binary file added data/anim-ddr/frame5.png
Binary file added data/anim-ddr/frame50.png
Binary file added data/anim-ddr/frame51.png
Binary file added data/anim-ddr/frame52.png
Binary file added data/anim-ddr/frame53.png
Binary file added data/anim-ddr/frame54.png
Binary file added data/anim-ddr/frame55.png
Binary file added data/anim-ddr/frame56.png
Binary file added data/anim-ddr/frame57.png
Binary file added data/anim-ddr/frame58.png
Binary file added data/anim-ddr/frame59.png
Binary file added data/anim-ddr/frame6.png
Binary file added data/anim-ddr/frame60.png
Binary file added data/anim-ddr/frame61.png
Binary file added data/anim-ddr/frame62.png
Binary file added data/anim-ddr/frame63.png
Binary file added data/anim-ddr/frame64.png
Binary file added data/anim-ddr/frame65.png
Binary file added data/anim-ddr/frame66.png
Binary file added data/anim-ddr/frame67.png
Binary file added data/anim-ddr/frame68.png
Binary file added data/anim-ddr/frame69.png
Binary file added data/anim-ddr/frame7.png
Binary file added data/anim-ddr/frame70.png
Binary file added data/anim-ddr/frame71.png
Binary file added data/anim-ddr/frame72.png
Binary file added data/anim-ddr/frame73.png
Binary file added data/anim-ddr/frame74.png
Binary file added data/anim-ddr/frame75.png
Binary file added data/anim-ddr/frame76.png
Binary file added data/anim-ddr/frame77.png
Binary file added data/anim-ddr/frame78.png
Binary file added data/anim-ddr/frame79.png
Binary file added data/anim-ddr/frame8.png
Binary file added data/anim-ddr/frame80.png
Binary file added data/anim-ddr/frame9.png
Binary file added data/anim-heart/frame1.png
Binary file added data/anim-heart/frame10.png
Binary file added data/anim-heart/frame11.png
Binary file added data/anim-heart/frame12.png
Binary file added data/anim-heart/frame13.png
Binary file added data/anim-heart/frame14.png
Binary file added data/anim-heart/frame15.png
Binary file added data/anim-heart/frame16.png
Binary file added data/anim-heart/frame17.png
Binary file added data/anim-heart/frame18.png
Binary file added data/anim-heart/frame19.png
Binary file added data/anim-heart/frame2.png
Binary file added data/anim-heart/frame20.png
Binary file added data/anim-heart/frame21.png
Binary file added data/anim-heart/frame22.png
Binary file added data/anim-heart/frame23.png
Binary file added data/anim-heart/frame24.png
Binary file added data/anim-heart/frame25.png
Binary file added data/anim-heart/frame26.png
Binary file added data/anim-heart/frame27.png
Binary file added data/anim-heart/frame28.png
Binary file added data/anim-heart/frame29.png
Binary file added data/anim-heart/frame3.png
Binary file added data/anim-heart/frame30.png
Binary file added data/anim-heart/frame31.png
Binary file added data/anim-heart/frame32.png
Binary file added data/anim-heart/frame33.png
Binary file added data/anim-heart/frame34.png
Binary file added data/anim-heart/frame35.png
Binary file added data/anim-heart/frame36.png
Binary file added data/anim-heart/frame37.png
Binary file added data/anim-heart/frame38.png
Binary file added data/anim-heart/frame39.png
Binary file added data/anim-heart/frame4.png
Binary file added data/anim-heart/frame40.png
Binary file added data/anim-heart/frame41.png
Binary file added data/anim-heart/frame42.png
Binary file added data/anim-heart/frame43.png
Binary file added data/anim-heart/frame44.png
Binary file added data/anim-heart/frame45.png
Binary file added data/anim-heart/frame46.png
Binary file added data/anim-heart/frame47.png
Binary file added data/anim-heart/frame48.png
Binary file added data/anim-heart/frame49.png
Binary file added data/anim-heart/frame5.png
Binary file added data/anim-heart/frame50.png
Binary file added data/anim-heart/frame51.png
Binary file added data/anim-heart/frame52.png
Binary file added data/anim-heart/frame53.png
Binary file added data/anim-heart/frame54.png
Binary file added data/anim-heart/frame55.png
Binary file added data/anim-heart/frame56.png
Binary file added data/anim-heart/frame57.png
Binary file added data/anim-heart/frame58.png
Binary file added data/anim-heart/frame59.png
Binary file added data/anim-heart/frame6.png
Binary file added data/anim-heart/frame60.png
Binary file added data/anim-heart/frame61.png
Binary file added data/anim-heart/frame62.png
Binary file added data/anim-heart/frame63.png
Binary file added data/anim-heart/frame64.png
Binary file added data/anim-heart/frame65.png
Binary file added data/anim-heart/frame66.png
Binary file added data/anim-heart/frame67.png
Binary file added data/anim-heart/frame68.png
Binary file added data/anim-heart/frame69.png
Binary file added data/anim-heart/frame7.png
Binary file added data/anim-heart/frame70.png
Binary file added data/anim-heart/frame71.png
Binary file added data/anim-heart/frame72.png
Binary file added data/anim-heart/frame73.png
Binary file added data/anim-heart/frame74.png
Binary file added data/anim-heart/frame75.png
Binary file added data/anim-heart/frame76.png
Binary file added data/anim-heart/frame77.png
Binary file added data/anim-heart/frame78.png
Binary file added data/anim-heart/frame79.png
Binary file added data/anim-heart/frame8.png
Binary file added data/anim-heart/frame80.png
Binary file added data/anim-heart/frame81.png
Binary file added data/anim-heart/frame82.png
Binary file added data/anim-heart/frame83.png
Binary file added data/anim-heart/frame84.png
Binary file added data/anim-heart/frame85.png
Binary file added data/anim-heart/frame86.png
Binary file added data/anim-heart/frame87.png
Binary file added data/anim-heart/frame88.png
Binary file added data/anim-heart/frame89.png
Binary file added data/anim-heart/frame9.png
Binary file added data/anim-heart/frame90.png
Binary file added data/anim-heart/frame91.png
Binary file added data/anim-heart/frame92.png
Binary file added data/anim-heart/frame93.png
Binary file added data/anim-heart/frame94.png
Binary file added data/anim-heart/frame95.png
Binary file added data/anim-heart/frame96.png
Binary file added data/anim-heart/frame97.png
Binary file added data/anim-heart/frame98.png
Binary file added data/anim-heart/frame99.png
Binary file added data/movies/hands.mov
Binary file not shown.
Binary file added data/movies/test.mov
Binary file not shown.

0 comments on commit d74a37a

Please sign in to comment.