Integrate timer to send info every 500ms

depends on #22 
fixes #11 

integrate a timer, which sends info to js code every 500ms.