Capacitive Sensing

Capacitive sensing with arduino can easily amaze your friends as it can easily sense human touch through any conductive material such as metal, graphite (pencil drawing), or even fruits (juicy)! First of all, you will need to download and install the CapitiveSense Library from here. Restart your arduino and you should beable to see examples code likes below: capacitive example   Then, construct a circuit with arduino uno board. The resistor I using here is 10k ohm but the best would be 1M ohm. sketch_bb   You will need to upload the following sketches: Touch each end of the sensor and you should start seeing value changes in serial monitor. You may connect it with any conductive material, in this case, i choose vege and fruits. 20141201_220147 You may further enrich the output using processing + serial. The outcome:  

AutoHotKey force app to fullscreen

Sometime you need to full screen an application that you have no access to the source code. AutoHotKey come in handy:
  1. grab and install from here.
  2. Then, copy the code and save it as fullscreen.ahk, double click it.
  3. You can now press CTRL+Z to toggle the active application into full screen mode. (NOTE: the code assume your screen resolution is 1920×1080)

Checking arduino port on ubuntu

Sometime in processing, you will need to listen to the serial port that arduino attached to. Finding out the portIndex is easy on windows by simply checking in Control Panel -> Device Manager. However when you are in linux (ubuntu), you will need to use command to do it.
  1. First plugin your arduino to usb
  2. type lsusb to see list of attached usb devices
  3. type dmesg | tail and it show you which serial port your usb device bind to. In my case, it is something like: [3486.xxxxxx] usb 2-2: FTDI USB Serial Device Converter now attached to ttyUSB0
  4. or, you may also type dmesg | grep tty
  5. Then you need to figure out the index of this ttyUSB0. Ubuntu reserved ttyS0 to terminal and 1 until 31. normally ttyUSB0 means 32.

Arduino Clone vs FTDI

FTDI has been acting very unprofessional by pushed out a new driver with Windows Update that bricks counterfeit/clone/incompatible FTDI chips by setting the Product ID to “0000”. Here is the process that worked for me to return the FTDI chip back to its original VID:PID of 0403:6001 from a Linux (Ubuntu) computer.
  1. Plug in your bricked device.  If you run “lsusb” it should show a device at “0403:0000″.
  2. Download ft232r_prog from ft232r_prog (v1.24) and extract to a folder
  3. Install the build dependencies by running “sudo apt-get install make gcc libftdi-dev"
  4. Change directory into the folder cd /ft232r_prog
  5. Type “make” to build the program
  6. Now run “sudo ./ft232r_prog --old-pid 0x0000 --new-pid 0x6001
  7. You are done.  Unplug and re-insert your USB device and run “lsusb” again.  It should show an id of 0403:6001
However, if you just wanto use the chip on windows, you may follow this video tutorial: or
if somehow your USB Serial Port show a warning icon after you done all these, you may wanto follow this tutorial to set the PID from 0000 back to default 0001.
  1. Downlaod
  2. Install and run FT_Prog
  3. Click the magnificent glass and you see Product ID is 0x6000
  1. Click USB Device Descriptor
  2. On the right panel, select FTDI Default
  3. Click the lightning icon to Program Devices
  4. Click Program button and it will be alright.

Normal Map

We asked for normal map to use on 3d coin, but our freelance designer gave us this: 5Cent_LoNormalsMap   This is not normal map, not even quite a bump map. Here is a better explanation: normalMapMiniTut Malaysia colleagues trains many good 3D artist, but mostly for the pre-rendered video use. They should expose more to real-time rendering 3d modelling.  

Boot-up rPi screen by 90 rotation

My monitor allow me to rotate it 90degree into vertical pos, which is good for my web design usage. In ubuntu, i can install a gui app and it allow me to rotate the screen easily with similar experience on windows system. However, rPi do not have a bios, so the way to do it is to edit /boot/config.txt Then, add in this line at the bottom of the file if it is not exists yet: Refer here for more info.

My First rPi Experience

Bought over a raspberry pi model B (quite an old model) from a friend and started my journey venture into this platform. With a background from Arduino, I manage to pick it up without much troubles. 20141013_225759
  1. rPi is a much more powerful single board computer than Arduino UNO. It run real OS – linux.
  2. There is no HDD but only SD card as storage.
  3. The default login, username: pi, password: raspberry
  4. If you cant see your favourite GUI, type startx in terminal, after-all it is linux.
  5. In Arduino, you write in Arduino IDE; In rPi, you write using any programming language, but most popular one is python.
  6. In Arduino, it’s Input/Output pin; In rPi, you got GPIO
  7. You can light an IDE using command line! Refer Here
  8. For prototyping on breadboard, You need something extra, can be purchase here
  9. You need to have Internet access. i am using a wifi in this case.
  10. Your python wont work out of the box with GPIO, follow instruction here to setup
  11. Then, you may follow this tutorial to blink an LED
  12. In case you cant type # correctly (fucking important for programmer) in rPi due to stupid mapping to UK keyboard by default. try Ctl+Alt+3 (but only work in idle) as describe here or better, follow the answer here to change XKBLAYOUT from uk to us
Ok, here is some additional note about running python scripts, you may ignore this if you already familiar with linux:
  1. You can always start idle in sudo mode, open the file and hit F5
  2. you can always type command in terminal, python ./ Remember to chmod +x  the file first to make it executable (some extra step that linux have compare to windows).
  3. or.. you can prepend this line #!/usr/bin/env python in Then, you can start it in terminal straight away without calling thru python: ./

Ordering Beagleboard from Element14 Singapore

Tried to order Beagleboard from element14 and I never expect the process can be as tedious as this. Untitled So, this is my replied to them:
Wah damn mafan… come on, it’s just a beagleboard, i not ordering uranium! I will never recommend my frens, clients and students buy this item from Element14 Sg anymore.
1. Yes, you may ship to either address.
2. Fuck singapore custom. ask them get from Malaysia SSM.
3. Everything is on wikipedia and google.
  I give up on this order due to stupid people who tried to stop the earth from rotating.