this month :
1. make live video streaming in local network
2. simple line-follower module for high school student.
3. low cost usb-programmer for ATmega microcontroller
4. got someone to date…
On Going Project
Posted in Uncategorized with tags monthly report on January 13, 2010 by satriantEmulator Virtual Machine dengan Qemu
Posted in programming with tags emulator dsl, qemu on January 8, 2010 by satriantHello boi..
iseng2 ni, qemu adalah sebuah aplikasi emulator buat berbagai macam arsitektur, jadi kamu bsa jalanin aplikasi yang platform nya beda. misalnya km mau jalanin aplikasi yang jalan di mips atau arm di pc kamu…hihihihi……
nah, kali ini singkat aja, gw mau ngasi tau cara gmn booting OS DSL- Damn Small Linux pake Qemu..
packet yang harus di install adalah sebagai berikut :
$ sudo apt-get install qemu
buat virtual filesystem :
$ dd of=hd.img bs=1024 seek=1000000 count=0
ini akan membuat suatu file virtual yang namanya hd.img, sebesar 10 giga.
download iso dsl di webnya dsini
klo udah tinggal di jalanin ISOnya
$ sudo qemu -hda hd.img -cdrom ~/dsl.iso -boot d -net nic -net tap
ni adalah gambarnya :
yoyoi…sampai jumpa boi di edisi berikutnya…
Best Regads
Tommy Agustianto
!!selamat taun baru 2010!!
Posted in my extraordinary life on December 31, 2009 by satriantBrowse The Web Using Lynx
Posted in my extraordinary life on December 31, 2009 by satriant
*tidak d sarankan..this is Just for Fun..
ktemu lagi ama gw..hehe..
kali ini gw akan memperkenalkan web browser untuk console..hihihi (jaman gini pake konsol, dah kaya kmbali k jaman batu).
langsung aja boi, ni langkah2 yang harus d lakukan…
1. install lynx
$ sudo apt-get instal lynx
2. jalanin lynx…
$ lynx
untuk pergi ke web… teken ‘g’ dan tuliskan URLnya dan teken Enter…..
this is the picture….
google dengan lynx
Mail Client with Mutt
Posted in programming with tags mutt, mutt mail client on December 30, 2009 by satriantwelcome to cli world..hehe…
mutt adalah email client untuk console.., gw akan ngasi tau cara termudah untuk setting mutt di ubuntu.
packet yang harus lo install adalah sebagai berikut :
OpenSSL, fetchmail, procmail, msmtp and mutt
step 1
installing the needed componen n aplikasi :
$ sudo apt-get install openssl fetchmail procmail msmtp mutt ca-certificates
step 2
ok, untuk contoh gw akan setting mail untuk gmail, dan account detailnya adalah sebagai berikut :
username : otong@gmail.com
password : otongmaritong
, balik ke konsol dan buat directory dan file sbb:
$ mkdir -pv ~/mail/certs $ cd ~/mail/certs $ touch Thawte_Premium_Server_CA.pem $ touch Equifax_Secure_CA.pem $ curl –verbose –output mk-ca-bundle.pl \ http://cool.haxx.se/cvs.cgi/*checkout*/curl/lib/mk-ca-bundle.pl?rev=1.10 $ perl mk-ca-bundle.pl re-Hash tu folder :
$ c_rehash ~/mail/certs/ step 3 setting fetchmail masuk ke home $ cd ~ $ vim .fetchmailrc buat file .fetchmailrc dan isi file dengan parameter sebagai berikut :poll pop.gmail.com with proto POP3 user 'otong@gmail.com' there with password 'otongmaritong' is 'otong' here mda "/usr/bin/procmail -d %T" options no keep ssl sslcertck sslcertpath /etc/ssl/certs set readable ke tuh file$ chmod 600 ~/.fetchmailrc step 4 setting procmail tambahin ni script ke .bashrc $ cd ~ $ echo "MAIL=/var/spool/mail/otong && export MAIL" >> .bashrc buat file .procmailrc $ vim .procmailrc dan isi tu file dengan parameter ini :ATH=/bin:/usr/bin:/usr/local/bin VERBOSE=off DEFAULT=/var/spool/mail/otong MAILDIR=$HOME/mail LOGFILE=$HOME/.procmaillog # Recipes below this comment: :0: * ^TOmutt-user mutt step 5 setting msmtp, ni buat ngirim mail. masuk ke home $ cd ~ buat file .msmtprc dan isi file itu dengan parameter sebagai berikut :account default host smtp.gmail.com port 587 from otong@gmail.com tls on tls_starttls on tls_trust_file /home/otong/mail/certs/Thawte_Premium_Server_CA.pem # tls_trust_file /home/otong/mail/certs/Equifax_Secure_CA.pem auth on user otong password rover logfile ~/.msmtp.logmake file readable, run this : $ chmod 600 ~/.msmtprc
step 6 setting mutt masuk ke home : $ cd ~ buat file .muttrc $ vim .muttrc dan isi file itu ada parameter ini :#======================================================# # Boring details set realname = "otong set from = "otong@gmail.com" set use_from = yes set envelope_from ="yes" # Use a signature set signature="~/.signature" # Use msmtp rather than sendmail. Check that # the path is correct for your system: set sendmail="/usr/bin/msmtp" # If not set in ~/.bashrc: set spoolfile = /var/spool/mail/otong #======================================================# # Folders set folder="$HOME/mail" # Local mailboxes stored here set record="+sent" # Where to store sent messages set postponed="+postponed" # Where to store draft messages set mbox_type=mbox # Mailbox type set move=no # Don't move mail from spool #======================================================# # Watch these mailboxes for new mail, useful only if # Procmail or Maildrop is used to sort mail. mailboxes ! +slrn +fetchmail +mutt set sort_browser=alpha # Sort mailboxes by alpha(bet) #======================================================# # What to show and order of headers ignore * unignore Date: From: User-Agent: X-Mailer X-Operating-System To: \ Cc: Reply-To: Subject: Mail-Followup-To: hdr_order Date: From: User-Agent: X-Mailer X-Operating-System To: \ Cc: Reply-To: Subject: Mail-Followup-To: #======================================================# # which editor do you want to use? # vim of course! set editor="vim -c 'set tw=70 et' '+/^$' " set edit_headers=yes # See the headers when editing #======================================================# # Lists: An example using the mutt-users list: lists mutt-users subscribe mutt-users set followup_to=yes # Sets 'Mail-Followup-To' header set honor_followup_to=yes fcc-hook mutt-user +mutt # See your own posts using fcc #======================================================# # Odds and ends set markers # mark wrapped lines of text in the pager with a + set smart_wrap # Don't wrap mid-word set pager_context=5 # Retain 5 lines of previous page when scrolling. set status_on_top # Status bar on top. push <show-version> # Shows mutt version at startup---------------------------------------------------------------------------------------
ok.. finish.. sekarang coba buka mutt $ mutt dan ketik shift-1 (!) dan masukan perintah fetchmail -v ,
jika semua parameter benar. nanti mail akan ke fetching semua..
ini adalah picture mutt yang udah jalan :selamat mencoba
Best Regards
Tommy
Programming Colorfull Console-Program with ncurses
Posted in programming with tags ncurses, programming ncurse on December 3, 2009 by satriantdalam windows kita mengenal conio.h, nah dalam linux ada yang namanya ncurse library, library ini mengurusi tentang tampilan program kita.
Preparation :
1. Niat
2. Komputer dengan OS Linux
3. ncurses library
4. gcc tentunya…
5. Rokok 1 bungkus
Lets Start :
$ vim hellofuckingworld.c
// tulis program ini : ……
#include <ncurses.h> /* ga perlu include stdio.h cuz dalem ncurses udah ada */
int main (void)
{
initscr(); /* init screen – hal pertama yang harus di lakukan*/
addstr(“Hello Wondelful World”); /* cetak tu message */
getch();
refresh(); /* refresh layar konsole */
endwin(); /* ini yang harus di lakukan setelah program selesai memakai ncurses mode */
return 0;
}
//fungsi2 manipulasi layar ncurses
Debugging AVR, with Asynchronous UART with LINUX
Posted in programming with tags AVR UART, avr-gcc on October 21, 2009 by satriantthe case :
if you want to get sumthing controlled by computer or you need a data aquition for your microcontroller device….
ok!!
——–indonesia aja deh—–HIDUP INDONESIA!!!
okeh, now asumsikan bahwa smua pack untuk AVR udah kamu install smua, dan kamu telah bisa meng-compile dan men-download the hex file to modul kamu!!
register di AVR yang menangani masalah UART adalah
UCSRA = 0×00;
UCSRB = 0×18; pilihan mode
UBRRH = 0×00;
UBRRL = 0×19; pilihan baud rate
silahkan liat fungsi masing2 bit di Datasheet
jangan males ya!!
nah untuk meng-konekan antara komputer dan tuh modul, perlu di initialisasikan
standart io di linux.
stdin n stdout
ni adalah initialisinya :
static int uart_putchar(char ch, FILE* stream);
static int uart_getchar(FILE* stream);
static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar,NULL,_FDEV_SETUP_WRITE);
static FILE mystdin = FDEV_SETUP_STREAM(NULL, uart_getchar, _FDEV_SETUP_READ);
static int uart_putchar(char ch, FILE* stream) {
if (ch == ‘\n’) {
uart_putchar(‘\r’, stream);
}
loop_until_bit_is_set(UCSRA, UDRE);
UDR = ch;
return 0;
}
static int uart_getchar(FILE *stream) {
char temp;
loop_until_bit_is_set(UCSRA,RXC);
temp = UDR;
uart_putchar(temp, stream);
return(temp);
}
nah itu adalah initialisasi dan fungsi untuk file stream io.
nih main programmnya:
int main(void) {
init_uart();
stdout = &mystdout;
stdin = &mystdin;
while(1) {
printf(“Hello World UNIX \n”);
delay_ms(1000);
}
return (0);
}
________________________________________________________
PROGRAM LENGKAPNYA
/*
*
*
* Tommy Agustianto
* Progname : Hello World…
* Asych 19200 bps.
*
*/
#define F_CPU 4000000UL
#include <avr/io.h>
#include <avr/iom16.h>
#include <util/delay.h>
#include <stdio.h>
static int uart_putchar(char ch, FILE* stream);
static int uart_getchar(FILE* stream);
static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar,NULL,_FDEV_SETUP_WRITE);
static FILE mystdin = FDEV_SETUP_STREAM(NULL, uart_getchar, _FDEV_SETUP_READ);
static int uart_putchar(char ch, FILE* stream) {
if (ch == ‘\n’) {
uart_putchar(‘\r’, stream);
}
loop_until_bit_is_set(UCSRA, UDRE);
UDR = ch;
return 0;
}
static int uart_getchar(FILE *stream) {
char temp;
loop_until_bit_is_set(UCSRA,RXC);
temp = UDR;
uart_putchar(temp, stream);
return(temp);
}
void init_uart() {
UCSRA = 0×00;
UCSRB = 0×18;
UBRRH = 0×00;
UBRRL = 0×19;
}
void delay_ms(int ms) {
unsigned int i;
for (i=0; i<=ms; i++) {
_delay_ms(1);
}
}
int main(void) {
init_uart();
stdout = &mystdout;
stdin = &mystdin;
while(1) {
printf(“Hello World UNIX \n”);
delay_ms(1000);
}
return (0);
}
nah konekin PD0 dan PD1 di AT16, (tx,rx,+gnd) ke komputer..
configuring terminal di linux…
kamu bisa bikin sendiri terminalnya, ini bisa di buat pake lib. termios.h
atau klo ga mau pusing, pke aja minicom…
# sudo apt-get install minicom
nah klo udah, masuk ke terminal dan ketik minicom…
konfigurasi minicom dengan pencet ctrl+a+o
setting parameternya…
trs jalankan program yang tadi…(download dulu)…
dah liat apa yang terjadi di mincom…
* klo karakternya aneh, itu brati baud rate antara si mikon n si komputer blm sama, silahkan setting minicom lagi!!
BEST REGARDS
TOMMY
Tulisan ini dibuat untuk menyukseskan Lomba Blog Open Source P2I-LIPI dan
Seminar Open Source P2I-LIPI 2009.
http://www.informatika.lipi.go.id/seminar/lombablog/
http://www.informatika.lipi.go.id/seminar/
AVR di LinuX – How To…
Posted in programming with tags avr dude, avr on linux, avr-gcc on September 17, 2009 by satrianthehe
just smile before you read…
banyak compiler untuk microcontroller yang biasanya di pake oleh para hobi dan mahasiswa di indonesia, pada umumnya di lingkungan windows, compiler yang dipakai adalah Codevision dan Bascom. ya tergantung tu mahasiswa maunya pake bahasa apa. Codevision untuk , Bascom untuk Basic, AVR studio untuk Assembly, AVRco untuk Pascal, dan banyak deh..
nah…hampir semua IDE(integrated development environtment) di atas itu ga gratis cuy, yang gratis palingan cuma AVR studio aja, bawaan Atmel.
ok… now… GOIN’ TO OPEN SOURCE…
opensource avr di lingkungan windows = WinAVR…, winAvr ini adalah IDE gratis buat ngompile dan ngedit2 program AVR pake bahasa C…itu cukup?! TIDAK!!
karena nanggung cuy, klo lo migrasi sistem stengah2…blm tentu juga wuh windows lo tuh asli..nah lo…
AVR-GCC & Linux
ini adalah solusinya…
pilih salah satu distro linux ksukaan lo..(penulis make ubuntu 8.1)
ok.. the steps
1. make sure klo lo pake linux..
2. download paket yang di butuhkan
$ sudo apt-get install gcc-avr
$ sudo apt-get install avr-libc
$ sudo apt-get install avrdude
3. tulis program contoh…misal testled.c
#define F_CPU 12000000UL //setting crystal yang lo pake
#include <avr/io.h> //standart file IO header
#include <avr/iom16.h> // lib buat atmega16, lo pake apa..misal atmega8, iom8
#include <avr/delay.h>
void delayms(uint16_t millis) {
uint16_t loop;
while ( millis ) {
_delay_ms(1);
millis–;
}
}
int main(void) {
DDRC = 0xFF; /* set jadi Output..*/
while(1) {
PORTC = 0×00; /* LED on */
delayms(1000);
PORTC = 0xFF; /* LED off */
delayms(1000);
}
return 0;
}
4. Buat Makefilenya…
#
# Makefile for Tom’s AVR-Board with STK200 Parallel Programmer
# by Tommy Agustianto <satria.nt@gmail.com>
# ver 0.1
#
CC=avr-gcc
CFLAGS=-g -Os -Wall -mcall-prologues -mmcu=atmega16
OBJ2HEX=avr-objcopy
AVRDUDE=avrdude
TARGET=testled
program : $(TARGET).hex
$(AVRDUDE) -p m16 -P /dev/parport0 -c stk200 -U flash:w:testled.hex
if=$(TARGET).hex -v=2
%.obj : %.o
$(CC) $(CFLAGS) $< -o $@
%.hex : %.obj
$(OBJ2HEX) -R .eeprom -O ihex $< $@
clean :
rm -f *.hex *.obj *.o *~
okeh…smua udah terinstal dan lo juga udah buat file yang di perlukan , jangan lupa tapo tuh testled.c dan Makefile di folder yang sama…
dan ….coba dah lo ketik
make
klo smuanya benar, nanti akan ada tulisan bgini..
tommy@xsatria:~/myprojects/AVR-Linux$ sudo make
[sudo] password for tommy:
avrdude -p m16 -P /dev/parport0 -c stk200 -U flash:w:testled.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0×1e9403
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file “testled.hex”
avrdude: input file testled.hex auto detected as Intel Hex
avrdude: writing flash (214 bytes):
Writing | ################################################## | 100% 0.18s
avrdude: 214 bytes of flash written
avrdude: verifying flash memory against testled.hex:
avrdude: load data flash data from input file testled.hex:
avrdude: input file testled.hex auto detected as Intel Hex
avrdude: input file testled.hex contains 214 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.20s
avrdude: verifying …
avrdude: 214 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
nah, skarang lepas kabel download lu…dan hehehehe…
IT WORKS…isn’t it?
nih skematik stk200 gw…cuma modal goceng bro…
ga usah pake buffer2an…cuma resistor 4buah n lpt male connector..
Tulisan ini dibuat untuk menyukseskan Lomba Blog Open Source P2I-LIPI dan
Seminar Open Source P2I-LIPI 2009.
http://www.informatika.lipi.go.id/seminar/lombablog/
http://www.informatika.lipi.go.id/seminar/
cara pake pointer di C
Posted in programming with tags C programming - pointer on September 10, 2009 by satriantmisal kita punya variabel rumah tipenya integer. —> int rumah;
nah tuh rumah ada isinya 3 orang.. —> rumah = 3;
nah ini adalah alamanya dengan menggunakan referensi(&) —> alamat_rumah = &rumah;
next….
nah…
analisa potongan code ini :
int rumah;
int *p; //ini lo baca, nilai yang di tunjukan oleh P
p = &rumah; // nilai P itu adalah alamat Rumah misal 1771
*p = 100; //nah ini brati, nilai yang di tunjukan oleh P adalah 100,
//nilai yang di tunjukin P tiu adalah alamat rumah, nah alamat rumah kan 1771,
//nah alamat 1771 itu di isikan oleh nilai 100;
ok!!
xsatria Rock-ET ver 1.0 [Meteorology & Technology]
Posted in xsatriarobotics with tags kontes roket indonesia 2009, korindo on August 11, 2009 by satriant
the rocket can measure the different of Grafity, when the rocket lauched..the Gravity will be measure by
ADXL type sensor, that can detect the diff of G’….hehe….
not only grafity but also so many things that the rocket can do…measure the temperature, Humidity and Air Pressure….
the data transmitted from the rocket to the ground base [we call it as GROUND SEGMENT] via Wireless Serial Connection.
it’s up to 2 km far…hohoho……
@ the ground segment,we can see the measurement result of the rocket!! before fly away to the sky….the rocket was Calibrated first, to minimalize the error, so the result can closely accurate….
I’ made the software for the ground segment with C, that the software can logging and make a graphic.
I use ATmega8 for controller, I think it’s enough…
@future, I’m planning to make a Inertial Rocket with Navigation System…
so I can control the rocketttt…and fly to moon…….
heheheheeeee……
best regards….
Tommy Agustianto





