Wednesday, October 3, 2018

NEW MEDIA TECH : FINAL ASSIGNMENT

THE MOBILE TRASH BIN


As for final project, i have made a mobile trash bin which can move by a mobile device and open on its own  

Designing.


upon sketching i first see what i  find  thing are available  and what i can purchased to build with,  after that i begin the sketch to visualize what i it will be.



Development.

when it come to build the machine, its wasnt the hardest part until i reach the certain  point which i explain later. but for now, here what the material i used build:

ROVER 5
KS0007 motor shield driver
Arduino uno
Ultrasonic sensor
Micro servo 9g
Battery box 6 platform
Bluetooth hc-05 

once we have the material now its time too build . 

step 1: wiring the chassis rover


might jumble up in your point of view but here  how the wiring will look like




step 2: wiring the servo and the sensor

both servo and sensor are in place

and connected to the  bread board

 this here the basic on how it connect the sensor and the servo along with the arduino


CODING

coding is one of the hardest part for as i had multiple trial and error through out my mid and late  development as if now here the code.

this is coding for the Servo and sensors

#include<Servo.h>                //Adding the Servo library

Servo myservo;            //Define an object named MyServo
const int eko=8;        
const int trig=7;        
int mesafe;
int sure;

void setup() {
  myservo.attach(9);           // arduino to the servo motor
  pinMode(trig,OUTPUT);        
  pinMode(eko,INPUT);          
}

void loop() {
  myservo.write(0);       
  Serial.begin(9600);     
  

   
  digitalWrite(trig, LOW);         
  delayMicroseconds(10);
  digitalWrite(trig, HIGH);       
  delayMicroseconds(20);
  digitalWrite(trig, LOW);         
  sure = pulseIn(eko, HIGH);      
  mesafe= (sure/29.1)/2;  
  

  if(mesafe<=5){
    myservo.write(160);
    delay(5000);   
  }
  
   
  if(mesafe>200)
mesafe=200;
Serial.print("mesafe");
Serial.println(mesafe);
delay(500);
}

and here for the motor 


#include <AFMotor.h>

AF_DCMotor motor2(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
AF_DCMotor motor1(1, MOTOR12_64KHZ);
int state = 0;

void setup() 
{
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Welcome: Forward = 1 Left = 2 Right = 3 Backwards = 4 Stop = 0");
  motor2.setSpeed(1100);     // set the speed to 200
  motor1.setSpeed(1100);     // set the speed to 200
}

void loop(){   //if some data is sent, read it and save it in the state variable

if(Serial.available() > 0)
  {
    state = Serial.read();
    Serial.print("I received: ");
    Serial.println(state);
    delay(10);
if (state == '0') 
    {
      motor2.setSpeed(200);     // set the speed to 200/255
      motor1.setSpeed(200);     // set the speed to 200/255
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      Serial.println("Stopped");
      delay(100);
      state = 0; 
    }
else if (state == '1')      // If 1 Forwards
    {
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      motor2.setSpeed(200);     // set the speed to 200
      motor1.setSpeed(200);     // set the speed to 200
      motor2.run(FORWARD);      // turn it on going forward
      motor1.run(FORWARD);      // turn it on going forward
      Serial.println("Forward");
      delay(100);
      state = 0; 
    }
else if (state == '2')      // If 2 Turn Left
    { 
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward  
      motor1.setSpeed(255);     // set the speed to 200/255
      motor1.run(FORWARD);
      //motor2.run(BACKWARD);      
      Serial.println("Left");
      delay(100);
      state = 0;     
    }
else if (state == '3') {    // If 3 Turn Right
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      motor2.setSpeed(255);     // set the speed to 255
      motor2.run(FORWARD);      
      //motor1.run(BACKWARD);    
      Serial.println("Right");
      delay(100);
      state = 0;  
    }
else if (state == '4')       // If 4 Backwards
    {
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      motor2.setSpeed(200);      // set the speed to 200
      motor1.setSpeed(200);      // set the speed to 200
      motor2.run(BACKWARD);      // Motor 2 backwards
      motor1.run(BACKWARD);      // Motor 1 backwards
      Serial.println("Backward");
      delay(100);
      state = 0;   
    }
else if (state == '5') 
    {
      motor2.run(RELEASE);      // turn it on going release
      motor1.run(RELEASE);      // turn it on going release
      motor2.setSpeed(255);     // set the speed to 255
      motor1.setSpeed(140);     // set the speed to 140
      motor2.run(FORWARD);      // Motor 2 forward
      motor1.run(FORWARD);      // Motor 1 forward
      Serial.println("Forward Right");
      delay(100);
      state = 0;   
     }
else if (state == '6') 
    {
      motor2.run(RELEASE);      // turn it on going release
      motor1.run(RELEASE);      // turn it on going release
      motor1.setSpeed(255);     // set the speed to 255
      motor2.setSpeed(140);     // set the speed to 140
      motor2.run(FORWARD);      // Motor 2 forward
      motor1.run(FORWARD);      // Motor 1 forward
      Serial.println("Forward Left");
      delay(100);
      state = 0;   
     }
else if (state == '7')       // If 4 Backwards
    {
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      motor1.setSpeed(255);     // set the speed to 255
      motor2.setSpeed(140);     // set the speed to 140
      motor2.run(BACKWARD);      // Motor 2 backwards
      motor1.run(BACKWARD);      // Motor 1 backwards
      Serial.println("Backward Right");
      delay(100);
      state = 0;   
    }
else if (state == '8')       // If 4 Backwards
    {
      motor2.run(RELEASE);      // turn it on going forward
      motor1.run(RELEASE);      // turn it on going forward
      motor2.setSpeed(255);     // set the speed to 255
      motor1.setSpeed(140);     // set the speed to 140
      motor2.run(BACKWARD);      // Motor 2 backwards
      motor1.run(BACKWARD);      // Motor 1 backwards
      Serial.println("Backward Left");
      delay(100);
      state = 0;   
    }
else if (state >= '9')
    {
      Serial.println("Invalid");
      delay(100);
      state = 0; 
    }
  }
}


note; some of these will not work without AFmotor library which use to made the motor functional.


Now for the next part make the remote control using android or any mobile phone which created using html, css or javascript.


this is the most challenging and difficult to do alone and mostly struggle understanding using of CSS and javasript which i have no basic knowledge of css and javacript.


for my easy way for me to create a simple remote control is by using a APP inventor

below here is how i create the button and functions.



overall  based on my development , most of the coding i have use are sometime able to control the trash bin using the app inventor .
due to my zero knowledge of basic html,css, and javaScript i had to use the apps inventor which i had failed too meet the requirement for my lecturer.

as for now i really need to learn more in basic CSS and JavaScript.


Tuesday, October 2, 2018

NEW MEDIA ART 1 : assignment 1

LIFE GROW ALONG


above is inaccurately based for the psychical replica

Description -
For  my final assignment for  MA1 ,i have  created a Sculpture using a  clay 
Creating the Creation -
based on the artwork above i have to creating it with large amount of hard clay and wax color,
in order to form the shape i have design it the frame with copper wire and cardboard box fer the shape.
later on cover the frame with clay and add wiring to the sculpture along with it.
The hard part of development-
as for hardest part is to maintain the clay in shape when it starting to dry, unfortunately once it dry it quite brittle, so i had to redo the modeling and add more metallic wire inside the modeling as it dry along. later on i had to create a wiring circuit .
Expression-
base on the sculpture, it represent the tree and fruit it bear on the tree and glow ever brightly
the tree represent the growth and the fruit represent the effort it bear such as hope ,future and happiness.
The sculpture
the psychical sculpture has been given to madam Tengku puteri  for submission , which have no image to represent the original sculpture . this assignment was such a old work which i have no data to preserve it.  


Tuesday, August 7, 2018

Journal 2: Mobile Device with Installation Art



1) UNNUMBERED SPARKS

The sculpture spanned 745 feet between buildings in downtown Vancouver, Canada from March 15-22, 2014 (map). At night, it came alive with illumination. 

Visitors with smartphones and tablets were able to paint vibrant beams of light across the sculpture at a remarkable scale: small movements on their phones became hundred foot long trails evolving and combining with fellow participants.

software part:
Unnumbered Sparks was built entirely in Google Chrome, with the help of WebGL and several modern web technologies.

in order to interact with the sculpture is by connect to their wi-fi and will be prompted to their website to

hardware part:
Unnumbered Sparks is projection mapped by multiple super bright  projectors






reference;







.2) PICK N PLAY by mcdonalds

Pick n' Play is an interactive challenge where you can pick and play for your favorite McDonald's goodie.

software part:
the user has no requires to download any application but simply go to their website and the phone will verify that you are in the game location  and simply control the game through  your mobile device ,


hardware part:
the most important device is using personal smart devices to access the webpage and you will interact with the public billboard

Journal 1: kinect & Kinect 2.0

What is kinect?

Kinect is a line of motion sensing input devices that was produced by Microsoft for Xbox 360 and Xbox One video game consoles and Microsoft Windows PCs. 

It enables the users to control and interact with their consoles/computer without the use of the controllers through a natural user interface using gestures and spoken commands.

COMPARISON BETWEEN KINECT AND KINECT 2.0



Ways to Use Kinect & Kinect 2.0

both kinect can be use in both interaction which is by motion and sound which to refer as by gesture and  voice command. 

Gestures
kinect can detect with motion but like other new devices it requires a gesture to perform a simple command such as hand swipe, grip, finger point and tap

Voice Command
kinect can be interact with a specific voice command which the device can understand but it depend on command its was given.   

Ways the Kinect & Kinect 2.0 works





Thursday, March 1, 2018

Media Arts Design 4



My Project for my Media arts 4 is to choose a master portrait and Redefine the aesthetic quality(beauty) of the subject matter of the portrait  by producing a printed portrait for the light box and a digital portrait for the screen display.



SUBJECT MATTER
for my subject matter , i have choose William Morris at my Redefine portrait. He is the first who discover the new style of art called art Nouveau back in 1890.

as for the art nouveau. it is a new style of art movement  base on natural floral and organic looks which inspired by nature itself.

DEVELOPMENT

The most unique about art nouveau which is the variation of look and design by different individuals. to redefine one is not simple as it sound due to fact that they are to be use on self portrait not to mention the design of natural shape and pattern itself .

without the proper of the master portrait, i must create the master portrait from scratch  with my own style, i use several reference from various art from previous work from others artist from organize shape and size to various looks of pattern and aesthetic design of natural floral and roots of trees.


This is the result of my effort in creating a master portrait about William Morris with cold and bright  color. and its can be used on the light box.

DIGITAL DEVELOPMENT

for my digital Portrait, i must Create a interactive version for the viewer to interact with.
but first i must remade the portrait in digital look.


i have a design the portrait with a crystallizing look .


once i design the portrait, the next part is create a code for the function of interaction, it took me a while to retype and test the code over and over. and use it with the arduino.

here are the code for it to function with the arduino

//------------------------------------------------------for arduino
import processing.serial.*;

Serial myPort;
String val;
float val2;
float val3;


//-----------------------------------------------------
PImage img;
PImage img2;
float offset = 0;
float easing = 0.05;
int drawmode = 1;


void setup(){
  size(768,1024,P3D);
  img=loadImage("lover.png");
  img2=loadImage("hate.jpg");
//----------------------------------------------- Arduino code below  
  String portName = Serial.list()[0];
  myPort = new Serial(this, portName, 9600);  
}

void draw(){
  background(255);
  image(img2,offset,0);
  float mouseXFactor = map(mouseX, 0, width, 0.05, 1);
  float mouseYFactor = map(mouseY, 0, height, 0.05,1);
  
    for(int i=0;i<img.width;i++){
    for(int j=0;j<img.height;j++){
      
      int loc = i+j*img.width;
      
      float x=i*10;
      float y=j*10;
      
      color c=img.get(i,j);
      int greyscale=round(red(c)+green(c)+blue(c))/3;
      float w=map(greyscale,0,255,10,0.01);
      if(val!=null){
  val2=float(val);
  }
  val3=map(val2,0,1023,0.5,4);

switch(drawmode){
  
  case 1:
      float w3 = width;
      float z = (val2/w3)* brightness(img.pixels[loc])-100;
      pushMatrix();
      translate(x,y,z);
      fill(c);
      noStroke();
      ellipse(0,0,random(10),random(10));
      popMatrix();
      break;
      
      

}
    }
  }
}
void keyReleased(){
  
  if (key == '1') drawmode = 1;
  if (key == '2') drawmode = 2;
  
}
void serialEvent(Serial myPort){
  if(myPort.available() > 0){
    val = myPort.readStringUntil('\n');
  }
  println(val);
  //val2= map(val,0,1023,0.05,4);
}


as the result, i have create interactive version which is the image sparkles while the potentiometer  turn its lever.

this is the demonstration,

in conclusion. is went well during the exhibition. but i wasn't satisfaction to the fact i have done it poorly  with a medium effort. in the future i will improve myself to less burden to myself and others.


Saturday, August 31, 2013

Colouring with Adobe Photoshop



 

STEP 1: mengimbas seni anda dan membuka dengan adobe Photoshop

STEP 2:Tambah layer dan warna latar belakang mengunakan Paint bucket Tool , dan juga menambah sampel warna

STEP3:Tambah layer yang baru.
Untuk mengisi warna, gunakan Magic Wand Tool dan select pada kawasan yang anda ingin mewarna.Seterusnya,Gunakan Paint Bucket Tool untuk mewarnakan kawasan yang anda select.
selepas menambah warna

STEP 4 : Gunakan Burn Tool untuk membuat tone warna pada gambar atau mengunakan Brush tool dan mungunakan sampel warna


STEP 5 : FINISHING!