Group 5: Dance Your Cares Away

Group 5: Dance Your Cares Away

 whatsapp-image-2018-12-14-at-22-54-22

https://docs.google.com/document/d/17KURx8dIBfWgsiJA62ZitXqxUBwUmI5AgYjPVC-x3Hs/edit?usp=sharing

Maker Manual

Meeting #1,

Planning Session: 20th November

Making a tasks list and Gantt chart for the future meetings and important deadlines set for ourselves. Assigning research to each member for the next meeting, making a list of possible components needed to make the order process smoother.

Tasks and meetings:

  • Updating the design blog
  • Gantt chart
  • Project task list
  • Research on sensors
    • Flex
    • Accelerometer
    • Tilt
    • Data inputted and used
  • Research on coding required and existing projects
    • Sway beads on kabokant.com
  • Research on Adafruit Flora
  • Meeting to discuss findings and finalise the project
    • Drawing/sketch
    • Materials list
    • Design the finalised bra
  • Email to order materials
  • Low-fi prototype 1A
    • Arduino board, sensors interaction with LEDs
    • Pseudocode
    • Test code
  • Low-fi prototype 1B
    • Attach LEDs and sensors to bra and test on Arduino
  • Redesign and sew bra based on prototype 1B
  • Low-fi prototype 2
    • Flora board, sensors interaction with LED strip
    • Display different patterns
    • Pseudocode
    • Test code
  • Final prototyping phase
    • Coding Flora
    • Put together Flora and bra
  • Final working prototype
  • Maker Manual
    • Overview section with pictures/video and description of the final product
    • Tools and supplies section with details of elements required to be made
    • Layout and circuit diagram section
    • Building section, making the physical aspects of the project
    • Code section with comments and sketches
    • Discussion of testing conducted and known shortcomings
  • Online Portfolio

Possible materials to order:

  • Flora Adafruit
  • Fabric for leotard
  • Fabric for bra
  • Flex sensors/fabric
  • Beads
  • RGB LEDs/LED strip
  • Conductive thread/wire

gantt-chart


Meeting #2,

Brainstorming Session: 21st November

Discussing the research that was made beforehand to fully comprehend the spectrum of our project. Deciding on the project idea and its execution. Sketching the bodysuit and bra, finding the right sensors and interactions to match the movement and music. The project includes a dance bodysuit with knitted flex sensors on it to detect movement, then the bra would have a microphone at the back to detect the music’s beat. LED strips and LEDs would then be added on the bodysuit and bra. The movements would affect the LEDs’ pattern, the brightness and the colour of the LEDs flashing. The microphone, on the other hand, would determine the speed of the animation through the tempo of the music.

whatsapp-image-2018-11-21-at-5-01-11-pm-1


Meeting #3,

Low-fi Prototype 1A: 25th November

Wiring fabric containing knitted flex sensor to the circuit to test the output on the Serial Monitor. Several tests and attempts including: lighting up LEDs to find thresholds, calibrating the fabric in the code, trying to stretch the fabric and inspect the values on the Serial Monitor. The flex sensor proved very temperamental to work with, making the results quite unreliable.

whatsapp-image-2018-11-27-at-12-18-52-pm


Meeting #4,

Low-fi Prototype 1B: 27th November

Twisting the legs of LEDs to make a hook that can be sewn on the bra using wires and conductive thread. Calibrating the flex sensor for accuracy and a reliable answer with a threshold, changing the code in order to get an input on the Serial Monitor.


Meeting #5,

Low-fi Prototype 1B: 2nd December

After receiving the sound module, sketches were made to test the detection of sound and the beat of the music. The sound module, unfortunately, cannot detect the beat, just the presence of sound. Different attempts were made with Arduino to check for sound detection and increase sensitivity and threshold to test.

whatsapp-image-2018-12-11-at-12-20-55whatsapp-image-2018-12-11-at-12-20-55-1


Meeting #6,

Final Project: 4th December

Preparing the RGB LEDs, white LEDs, wires and coding the final prototype. These elements are essential and need preparation before sewing. The LEDs legs were twisted to be sewn after differentiating anode and cathode. Wires were colour-coded, cut and placed in advance on the bra.


Meeting #7,

Final Project: 9th December

Sewing LEDs on the bra and white LEDs in columns to act as strips on the mesh bodysuit. Preparing resistors to be sewn.  As a substitute for the LED strips, 20 LEDs were wired in a column on the bodysuit, 10 on each side and 6 shift registers were placed in between for easy wiring of the LED bra and the strips.


Meeting #8,

Final Project: 10th December

Preparation of the 330 Ohms and 560 Ohms for the RGB LEDs and white ones. Coding and figuring the number, grouping and the placement of the shift registers. Wiring everything together, and testing it. The conductive thread was very unreliable for a constant connection, use of wires in between LEDs by hooking them to LEDs and resistors. The connection was not always reliable which cause the LEDs to not always light up or required someone pushing on the fabric to force the wires to touch each other. The LEDs on the bra were grouped by 5 to give us 30 LEDs, this mapped out to give a star effect all over it. This also includes the attribution of LEDs to the registers.

whatsapp-image-2018-12-10-at-15-56-34whatsapp-image-2018-12-10-at-16-10-42

whatsapp-image-2018-12-11-at-12-20-50


Code

//declare pinsU
int serialIn = 0;
int registerClk = 1;
int serialClk = 12;
int serialClr = 9;

int scrollVal = 0;
int turnPin = A10;

//boob groups
int groupBrightness = 10;       //blinking tempo for fading effect
int groupOn = 0;                //the group that will be on

int leftLine[10] = {19, 20, 21, 22, 23, 24, 25, 26, 27, 28};  
//holds the position of each LED
int rightLine[10] = {29, 30, 31, 32, 33, 34, 35, 36, 37, 38}; 
//as above

//loop and tempo related declarations
int current = 295; //number count down
int rounds = 1;
int tempo; //delay after each round

//colour related variables
int c = 0; 
//variable for storing at which point in the colours array to show.
int colours[] = {1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1}; 
//array to store the pattern for the colours
//stores rgb colours
//1 for on
//0 for off

void setup() {
  //setting the mode of the pins
  pinMode(serialIn, OUTPUT);
  pinMode(registerClk, OUTPUT);
  pinMode(serialClk, OUTPUT);
  pinMode(serialClr, OUTPUT);

  //setting the initial pin values
  digitalWrite(serialIn, LOW);
  digitalWrite(registerClk, LOW);
  digitalWrite(serialClk, LOW);
  digitalWrite(serialClr, LOW);

  //clearing out the registers
  digitalWrite(registerClk, HIGH);
  digitalWrite(registerClk, LOW);
  digitalWrite(serialClr, HIGH);
  Serial.begin(9600);
}

//contains everything that happens in a single moment,
// determined by the delay
void loop() {
  digitalWrite(registerClk, LOW);         //resets the clock
  scrollVal = analogRead(turnPin);
  Serial.println(scrollVal);
  int tempo = map(scrollVal, 0, 1023, 10, 500);

  //fade in/out moment, dependant on group of LEDs
  int remainder = current % groupBrightness;
  char fade = 0;                        //0 is fade in , 1 is fade out
  Serial.println(current);
  Serial.println(remainder);
  if (remainder == 0) {
    callmLED(groupOn);
    Serial.println(groupOn);
    Serial.println("done here");
    if (fade == 0) {
      rounds++;                         //adding rounds
      if (rounds == 5) {
        //below swaps fade to fade out
        groupBrightness --;
        if (groupBrightness == 0) {
          fade = 1;
        }
      }
    } else if (fade == 1) {
      rounds--;                         //subtracting rounds
      if (rounds == 0) {
        //below swaps fade to fade in/out
        groupBrightness ++;
        if (groupBrightness == 10) {
          fade = 0;
          Serial.println(fade);
          //groupOn ++;
        }
      }
    }
  } else {
    groupOFF();
  }
  callSingleLED(rounds);
  digitalWrite(registerClk, HIGH);      //sends the signals down.
  if ( current == 0) {
    current = 295;
    //groupOn = groupOn + 1;
    Serial.println(groupOn);
    if (groupOn == 3) {
      groupOn = 0;
    }
  }
  if ((current % 10) == 0) {
    changeColour;
  }
  delay(tempo);
  current --;
  if (current == 0) {
    current = 255;
  }
}

void changeColour() {
  c = c + 3;
  //below resets the c variable back to zero so that the cycle continues
  if ( c == 21) {
    c = 0;
  }
}
//1. calling group led types. multicolour
//total 30 LEDs, 3 groups

void groupOFF() {
  for (int i = 0; i < 6; i++) {
    allOFF;
  }
}

//calls the coloured LED
void callmLED(int i) {
  if (i == 0) {
    allON;
    allOFF;
    allOFF;
    allON;
    allOFF;
    allOFF;
  }
  if (i == 1) {
    allOFF;
    allON;
    allOFF;
    allOFF;
    allON;
    allOFF;
  }
  if (i == 2) {
    allOFF;
    allOFF;
    allON;
    allOFF;
    allOFF;
    allON;
  }
}

//calls the led "strips"
void callSingleLED(int ledNumber) {
  int leftonLED = leftLine[ledNumber];
  int rightonLED = rightLine[ledNumber];

  //left line turn all off aside from main
  for (int offLed = leftLine[0]; offLed < (leftonLED - 1); offLed++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
  for (int onLed = 0; onLed < 1; onLed++) {
    digitalWrite(serialIn, HIGH);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
  for (int offLed = leftonLED; offLed < leftLine[10]; offLed++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
    //below repeated for the right line.
    for (int offLed = rightLine[0]; offLed < (rightonLED - 1); offLed++) {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
    for (int onLed = 0; onLed < 1; onLed++) {
      digitalWrite(serialIn, HIGH);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
    for (int offLed = rightonLED; offLed < rightLine[10]; offLed++) {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
  }
}

//turns all the multicoloured LEDs OFF
void allOFF() {
  for (int i = 0; i < 3; i++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
}

//turn numbers on, for whichever numbers on RGB colourings
void allON() {
  for (int i = 0; i < 3; i++) {
    int colour = colours[i + c];
    if (colour == 1) {
      digitalWrite(serialIn, HIGH);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    } else {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
  }
}

Maker Manual

Click on this link to be able to follow the Maker Manual for our project.

 

group5