click here to enter

Phone Radiation - Kingston hackSpace

Kingston hackSpace

Phone Radiation

By Joe Atkin, Brayden Ward and William Reuben, Graphic Design BA

A hologram that has a user interaction build in this is done by allowing people to text the device (Arduino) . This increases the radiation within the room which was shown visually through a morph: an image. This would change and expand by the number of text messages it receives; we programmed the Arduino to reply texts when it reached 15 texts. The message replied read 'Mobile phone radiation is present almost everywhere you go. We have created a visual response to the amount of radiation you are exposed to in this exact room at this exact time due to your text'.

The project makes use of an Arduino attached to a GPRS shield. The shield required an active phone SIM card, which could be programmed through the Arduino to send and receive texts to a series of numbers. The Arduino was then linked to a computer through a serial connection. A stream of integers was sent along the serial port based on the number of texts received through the GPRS shield. This data was interpreted by the processing applet converted into a series of animations that were played through the computer.

processing code


String[] sensors_list= new String[2];
String val;      // Data received from the serial port
int lf = 10;

Serial myPort;

void setup() 
{   fullScreen();
    background(0);

    String portName = Serial.list()[1];
    myPort = new Serial(this, portName, 9600);
   
    movie1 = new Movie(this, "FINAL_2.mp4");
    movie1.loop();    
}

void movieEvent(Movie m) {
  m.read();
}

void draw()
{
  
  if ( myPort.available() > 0) {  // If data is available,
        val = myPort.readStringUntil('\n'); 
        if(val!=null){
            val = trim(val);
            print(val);
        if(val.equals("0")){
              movieplaying = true; 
              threshold=5;
              }
        else if(val.equals("1")){
              movieplaying = true;
              threshold=10;
              fill(100,100,200);  
              }
       else if(val.equals("2")){
              threshold=15;
              movieplaying = true;
              }
       else if(val.equals("3")){
              threshold=20;
              movieplaying = true;
              }  
       else if(val.equals("4")){
              threshold=25;
              movieplaying = true;
              }  
       else if(val.equals("5")){
              threshold=30;
              movieplaying = true;
              }  
       else if(val.equals("6")){
              threshold=35;
              movieplaying = true;
              }  
       else if(val.equals("7")){
              threshold=40;
              movieplaying = true;
              }  
       else if(val.equals("8")){
              threshold=45;
              movieplaying = true;
              }  
       else if(val.equals("9")){
              threshold=50;
              movieplaying = true;
              }  
       else if(val.equals("10")){
              threshold=55;
              movieplaying = true;
              }  
       else if(val.equals("11")){
              threshold=60;
              movieplaying = true;
              } 
       else if(val.equals("12")){
              threshold=65;
              movieplaying = true;
              }  
       else if(val.equals("13")){
              threshold=70;
              movieplaying = true;
              }  
       else if(val.equals("14")){
              threshold=75;
              movieplaying = true;
              }  
       else if(val.equals("15")){
              threshold=80;
              movieplaying = true;
              }  
          }
      }
      if(movieplaying && (movie1.time()< threshold)){
           playmovie();
           }
      else{movie1.pause();}  
}

void playmovie (){
    image(movie1, 0 , 0, width, height);
    movie1.loop();
    movie1.noLoop();
}

arduino code



// Include the GSM library
#include 

#define PINNUMBER ""

// initialize the library instance
GSM gsmAccess;
GSM_SMS sms;

void setup() {
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  Serial.println("SMS Messages Sender");

  // connection state
  boolean notConnected = true;

  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while (notConnected) {
    if (gsmAccess.begin(PINNUMBER) == GSM_READY) {
      notConnected = false;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("GSM initialized");
}

void loop() {

  Serial.print("Enter a mobile number: ");
  char remoteNum[20];  // telephone number to send sms
  readSerial(remoteNum);
  Serial.println(remoteNum);

  // sms text
  Serial.print("Now, enter SMS content: ");
  char txtMsg[200];
  readSerial(txtMsg);
  Serial.println("SENDING");
  Serial.println();
  Serial.println("Message:");
  Serial.println(txtMsg);

  // send the message
  sms.beginSMS(remoteNum);
  sms.print(txtMsg);
  sms.endSMS();
  Serial.println("\nCOMPLETE!\n");
}

/*
  Read input serial
 */
int readSerial(char result[]) {
  int i = 0;
  while (1) {
    while (Serial.available() > 0) {
      char inChar = Serial.read();
      if (inChar == '\n') {
        result[i] = '\0';
        Serial.flush();
        return 0;
      }
      if (inChar != '\r') {
        result[i] = inChar;
        i++;
      }
    }
  }
}

 

 

Add comment


Security code
Refresh