tisdag 29 september 2015

Feedback Crit 29/9

  • We need to further explore how to make use of the pressure sensor in the best way 
    • Pressure level?
    • Air pressure?
    • Mechanical pressure?
  • Or we have to try find another way of deciding what color the cubes should display
  • If we need more materials we have to buy it our selves
  • Build two cubes in total, for financial reasons
  • The higher tower the greater visual reward
By: Carolina, Josefine, Lennart, Julius

Prototyping

We have continued working with the bluetooth connection. Currently a mobile phone acts as a serial server that can send and receive information. Our Arduino setup consists of the bluetooth, one RGB-LED light and a pressure sensor. The light can only be changed at the exact moment a command is sent from the mobile. When a command is sent the program compares the command to the pressure registered from the sensor and sets the light to the highest ranking color.

Blue: Lowest pressure
Red: Medium pressure
Green: Highest pressure



Setup before the pressure sensor was added


Code

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 16); // RX, TX

int r = 4;
int g = 3;
int b = 2;

void setup() {

  Serial.begin(9600);
  
  pinMode(r,OUTPUT);
  pinMode(g,OUTPUT);
  pinMode(b,OUTPUT);
  
  mySerial.begin(9600);
}

void loop()
{  
  while (mySerial.available()){
    int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
    float voltage = sensorValue * (3 / 1023.0);
    
    char test_sensor;
    if(voltage>=2){
      test_sensor = 'r';
      }
    else if(voltage>=1){
      test_sensor = 'b';
      }
    else if(voltage>=0){
      test_sensor = 'g';
      }
    char test = mySerial.read();
    digitalWrite(r,LOW);
    digitalWrite(g,LOW);
    digitalWrite(b,LOW);
    if(test=='r' or test_sensor == 'r')
    {
      digitalWrite(r,HIGH);
      Serial.println(voltage);
    }
    else if(test=='b' or test_sensor == 'b')
    {
      digitalWrite(b,HIGH);
      Serial.println(voltage);
    }
    else
    {
      digitalWrite(g,HIGH);
      Serial.println(voltage);
    }
  }
}

By: Carolina, Josefine, Lennart, Julius

fredag 25 september 2015

Hack Lab - Bluetooth

Carolina and Josefine started the hack lab with a bit of research on how to connect the bluetooth to the Arduino. We then realized that we had to solder the pins to the Arduino pro micro board so that it would connect properly. We had a bit of a problem with this because we didn't know the basics of soldering. Mattias helped us to correct our mistakes (thanx!). After the mistake the connections where tested so that the pins worked properly.

At this time Julius joined us and we started to actually connect the bluetooth. This didn't work as it should. We found a lot of different examples online, that looked a lot a like, but none worked for our equipment. We also tried with an Arduino Uno but the same issues occurred as with the pro micro. We got the program to run in the end but no flow of information were detected.


By: Carolina, Josefine 

måndag 21 september 2015

Feedback on crit 21/9


  • The kids might be able to learn how to count or different colors
  • If the idea doesn’t work maybe it’s enough that the cubes change color in any way
  • It might be enough if the cubes just go back to blue if the tower fall
  • There need to be enough light from the cubes so that they work in daylight
  • Sound that confirms the color for learning purposes
  • Put the pressure sensor diagonally inside the cubes and fill them up with something (e.g. cotton) to make the sensor detect pressure on every side
  • Magnets instead of pressure sensors
  • Make the cubes so that they only fit one way, one side convex and one concave, makes the convex like a button
  • Surface to build on and the electricity comes from beneath the blocks
  • Conductive thread through or on the edges
  • Cylinder instead of blocks to reduce the number of sides
  • Inspiration from “the tower of hanoi”


By: Carolina, Josefine, Lennart, Julius 

fredag 18 september 2015

Hack lab - Further Arduino + Mockups

Today we continued tinkering with the Arduino but this time with a more goal oriented way of trying it out. We wanted to try out how well the pressure sensor worked and with that make different LED's light up as the sensor got pressed harder, with great success as can seen in the video below.



We also made the some early mockups with some regular paper together with markers to try out the size and feel for how they turned out to be. Colors are of course not set in stone but it is interesting to just quickly get a feel for how the size of the cubes is more graspable by just making a couple of mockups. A quick Gif below shows how one scenario of the blocks could work out, with the white block at the beginning being turned off and then how the colors changes depending on how high you stack them.



By: Lennart, Carolina, Josefine