Working code with minor revision.

Dan’s code works with minor revision. We can print the result to the
file in SD Card later. :)