Kamis, 23 Oktober 2014

Desktop Running Text



Teinspirasi dari banner running text yang biasa terdapat di depan toko.
Kali ini kita akan membuat desktop running text, yaitu banner running text portable yang bisa dijadikan hiasan di atas meja. Menggunakan board arduino dan i2c 1602 lcd tutorial kali ini mirip dengan tutorial sebelumnya Program i2c display pada arduino uno, mega 2560, dan leonardo
 dengan sedikit modifikasi pada kode pemrogramannnya.
Berikut ini adalah kode yang digunakan:

/* STARobotic.com Example Software Sketch
20 character 4 line I2C Display
Backpack Interface labelled "LCM1602 IIC  A0 A1 A2"STARobotic.com */
/*-----( Import needed libraries )-----*/
#include <Wire.h>  // Comes with Arduino IDE
// Get the LCD I2C Library here:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
#include <LiquidCrystal_I2C.h>
/*-----( Declare Constants )-----*/
//none
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 20 chars 4 line display
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x20, 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE);  // Set the LCD I2C address
/*-----( Declare Variables )-----*/
//none
void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  lcd.begin(16,2);         // initialize the lcd for 16 chars 4 lines
}
void loop()
 {
  int i;
  lcd.setCursor(0, 0);
  lcd.print(" starobotic.com      starobotic.com ");
  lcd.setCursor(0, 1);
  lcd.print("* arduino * shield * sensor * module *");
  for (i = 0 ; i < 16; i ++) {
      lcd.scrollDisplayLeft();
      delay(600);
  }
}

/* ( THE END ) */ 


Silahkan copykan kode diatas pada arduino ide dan upload pada board arduino.
dan berikut ini adalah proses pembuatan desktop running text.

test program


pembuatan box



 
pengecatan dan  perakitan
finish



video desktop running text: