We’re done and it’s only Friday???`

Whaddup it’s ya boyz tori and kyle.

We did a few things this weekend.

Code: 

Tori made some words in a document and made them randomize on screen. She also figured out how to call specific characters which will be useful for later. Also, we got a dope hangman sketch. Here’s the code and a video:

Text text = new Text();

PImage hangman;
boolean one = false;
boolean two = false;
boolean three = false;
boolean four = false;



void setup() {
  fullScreen();
}


void draw() {
  background(255);
  hangman = loadImage("hangman.gif");
  image(hangman, 100, 100, 1000, 1000);
  noFill();
  strokeWeight(5);


  if (one == true) {
    ellipse(785, 355, 150, 150);
  }
  if (two == true) {
    line(785, 430, 785, 720);
  }
  if (three == true) {
    line(785, 720, 755, 780);
    line(785, 720, 815, 780);
  }
  if (four == true) {
    line(785, 480, 755, 580);
    line(785, 480, 815, 580);
    
    text("GAME OVER", width/2, height/2);
  }
  
  
    text.run();
  }

  void keyPressed() {


    if (key == '1') {
      one = true;
    }
    if (key == '2') {
      two = true;
    }
    if (key == '3') {
      three = true;
    }
    if (key == '4') {
      four = true;
    }
  }

 

class Text {

  float data[];
  int number = int(random(0, 6));
  int size = 60;

  Text() {
  }

  void run() {
 
    String[] message = loadStrings("words.txt");
 
 
    data = float(split(message[number], ","));
    fill(0);
    textSize(size);
    text(message[number], width/2 + 400, 700);
    text(message[number].charAt(3), width/2, height/2);    //now how do I get that to respond to an input...I don't think I can rn without connecting it to an input 
    if (keyPressed && (key == ' ')){
      number = int(random(0, 6));
    }
  }
}

I’m controlling the word randomization using the space bar. The hangman appears using the number keys 1-4 (based on # of errors in the future)

Physical Stuff: 

Kyle focused more on the physical stuff this weekend. He prototyped a panel using conductive copper fabric that we got from the Engineering Design Studio and some felt in between the two layers. He then got some poky pins and made a circuit using his arduino. He ran a bunch of trials to make sure that he could complete the circuit multiple times (upwards of 50-100) without the cicuit breaking or wearing down. We expect to complete more of these tests in the future, especially when we recieve the darts, which we ordered today and should be arriving on Monday or Tuesday.

Here is a picture of the failed attempt with conductive foam. We realized that this was not conductive enough to complete the circuit. 

Here’s a video and some pictures of the final prototype panel!

Leave a Reply