Thursday, April 30, 2015

Scrolling LCD 16x2 First Row Only

 It's tricky but not impossible

 All I have to do is update the cursor position of second row so it seems still. :)

Read Digital Pin and Serial Message, Display it on LCD using Arduino

 In addition of my previous tinkering with LCD on arduino nano, I add a chunk of program to display the state of digital pin 7 on second row LCD.

I also remove the scroll command, package it as separate function but not called. I plan to using another scrolling method, some code without delay. (had it in mind, but still lazy to coding it, maybe next)

Monday, April 27, 2015

Displaying and Scrolling Text Typed via Serial Monitor on Arduino Nano

 Here we go. The challenge is reading serial data and store it in string, but fortunately there is readString command, :)

(I take the shoot from Photo Booth on my Mac)

Arduino Nano Clone on OS X Yosemite

 After subconsciously try it on my debian machine about a week, now when I have a chance to write on arduino IDE on my Macbook, it wont upload the sketch, no port for nano.

installing FTDI driver didn't help because it use CH340G chip for com.

Grab the driver from

install it


no change, :(

found out that we have to run this on terminal

sudo nvram boot-args="kext-dev-mode=1"


yup, the life is easier again, :)

Thursday, April 23, 2015

Mengirim Perintah ke Arduino Nano via Bluetooth

Menggunakan HC-05

Arduino Nano

Menyalakan LED 13 (blink tanpa delay)

Menyalakan LED 3 dengan mode PWM dengan perintah analogRead, sehingga nyala LED berangsur-angsur dari redup ke terang ke redup lagi (255 tingkat kecerahan).

Menyalakan LED 2 dengan perintah  melalui port serial bluetooth dari Mac OS X.

(program ditulis dan dijalankan di linux Debian)

led pin 3 dapat dinyalakan (setelah microcontroler tersambung dengan komputer via bluetooth) dengan mengetikkan 'nyala' atau 'mati' pada konsole di komputer.

Monday, April 20, 2015

MotoGP Argentina

 It's interesting watching Rossi's fighting a mob of Ducati riders and hunting the sliding and panicking Marquez Honda. 

The extra hard tires help though.

Sadly, the excecution's not smooth. 

Rossi, Dovi, Ianonne.

Saturday, April 18, 2015

Woman In Love (Barbra Streisand)

Dengar lagu ini sejak kecil,  sekitar umur tiga atau empat tahun, sebelum TK. Mulai searching lagu ini sejak tahun kedua kuliah, dan ketemu kemarin sore jam setengah lima, dua belas tahun kemudian, :)

Woman in Love

Friday, April 17, 2015

AngryBird-Like Velocity Changing Using ActionScript on Macromedia Flash 8

Velocity is set by dragging box. Process begin when the press on the box is released.

The 'Pig' animation is triggered whenever hitTest between 'kotak' and 'pigpig' returned true value

Wednesday, April 15, 2015

Fritzing, One Stop Apps for MicroController

We could write code in it, connecting parts on breadboard (or project-board), auto-route it to schematic and pcb layout (single or double layer).

It has several arduino board ready on parts section

Monday, April 13, 2015

MotoGP Austin


I immediately saw that the first corner  is ridiculously tricky

Well, almost all corners are, :)

(Very weird circuit layout)

And I'm sure the delay due to water spillage at turn 3, which is not present at the Moto2 race, break the mood of all. 

(Where is it come from? The bridge?)

Honda goes without saying

Battle happened between Yamaha and Ducati for 2nd (Rossi n Dovi) and for 4th (Lorenzo n Ianone)

Used to delivered just power, now apparently ducati cornering's improved 

With Yamaha have just cornering advantage, and still unsolved the front tire problem,  it obvious that Rossi have to give it all in his trick bag, and yet he's still struggling to just keep in second.

Kualifikasi MotoGP


Senang melihat keceriaan para pembalap di lintasan

(Juga aksi Marquez yang merebut pole dengan motor cadangan, tentu saja)

Saturday, April 11, 2015

Blink Without Delay Problem on Arduino

Well, not for all, but for me it becomes problem while turning led on using analogWrite command, some led just won’t completely shut down.

(Maybe it completely unrelated, but my analog reading on A0 is oscillating, very unstable)

Thursday, April 9, 2015

Sensor Analog di Arduino, dengan monitor via bluetooth

KProgram ini digunakan untuk melihat nilai sensor (berupa tegangan) di port analog 0 (A0) di ATMega328.

Di sini sensor diwakili oleh potensiometer yang kaki tepinya masing-masing dihubungkan ke vcc dan ground, kaki tengah dihubungkan ke port analog 0.

Microcontroler membaca port analog 0 yang nilainya kemudian dikirimkan secara serial via bluetooth, juga untuk menyalakan empat led sesuai dengan nilai pembacaan sensor.

Karena ATMega328 memliliki resolusi pembacaan analog sebesar 10-bit, maka led diset sedemikian sehingga led 1 menyala jika nilai kurang dari 255, led 1 dan 2 menyala jika nilai sensor antara 255 dan 512, dst.

Sebagai tambahan, perintah yang digunakan untuk menyalakan led adalah analogWrite() bukan digitalWrite() sehingga meski nilai sensor kurang dari 255, kita masih bisa membedakan levelnya dengan tingkat redup-terangnya led pertama (0 mati, 50 redup, 255 nyala terang).

Monday, April 6, 2015

Arduino with HC05 Bluetooth Module on OS X Yosemite

Got HC05 Bluetooth Module last Saturday at electronic store, connect it with my Arduino Pro Mini (ATMega 328 based) the usual way: tx—rx, rx—tx, vcc—5v and ground—0v. Powered it on alongside the Pro Mini. The led indicator blinked, good sign, :)

Pairing with my Mac is easy, but make sure the pairing code is 1234, mac use 0000 as default code. If paired successfully the led blink pattern will change. 

Open the serial monitor and, nothing appeared, :(

Maybe the IDE busy so I open the OS X terminal and access using screen:

$screen /dev/cu.HC-05-DevB 

Still nothing happened. 

Unplug all the cable, plug it again. And yup, there’s serial output (using Arduino IDE serial monitor or screen command on terminal )

I have a Mac with Yosemite.
Apparently, most of my problem with arduino board is loose cable connection, :)

Saturday, April 4, 2015

Arduino Pro Mini (ATMega 328 Based), my New Toy

I saw it at electronic part shop while shopping for my DIY guitar preamp part. It based in ATMega 328 and it waking up my years-sleeping microcontroller spirit :D

I always love assembly language, I have several project on ATMega based microcontroller as programmer but it's just that. I just love programming without bothered by hardware, minsys or whatnot.

It's true that arduino language is not asm; it's simplified C. But it come in package, I just have to program it and it'll work. It's the closest thing I got to hardware related interface, for now (I still have a plan that some day I'll master both microcontroller hardware and software interfacing :) )

Anyway, I bought this Arduino Pro Mini and an USB to TTL module.

Thursday, April 2, 2015

DIY Guitar PreAmp (or Distortion StompBox) using TL 074

My string acoustic-electric guitar is borrowed and not back, leave my classic nylon string Yamaha guitar and an Ibanez clone with is by itself stand at the opposite pole of my need (rock/metal amplified sound or warm natural classic).

I need something between that and decide to install piezo on my classic nylon string. It pretty straightforward, just need few minutes. The problem is when i plugged it on my amp, it has almost no sound. I have to crank the volume knob all the way up to hear 'normal' level volume. It need pre-amplifier.

I uninstalled the piezzo (what I'm thinking at that moment, :D ) and using my Ibanez clone as testing guitar, with normal jack and all.

here the schematic

It Occured to me that this Pre-Amp could act as Distortion effect if we set the gain super high. I do it by add a resistor parallel to 100k. And the sound is suddenly very different. It's very clipped and distorted yet there's something missing (for me). I like soft clipping. So I plan to tinkering with some resistor value or add potentiometer to it

If we don't want distortion, just louder gain, we could always using two stage preamp (I don't know the proper name of it)