Wednesday, 26 November 2014

CDT student project



Traffic light control

Tuesday, 25 November 2014

cs102 project

Project specifications

PWM motor driver

A simple pwm motor driver. This circuit generates buzzing sound when duty cycle isn't enough to turn the motor.

Wednesday, 19 November 2014

Assembly code for generating Fibonacci series

Fibonacci

shortest code by JEERAMETH KLOMSING

Cat     Add 7
        Sta 7
        Out
        Add 99 
        Sta 99
        Out
        Bra Cat
        Dat 1

code by Som-O

      LDA  A
      OUT
      OUT
      ADD  A
      STA  B
      OUT
      ADD  A
      STA  A
      OUT
      ADD  B
      BRA  4
      HLT
A     DAT  1
B     DAT  1
---------------------------------------
Clear memory
by Wasit
begin   lda x
        add one
        sta x
x       dat 305
        bra begin

one     dat 1

Tuesday, 11 November 2014

Pi microscope

1. Removing the lens by using two pins to turn the lense cover in anti-clockwise direction
2. removing the eyepiece of the microscope and replaced by the Pi camera
3. Here I used an old calibration sample. The distance between two lines is 0.2mm (200 micron)
4. The the tiny number on sample is scaled up and inverted on screen
5. When I used 4x objective lense
6. and 10x
7. Finally the 40x objective lens. At this magnification the image was quite blur and it showed significant color aberration.
8. by adjusting location of condensing lens below the sample has improved the quality.

In the image7, the space between two black lines was scaled up to almost completely filled the width of window (2592 x 1944). Roughly about 12.5 pixel per micron. An this will be helpful in my project, which I need to look cells, which has size around 10 to 50 micron.

Wednesday, 15 October 2014

pickle

After writing and loading JSON files several times to record and read a object of tree structure, I found it quite difficult to minimize the size of the JSON files because some floating point number in the object is printed to character and take up more memory space.  Google for few seconds, I found a solution to save files more efficiently. Surprisingly it is easy solution from socksolution.com. Pickle is going to save my file and my sleeping time as well. Here is the solution.

To record the object to file:

import pickle
pickleFile = open('root.pickle', 'wb')
pickle.dump(root, pickleFile, pickle.HIGHEST_PROTOCOL)
pickleFile.close()



To read the file to the object:

pickleFile = open('root.pickle', 'rb')
root = pickle.load(pickleFile)

pickleFile.close()


Tadaa!

Thursday, 9 October 2014

Top programming languages

What is the best programming language? A IEEE spectrum article on top list programming gave a good conclusion. Java seems to be the top and widely used. C/C++ has long history and become standard for low level application for embedded systems. Python is at the 4th for the web application. I personally like Python because it easy to maintain and fast coding!

top 10 progamming langauage Top 10 Programming Languages to Learn

I also did a diagram according to technology of some popular websites by simply extract the words in columns and put them in D3 wordcloud



“Front-end”, “Back-end”, Database, JavaScript, C, C++, Go, Java, Python, BigTable, JavaScript, Hack, PHP, C++, Java, Python, Erlang,  D, Xhp, MySQL, HBase, Flash, JavaScript, C, C++, Python, Java, MySQL, BigTable, JavaScript, JavaScript,  PHP, MySQL, PostgreSQL, JavaScript, ASP.NET, “Microsoft_SQL_Server”, JavaScript, ASP.NET, “Microsoft_SQL_Server”, JavaScript, PHP, MySQL, MariaDB, JavaScript, Python, BigTable, JavaScript, ASP.NET, “Microsoft_SQL_Server”, JavaScript, C++, Java, Scala, Ruby, Rails, MySQL, JavaScript, PHP, MySQL, JavaScript, Java, C++, Perl, JavaScript, Java, JavaScript, “Oracle_Database”, JavaScript, Java, JavaScript, Scala, JavaScript, C# , ASP.NET, MVC, “Microsoft_SQL_Server”