Autumn

When the leaves turn brown, the scent of the air is the best, you must be in autumn...

Winter

Suddenly tiny ice flakes fell down and all of places turn into romantic sites

Light Pageant

One of most beautiful site I visited in Japan

Line Follower Robot

Simple but very precious for me. Roughly speaking it does change my life up to now.

Laboratory card member

Currently student in Nakazawa Laboratory, Tohoku University. Lab's specialty is Ultrahigh speed optical communication.

Labortory Experiment

Ultrahigh Speed Optical Communication

Showing posts with label 2014. Show all posts
Showing posts with label 2014. Show all posts

Japanese Friend and Astronomy (日本の友達と天文と星)

日本は自分の夢国。日本語がとても好きですだよ。大好き!多い日本人の友達がいます。自分の日本語が下手ですけどみんあは私に感謝。だから嬉しかっただよ。

My first Japanese friend in 東北大学 is a girl I met in 七十七銀行。 She's in charge of  helping exchange student to make bank account. She's 西條 詩織(Shiori Saijou). 二年、歯学部 (2nd year, dentistry student). She's very good in English. First time I met her, my Japanese was still very low so we were interacting by English instead. We went to eat soba and explore 仙台駅 (Sendai Station). 嬉しかっただよ。

 


After that day I met her, we still keep in touch. We're planning to eat okonomiyaki in the downtown.
Next destination is going to Onsen!!! (Can't wait for that!)

The next one is the most guys. I joined Astronomy club and all of the student there are nihonjin. I'm the only ryuugakusei. That's why I have to try to always speak in Japanese :) I really love and enjoy it because they're really appreciating me and my nihongo. I don't know why every nihonjin I met asked me whether english is my first languange -_- .  English is my third languange (一番は Bahasa Indonesia, 二番はJavanese, 三番はEnglish,そして Nihongo :p ). And I don't know why they always said that my nihongo is 上手 in case I'm starting to learn nihongo 2 months ago when arrived Sendai. I think I'm so below underdog. I still can't 100% watching anime without subtitles  :((((

Almost all of the student in Astronomy Club are guy and same age as me. We went to somewhere out of city, out of light, on the mountain, in the night. One hour riding a car I guess.
とてもきれいな空
きれいな空
The air was so cold but the sky was so bright. VERY BEAUTIFUL! This was my very first time watching a nude sky like that, in a very dark place which only starlight shined and flashed on :) とてもきれいな空!


with 雄太さん





with なかお
I was so happy^^. Now the weather is getting colder and colder. Snow already fell down. It's time to hibernating maybe :p

Imoni (芋煮) party with Laboratory Members (Nakazawa Lab)

My First Imoni Party in Sendai with LABORATORY members

It was 2 weeks ago I and other laboratory member including Professors and Assoc. Professors had imonikai. Another good time in Sendai! Love Japan, Love Sendai, Love My Laboratory!
here is if you want to know more about my Laboratory but unfortunetaly the website was latest updated on 2011 :(
however you can still take a look at the link here --> Nakazawa Laboratory
Imoni (芋煮) is a type of thick potato and meat soup eaten traditionally in the autumn in the Tōhoku region of Japan. Yamagata Prefecture in particular is famous for its imoni, but other prefectures in the region also have their own different varieties.
Imoni is eaten like any soup, primarily during the late summer and early autumn, but is most famous as an outdoor food. In the autumn, groups of people preparing imoni around a fire near a river is considered a sign of the season, and convenience storesmaintain a stock of firewood and other supplies just for the occasion. (source: http://en.wikipedia.org/wiki/Imoni)
Imoni party was so fun, the food was very delicious. We cooked two types of soup. One is butaniku (pork) and other is beef. Of course I didn't eat the pork. 
This is the pork soup
Beef soup with Imo (small potato but not really tasted like potato)

It was cooked by my senpai-s in the lab. There're 2 B4 student (4th year Bachelor), 2 M1 (1st year Master), 2 M2, 2 D2 (2nd year Doctoral), 1 D3, 1 Postdoctoral Researcher, 1 Secretary, 1 Asst. Professor, 2 Assoc. Professors, and 2 Professors. We had a great time at that time.
students & lab members ( /from left/nakao-san, seya-san, and yu-san)
Not only that we also grilled some beefs and other foods. The party supposed to be held close to the Hirose river but unfortunetely the weather was not pretty good do we decided to have the party near the building. The lab only has 2 women member and one secretary, moreover I'm the youngest member in the lab tho. 
(from left)Seya-san, Nakazawa sensei, me, and Kasai Sensei were posed during grilled the fish

dat fish..... dat eggplant...

having barbecue party and the air was so cold

use your own chopstick

Beside cooking we also have a great time talking each other and of course taking picture together, kampai for the beer (of course i didn't, I drank juice and tea).
Kampaiiii
Good time with shinozaki-san, hirooka sensei, kasai sensei and wang-san (she's from china)
After our stomach is full then we take a photo together
with 2 Professors in my Laboratory. Nakazawa Sensei and Inutake Sensei.
full team!
Okay, that was my imoni party with all of laboratory members. Good time, amazing people, fascinating place. Alhmadulillah...

[JPlace Part 1] Where did I go in Japan?

It's been long time ago since my last post. Last two weeks was a very busy week. I had to go to laboratory everyday and go back in the late night.
I'm gonna show you the amazing place I visit starting from the newest. Here is my latest 3 days places to visit :P So enjoy!
私は日本が好きです!!!


1. SENDAI CASTLE AND SHRINE



Me! in front of Date Masamune-sama

historical stone
上の 仙台の城 (Top of Sendai Castle)
仙台の城は高いです

伊達 正宗

2. DISNEY STORE

This place is hillarious!!! (for me)













3. KAPA SUSHI (カッパ寿司)

moving plate! I love to sit next to the sushi-rail!



chain food. wait up! shinkansen is coming :p
4. GOKOKUJINJYA SHRINE




** I have to go now, so just wait for the next post ^^


Controlling a Robot using PSX (Arduino based)

Here's the code about how I control the robot using PSX and arduino Mega 2560. I make the code in such a modular way(no need but it's ok, forgive me lol)

Some command is in Bahasa Indonesia.

1. Main Program which call every tabs

/* bismillahirrohmaanirrohiim
ALLAHUAKBAR
=====================18 APRIL 2014====================================*/
/*  MASTER
ChangeLog: 1. slider 2. single motor 3. otomatisasi
*/


#include  //PS2 Library
#define naik 0
#define turun 1

//initialization
PS2X ps2x;
int PS2_error = 0;
int PS2_AnalogLX = 0;
int PS2_AnalogLY = 0;
int PS2_AnalogRX = 0;
int PS2_AnalogRY = 0;
int translateX, translateY, rotateTheta;


void setup() {
  Serial.begin(57600);

  PS2_error = ps2x.config_gamepad(50,51,52,53, true, false);   //(clock, command, attention, data, Pressures?, Rumble?)
  if (PS2_error == 0) Serial.println("SIAP"); //stick detected
  else if(PS2_error == 1)  Serial.println("Gak ada stik, cek kabel");
  else if(PS2_error == 2)  Serial.println("Stik terdeteksi, tapi ga bisa nerima command");
  else if(PS2_error == 3)  Serial.println("Stik tidak bisa memasuki mode Pressure, hilangkan mode melalui kodingan");

  slaveInit();
  motorInit();
  seesawInit();
  gripperInit();
  sliderInit();
  liftingInit();
  pendorongInit();
  singleMotorInit();
}

void loop()
{

  if(PS2_error != 0)
  {
    delay(500);
    lifting(0,0);
    return;
  }
  else
  {
    ps2x.read_gamepad();          //read controller and set large motor to spin at 'vibrate' speed
 
    //kalo stik terlepas biar gak jalan sendiri
    if(ps2x.Analog(PSS_LY) == 255 && ps2x.Analog(PSS_LX) == 255 && ps2x.Analog(PSS_RY) == 255 && ps2x.Analog(PSS_RX) == 255)
    {
      PS2_AnalogLY = 0;
      PS2_AnalogLX = 0;
      PS2_AnalogRY = 0;
      PS2_AnalogRX = 0;
      Serial.println("STIK TERLEPAS");
      motorDrive(0,0,0);
      while(1);
    }

    else if(ps2x.Button(PSB_L2)) // turbo speed
    {
      PS2_AnalogLY = ((ps2x.Analog(PSS_LY) - 128));
      PS2_AnalogLX = ((ps2x.Analog(PSS_LX) - 128));
      PS2_AnalogRY = ((ps2x.Analog(PSS_RY) - 128));
      PS2_AnalogRX = ((ps2x.Analog(PSS_RX) - 128));
    }

    else if(ps2x.Button(PSB_L1)) // slow mo banget seperempat speed
    {
      PS2_AnalogLY = (int)((ps2x.Analog(PSS_LY) - 128)/4);
      PS2_AnalogLX = (int)((ps2x.Analog(PSS_LX) - 128)/4);
      PS2_AnalogRY = (int)((ps2x.Analog(PSS_RY) - 128)/4);
      PS2_AnalogRX = (int)((ps2x.Analog(PSS_RX) - 128)/4);
    }


    else  //normal speed
    {
      PS2_AnalogLY = (int)((ps2x.Analog(PSS_LY) - 128)/2);
      PS2_AnalogLX = (int)((ps2x.Analog(PSS_LX) - 128)/2);
      PS2_AnalogRY = (int)((ps2x.Analog(PSS_RY) - 128)/2);
      PS2_AnalogRX = (int)((ps2x.Analog(PSS_RX) - 128)/2);
    }

    //    Serial.print("Stick Values:");
    //    Serial.print(PS2_AnalogLX, DEC);
    //    Serial.print(" ,");
    //    Serial.print(PS2_AnalogLY, DEC);
    //    Serial.print(" ,");                  
    //    Serial.print(PS2_AnalogRX, DEC);
    //    Serial.print(",");
    //    Serial.println(PS2_AnalogRY, DEC);

    translateX= PS2_AnalogLX*2;
    translateY= PS2_AnalogLY*2;
    rotateTheta= PS2_AnalogRX*-2;  

    omniDrive(translateX,translateY,rotateTheta);  // kalo mau pake pwm master doang
    //slaveOmniPWM(translateX,translateY,rotateTheta);  // kalo mau pake pwm tp master slave
    //slaveOmniRPM(translateX,translateY,rotateTheta);  // kalo mau pake rpm master slave

    if(ps2x.ButtonPressed(PSB_PINK))
    {
       push();
    }

    if(ps2x.ButtonPressed(PSB_RED))
    {
      gripping(); // grip depan
    }

    if(ps2x.ButtonPressed(PSB_BLUE))
    {
      seesaw_on(); // ayunin jungkat jungkit
    }
 
    if(ps2x.Button(PSB_PAD_RIGHT))
    {
      slider(120,naik);
    }

    if(ps2x.ButtonReleased(PSB_PAD_RIGHT))
    {
      slider(0,turun);
    }
 
    if(ps2x.Button(PSB_PAD_LEFT))
    {
       slider(120,turun);
    }
 
     if(ps2x.ButtonReleased(PSB_PAD_LEFT))
    {
      slider(0,naik);
    }

    if(ps2x.Button(PSB_PAD_UP))
    {
       lifting(250,turun);
    }
 
    if(ps2x.ButtonReleased(PSB_PAD_UP))
    {
      lifting(0,naik);
    }
 
    if(ps2x.Button(PSB_PAD_DOWN))
    {
      lifting(250,naik);
    }
    if(ps2x.ButtonReleased(PSB_PAD_DOWN))
    {
      lifting(0,turun);
    }
 
    if (ps2x.ButtonPressed(PSB_GREEN))
    {
      push();
    }
 
 
    if (ps2x.ButtonReleased(PSB_GREEN))
    {
       motor(0,100,95,1,1,0,700);
       motor(0,0,0,0,0,0,100);
    }
 
//        if (ps2x.ButtonPressed(PSB_R1))
//    {
//  
//    }
 
 
    if (ps2x.Button(PSB_R1))
    {
       slider(130,naik);
       lifting2();
    }
 
    if (ps2x.ButtonReleased(PSB_R1))
    {
             slider(0,turun);
           lifting(0,naik);
    }
        if (ps2x.Button(PSB_R2))
    {
       slider(130,turun);
       lifting3();
    }
 
    if (ps2x.ButtonReleased(PSB_R2))
    {
             slider(0,naik);
           lifting(0,turun);
    }

//
//    if(ps2x.ButtonReleased(PSB_PINK))
//    {
//       //diisi nanti
//    }
//  
//     if(ps2x.Button(PSB_GREEN))
//    {
//       //diisi nanti
//    }
//
//    if(ps2x.ButtonReleased(PSB_GREEN))
//    {
//       //diisi nanti
//    }
//    if(ps2x.ButtonPressed(PSB_PAD_RIGHT))
//    {
//      ping(1);
//    }
//
//    if(ps2x.ButtonPressed(PSB_PAD_UP))
//    {
//      ping(2);
//    }
//    if(ps2x.ButtonPressed(PSB_PAD_LEFT))
//    {
//
//      ping(3);
//    }

  }
}


2.  Actuator's Contoller


#define GRIPPER_PIN 32

char grip;

void gripperInit()
{
  pinMode(GRIPPER_PIN,OUTPUT);
  digitalWrite(GRIPPER_PIN,HIGH);
}

void gripping ()
{
  if(grip==1)
  {
    grip=0;
    Serial.println("GRIPPER ACTIVATED");
  }
  else
  {
    grip=1;
    Serial.println("GRIPPER DEACTIVATED");
  }
  digitalWrite(GRIPPER_PIN,grip);
}

#define LIFTING_PWM_PIN 2
#define LIFTING_CS_PIN 26
#define MOTOR_CAP 255

void liftingInit()
{
pinMode(LIFTING_PWM_PIN,OUTPUT);
pinMode(LIFTING_CS_PIN,OUTPUT);
digitalWrite(LIFTING_CS_PIN,LOW);
analogWrite(LIFTING_PWM_PIN,0);
attachInterrupt(3,lifting2,CHANGE);
attachInterrupt(2, lifting3, CHANGE);
}

void lifting(int speed, int arah)
analogWrite(LIFTING_PWM_PIN,speed);
digitalWrite(LIFTING_CS_PIN,arah);
}

void lifting2()
analogWrite(LIFTING_PWM_PIN,250);
digitalWrite(LIFTING_CS_PIN,1);
}


void lifting3()
analogWrite(LIFTING_PWM_PIN,250);
digitalWrite(LIFTING_CS_PIN,0);
}

void lifting_d(int speed, int arah,int time)
analogWrite(LIFTING_PWM_PIN,speed);
digitalWrite(LIFTING_CS_PIN,arah);
delay(time);
}

#define PENDORONG_PIN 31

char pendorong;

void pendorongInit()
{
  pinMode(PENDORONG_PIN,OUTPUT);
  digitalWrite(PENDORONG_PIN,LOW);
}

void push()
{
  if(pendorong==1)
  {
    pendorong=0;
  //  Serial.println("GRIPPER ACTIVATED");
  }
  else 
  {
    pendorong=1;
   // Serial.println("GRIPPER DEACTIVATED");
  }
  digitalWrite(PENDORONG_PIN,pendorong);
}

#define SEESAW_PIN 30

char seesaw;

void seesawInit()
{
  pinMode(SEESAW_PIN,OUTPUT);
  digitalWrite(SEESAW_PIN,LOW);
}


void seesaw_on ()
{
  if(seesaw==1)
  {
    seesaw=0;
    Serial.println("SEESAW NAIK");
  }
  else 
  {
    seesaw=1;
    Serial.println("SEESAW TURUN");
  }
  digitalWrite(SEESAW_PIN,seesaw);
}

3. Motor Control


#define CSB 28
#define CSC 29
#define CSA 27
#define PWMB 4
#define PWMC 9
#define PWMA 3
#define CCW 1
#define CW 0
#define MOTOR_CAP 255 //max 255

int lastA = 0, lastB = 0, lastC = 0, last_delay = 0;
byte stopA = 0, stopB = 0, stopC = 0;


// MOTOR INIT
void motorInit()
{
   pinMode(CSA,OUTPUT);
   pinMode(CSB,OUTPUT);
   pinMode(CSC,OUTPUT);
   digitalWrite(CSA,CCW);
   digitalWrite(CSB,CCW);
   digitalWrite(CSC,CCW);
   
   pinMode(PWMA,OUTPUT);
   pinMode(PWMB,OUTPUT);
   pinMode(PWMC,OUTPUT);
}
//************************************
// Motor A
//************************************
void motor_A(int pwm)
{
  if(pwm>MOTOR_CAP) pwm = MOTOR_CAP;
  else if(pwm<-motor_cap pwm="-MOTOR_CAP;</div">
  
  if(pwm>0)
  {
    digitalWrite(CSA,CCW);
    analogWrite(PWMA,pwm);
    stopA = 1;
    if(lastA < 0) last_delay = 1;
  }
  else if(pwm<0 div="">
  {
    digitalWrite(CSA,CW);
    analogWrite(PWMA,-1*pwm);
    stopA = 1;
    if(lastA > 0) last_delay = 1;
  }
  else
  {
    if(stopA == 0) return;
    else if(digitalRead(CSA) == CCW)
    {
      digitalWrite(CSA,CW);
      analogWrite(PWMA,0);
      stopA = 0;
      last_delay = 1;
    }
    else if(digitalRead(CSA) == CW)
    {
      digitalWrite(CSA,CCW);
      analogWrite(PWMA,0);
      stopA = 0;
      last_delay = 1;
    }
  }
  lastA = pwm;
}
//************************************
// Motor B
//************************************
void motor_B(int pwm)
{
  if(pwm>MOTOR_CAP) pwm = MOTOR_CAP;
  else if(pwm<-motor_cap pwm="-MOTOR_CAP;</div">
  
  if(pwm>0)
  {
    digitalWrite(CSB,CCW);
    analogWrite(PWMB,pwm);
    stopB = 1;
    if(lastB < 0) last_delay = 1;    
  }
  else if(pwm<0 div="">
  {
    digitalWrite(CSB,CW);
    analogWrite(PWMB,-1*pwm);
    stopB = 1;
    if(lastB > 0) last_delay = 1;
  }
  else
  {
    if(stopB == 0) return;
    else if(digitalRead(CSB) == CCW)
    {
      digitalWrite(CSB,CW);
      analogWrite(PWMB,0);
      stopB = 0;
      last_delay = 1;
    }
    else if(digitalRead(CSB) == CW)
    {
      digitalWrite(CSB,CCW);
      analogWrite(PWMB,0);
      stopB = 0;
      last_delay = 1;
    }
  }
  lastB = pwm;
}
//************************************
// Motor C
//************************************
void motor_C(int pwm)
{
  if(pwm>MOTOR_CAP) pwm = MOTOR_CAP;
  else if(pwm<-motor_cap pwm="-MOTOR_CAP;</div">
  
  if(pwm>0)
  {
    digitalWrite(CSC,CCW);
    analogWrite(PWMC,pwm);
    stopC = 1;
    if(lastC < 0) last_delay = 1;
  }
  else if(pwm<0 div="">
  {
    digitalWrite(CSC,CW);
    analogWrite(PWMC,-1*pwm);
    stopC = 1;
    if(lastC > 0) last_delay = 1;
  }
  else
  {
    if(stopC == 0) return;
    else if(digitalRead(CSC) == CCW)
    {
      digitalWrite(CSC,CW);
      analogWrite(PWMC,0);
      stopC = 0;
      last_delay = 1;
    }
    else if(digitalRead(CSC) == CW)
    {
      digitalWrite(CSC,CCW);
      analogWrite(PWMC,0);
      stopC = 0;
      last_delay = 1;
    }
  }
  lastC = pwm;
}

//************************************
//Motor Drive Function, -255 ~ 255
//************************************
void motorDrive(int va,int vb,int vc)
{
  motor_A(va);
  motor_B(vb);
  motor_C(vc);
  if(last_delay==1)
  {
    delay(100);
    last_delay = 0;
    Serial.println("delayed");
  }
}

void omniDrive(int x, int y, int rot) //putaran positif searah jarum jam
{
  int va,vb,vc;
  va = 0.333*x - 0.572*y + 0.333*rot;
  vb = 0.333*x + 0.572*y + 0.333*rot;
  //vc = -0.667*x + 0.333*rot;
  vc = -0.667*x + 0.333*rot;
  
  motorDrive(va,vb,vc);
  
  /*
  Serial.print(x,DEC);
  Serial.print("\t");
  Serial.print(y,DEC);
  Serial.print("\t");
  Serial.println(rot,DEC);
  */
//  Serial.print(va,DEC);
//  Serial.print(" ");
//  Serial.print(vb,DEC);
//  Serial.print(" ");
//  Serial.print(vc,DEC);
//  Serial.println();
  
}

You can get the full code. It's easy just subscribe my blog and left the comment. I'll give you the link


Perancangan dan Pemrograman Web

Semester 4 yang lalu, saya mengambil mata kuliah Perancangan dan Pemrograman Web (PPW) di Fakultas Ilmu Komputer (Fasilkom) Universitas Indonesia. Berikut contoh-contoh dari tugasnya.  Part ini mostly membahas tentang HTML, CSS, dan Javascript saja ya.. PHP, MySQL, JQuery akan dibahas padas part selanjutnya.
Dilengkapi dengan file asli yang dapat anda download secara gratis.

1. Tutorial 1
mengenai fitur dasar HTML dan CSS. Materi awal ini cukup mudah. Yaa cukup mudah untuk pemula.. Kurang lebih tampilannya seperti ini:

Gambar 1. Tampilan Tutorial 1

Click here to DOWNLOAD file ._.


2. Tutorial 2
Pada tutorial 2 kali ini, fitur sudah menggunakan javascript. Apa itu javascript? Apa bedanya dengan HTML biasa? Pada javascript, kita dapat melakukan scripting/coding dengan menerapkan fungsi fungsi dasar pemrograman sepereti looping function while, for, do while atau conditional seperti if else. Menarik bukan? Javascript inilah yang membuat sebauh web dapat terlihat interaktif.


3. Tutorial 3
Langsung aja ya^^ Download File

4. Tutorial 4
Pada Tutorial 4 ini seperti main poker. Anda insert username, input saldo anda lalu menaruh bet/taruhan untuk bermain. Saldo akan bertambah ketika angka yang muncul adalah triple number yang sama. Menarik bukan?


5. Tutorial 5
Semakin advanced! Check it out! Bermain Jan Ken Pon dengan Javascript




6. Tutorial 6

Pada tutorial 6 kali ini, materi ajarnya adalah mengenai Canvas. Apa itu Canvas?
Gambar yang saya pakai di sini adalah koleksi foto SNSD yang HD dengan warna latar transformasi slide putih.



Sekian, untuk Part Selanjutnya (lebih advanced) Klik di sini