Computer Graphics and Multimedia Software - Knowledge Sharing

Augmented Reality Interaction

Tutorial 1 : AR Marker-Based 

Download # Processing
Download # Hiro Marker (*.pdf file)
Download # OBJLoader library to add 3D models in Augmented Reality (*.rar file). You can also install this library while using Processing.
NOTE: Extract library and put nyar4psg folder to Processing libraries location as you can see in example here: “C:\Users\EdgarasArt\Documents\Processing\libraries”. If there are no libraries folder in Processing folder (in My Documents) – create it!

Tutorial 2 : Adding Texture

Download # 3Ds Max Box Model (*.max file)
Download # Don’t Forget Box Models’ Texture! (*.jpg file)
Download # Hiro Marker (*.pdf file)
(Processing software itself is available to download here)
NOTE: Extract library and put nyar4psg folder to Processing libraries location as you can see in example here: “C:\Users\EdgarasArt\Documents\Processing\libraries”. If there are no libraries folder in Processing folder (in My Documents) – create it!

Tutorial 3 : Interaction with Virtual Content

Download # Arduino Code (*.ino file)
Download # Processing Code (*.pde file)
Download # Hiro Marker (*.pdf file)
(Processing software itself is available to download here)
NOTE: Extract library and put nyar4psg folder to Processing libraries location as you can see in example here: “C:\Users\EdgarasArt\Documents\Processing\libraries”. If there are no libraries folder in Processing folder (in My Documents) – create it!

// Arduino code for Optical Sensor TCRT5000 data reading
// C = Arduino analog pin A0, A1, A2, A3 and to one end of 4K7 resistor, other end of resistor to 5V
// E = GND
// A = 100 ohm resistor, other end of resistor to 5V
// C = GND 

//commented lines are for LED indication     
//int led1 = 11;
//int led2 = 10;
//int led3 = 6;
//int led4 = 5;
/////////////////////////////////////////
int opt1, opt2, opt3, opt4, value;
int opt_sensor1, opt_sensor2, opt_sensor3, opt_sensor4;

void setup() {
  Serial.begin(9600);
 //commented lines are for LED indication
 //pinMode(led1, OUTPUT);
 //pinMode(led2, OUTPUT);
 //pinMode(led3, OUTPUT);
 //pinMode(led4, OUTPUT);
 ////////////////////////////////////////
}

void loop(){
  opt1 = analogRead(A0);
  opt2 = analogRead(A1);
  opt3 = analogRead(A2);
  opt4 = analogRead(A3);
  opt_sensor1 = map(opt1, 75, 750, 0, 255);
  opt_sensor2 = map(opt2, 75, 600, 0, 255);
  opt_sensor3 = map(opt3, 65, 700, 0, 255);
  opt_sensor4 = map(opt4, 60, 700, 0, 255);

  Serial.print(opt_sensor1); Serial.print("\t");
  Serial.print(opt_sensor2); Serial.print("\t");
  Serial.print(opt_sensor3); Serial.print("\t");
  Serial.print(opt_sensor4); Serial.println("\t");

  //Serial.print(opt1); Serial.print("\t");
  //Serial.print(opt2); Serial.print("\t");
  //Serial.print(opt3); Serial.print("\t");
  //Serial.print(opt4); Serial.print("\t");
  
  //commented lines are for LED indication
  //analogWrite(led1, opt_sensor1);
  //analogWrite(led2, opt_sensor2);
  //analogWrite(led3, opt_sensor3);
  //analogWrite(led4, opt_sensor4);
  ////////////////////////////////////////
  delay(50);
}


Malaysia Augmented Reality

Its incredibly difficult to discover the undiscovered. Here will see how I can help you. Cheers - Ajune (comp.utm.my/ajune)
ajune@utm.my. Powered by Blogger.