<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2137743283716015909</id><updated>2012-02-14T10:26:25.373+08:00</updated><category term='arduino'/><category term='laser'/><category term='technology'/><category term='passport essential'/><category term='HDD'/><category term='warez'/><category term='2.5&quot;'/><category term='java'/><category term='watts'/><category term='DIY'/><category term='wd'/><category term='programming'/><category term='LED bling'/><category term='graffiti'/><category term='algo'/><category term='ohp'/><category term='plasma'/><category term='500Gb'/><category term='FYP'/><category term='USB'/><category term='dB'/><category term='computer'/><category term='log'/><category term='PC'/><category term='dsa'/><category term='WIN'/><category term='DCS'/><category term='c++'/><category term='lcd'/><category term='hardware'/><title type='text'>shinajaran</title><subtitle type='html'>Always two there are, a master and an apprentice. -yoda</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>92</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5638832395610202713</id><published>2012-02-14T10:26:00.000+08:00</published><updated>2012-02-14T10:26:25.387+08:00</updated><title type='text'>[game] Shogun2 Legandary difficulty level for Tokugawa clan pt2</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Perseverance&amp;nbsp;my friends. After countless events of total annihilation by my rival daimyos', my army turned against me, rebellion created by enemy monks. I survived until turn 220.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The methodologies to win the war are rather&amp;nbsp;idiosyncratic. War is all about money and economics.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;My shogunate could not progress at the tech tree at a faster pace then my rivals. Hence my soldiers are mainly regular yari ashigaru and bow ashigaru with the exception few units of sword samurai. My castles are 2 level below my rivals and the production speed of my soldiers are rather limited. Most of the time, my army was outnumbered. I learned to let go my ego of banging head on with the&amp;nbsp;hardened&amp;nbsp;enemy and circumvent them using my newly devised methods.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Having said that amassing a large fleet of ships, large&amp;nbsp;contingent of army and agent units are very taxing on the finance for the rival state. I make a good guess on the financial status and the rice supply status. At every turn, maybe my rivals are not making enough profit to cover the new army created.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;If you guys could recall months back &lt;a href="http://shin-ajaran.blogspot.com/2011/11/game-shogun2-legandary-difficulty.html" target="_blank"&gt;game play at turn 45&lt;/a&gt;, I have a couple of metsuke (secret police) running around, coupled with some monks and ninjas.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;My metsukes' was leveled up regularly by apprehending rival agent units at each and every turn. The success rate of apprehending grow slowly from 20% to 95%. While level up, I would choose to develop the bribery skill to the highest level. Usually, the apprehending would be successful, because Tokugawa clan specialty have a +2% of success rate.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;I did level up my ninjas' too. Sabotaging rival rice plantations at every turn. This would decrease the rice supply by -1. Beside rice plantations, structures such as castle gate, rice merchant, tea house are possible targets too. If rival army are marching near to my&amp;nbsp;territory, my ninja would sabotage the army to buy me time to lay an ambush. The skill sets of the ninja are build towards the "Ninjutsu" at level6. After my ninjas were leveled up, I start the process of&amp;nbsp;assassinating&amp;nbsp;rival generals, to make the rival army bare naked without the positive influence of a general.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;As for my monks, I send them far back into enemy lines, creating rebellion at poorly garrison castle. Of course, along the way I would use my monks to convert the enemy agent units.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The above 3 steps requires very little money to sustain. The bulk of my profit goes to building elite shock troops. It really took a very long time to build army that are truly useful.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;With my newly acquired army, sufficiently trained agent units and MONEY. The journey of clearing the Hatakeyama clan eastwards begin. At that point of time, having war at both sides of my border is a strict no no to the financial status. At the west borders, I have my agent units sabotaging enemy army and preventing them from marching to my land. At the east borders, my army is still outnumbered by the rivals. Good thing is, not every army are lead by a general. I would use my metsuke to attempt to bribe this category of army. Once successful, I would march my army near to this newly acquired army and enter battle with the rival and try to outnumber them. Once the enemy retreat or loses the battle, I attack the castle and loot the castle. Looting gave my shogunate a 20K income. Remember to set the newly acquired castle to no tax and put a metsuke to oversee the town, just in case of rebellion.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;With the new money, I could attempt to bribe more army. Some army are lead by general. Simple, send in the ninja to attempt&amp;nbsp;assassination. If successful, send in the metsuke to bribe. If successful again, merger the new army with the current ones I have. Send in a ninja to sabotage the castle gate before sending in the merged army of mine. If successful, loot the castle.&amp;nbsp;My rival clan recruited super elite units such as Bow hero, Sword Hero, Yari Hero, Great Guards and more. Bribing this army would make this units at my disposal. Indirectly, my army get level up without upgrading my castle facilities.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;The cycle repeats itself again. With some variations along the way of course.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-ahp09yGaKZA/Tzm8NKxNQaI/AAAAAAAAATU/8i_Uwm9zkag/s1600/1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-ahp09yGaKZA/Tzm8NKxNQaI/AAAAAAAAATU/8i_Uwm9zkag/s400/1.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;revenge is sweet.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-0GnFnTTBH9w/Tzm8O6_uZiI/AAAAAAAAATc/m3w8Ty9MG9Q/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-0GnFnTTBH9w/Tzm8O6_uZiI/AAAAAAAAATc/m3w8Ty9MG9Q/s400/2.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Game statistics suggesting the gruesome path that leads to the rising of my Tokugawa clan.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-Sa3tguyFQZQ/Tzm8QlFf9lI/AAAAAAAAATk/L482Ly03JaQ/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/-Sa3tguyFQZQ/Tzm8QlFf9lI/AAAAAAAAATk/L482Ly03JaQ/s400/3.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I have created 4 vassal states, just to trade with. Trading will increase the financial profit.&amp;nbsp;Occasional&amp;nbsp;rebels were created by my monks. Then I would send in my generals to put out the rebellion. Indirectly, my generals get to level up!&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-v5Ydjs2oJu8/Tzm8SnPQy9I/AAAAAAAAATs/Q5_bEeGB0WM/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-v5Ydjs2oJu8/Tzm8SnPQy9I/AAAAAAAAATs/Q5_bEeGB0WM/s400/4.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;The characteristic of the Tokugawa clan requires the training of the arts, rather than bushido.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-A6TOVhJhjxw/Tzm8UjYDP9I/AAAAAAAAAT0/BOAMA4v_Ujs/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/-A6TOVhJhjxw/Tzm8UjYDP9I/AAAAAAAAAT0/BOAMA4v_Ujs/s400/5.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Taxes are on the high side, but the populations are happy! Just train the Daimyo with lots of honour.&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-en9wIWSIq6M/Tzm8WjMHU8I/AAAAAAAAAT8/XCBFLEDDjYo/s1600/6.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/-en9wIWSIq6M/Tzm8WjMHU8I/AAAAAAAAAT8/XCBFLEDDjYo/s400/6.jpg" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;One of my awesome general with the traits of "Intimidating"&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-l_klbHjqB3c/Tzm8YJfQ0LI/AAAAAAAAAUA/cGHvKeBU5Xs/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="225" src="http://4.bp.blogspot.com/-l_klbHjqB3c/Tzm8YJfQ0LI/AAAAAAAAAUA/cGHvKeBU5Xs/s400/7.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;One of my awesome army with awesome agent units.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Check out my save game&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://db.tt/3ZkCU8aJ"&gt;http://db.tt/3ZkCU8aJ&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5638832395610202713?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5638832395610202713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5638832395610202713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5638832395610202713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5638832395610202713'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2012/02/game-shogun2-legandary-difficulty-level.html' title='[game] Shogun2 Legandary difficulty level for Tokugawa clan pt2'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ahp09yGaKZA/Tzm8NKxNQaI/AAAAAAAAATU/8i_Uwm9zkag/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1816247486805746521</id><published>2012-02-07T15:09:00.000+08:00</published><updated>2012-02-07T15:09:28.083+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[Arduino] 4x4x4 LED cube</title><content type='html'>I was really caught up with work, as always but I will try to update as frequent as possible.&lt;br /&gt;&lt;br /&gt;back in 2009, I came across the idea of making &lt;a href="http://shin-ajaran.blogspot.com/2009/06/diy-3x3x3-led-cube.html" target="_blank"&gt;3x3x3 LED&lt;/a&gt; cube as part of the teaching material for programming, electronics , and leading the concept to computer engineering.&lt;br /&gt;&lt;a href="http://shin-ajaran.blogspot.com/2009/06/diy-3x3x3-led-cube.html"&gt;http://shin-ajaran.blogspot.com/2009/06/diy-3x3x3-led-cube.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now at late 2011/ early 2012 one of my project students, Eagle. He picked up the idea and superseded&amp;nbsp;my 3x3x3 with his creation of 4x4x4 LED cube with some really awesome electronics circuit skills and soldering skills... that is soldering of 48LEDs into 3 layers, each layer consist of 16LEDs, with a XYZ+ (I lost count of it) solder joints. &amp;nbsp;IMBA!! To make life easier he is making this into an arduino shield for those that are interested to pick it up easily (minus the hassle of soldering, just plug and play).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4d2nClgDehY/TzDJWoljyUI/AAAAAAAAAS8/20_vO7t5xTI/s1600/IMAG1466.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="237" src="http://3.bp.blogspot.com/-4d2nClgDehY/TzDJWoljyUI/AAAAAAAAAS8/20_vO7t5xTI/s400/IMAG1466.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/-qLHxOItODfI/TzDJTo_8nCI/AAAAAAAAAS0/rt3VbqYBE7A/s1600/IMAG1465.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://4.bp.blogspot.com/-qLHxOItODfI/TzDJTo_8nCI/AAAAAAAAAS0/rt3VbqYBE7A/s400/IMAG1465.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-42iuY86tsD8/TzDJZwMBqpI/AAAAAAAAATE/ZLiM1sq-oyg/s1600/IMAG1467.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://4.bp.blogspot.com/-42iuY86tsD8/TzDJZwMBqpI/AAAAAAAAATE/ZLiM1sq-oyg/s400/IMAG1467.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-42iuY86tsD8/TzDJZwMBqpI/AAAAAAAAATE/ZLiM1sq-oyg/s1600/IMAG1467.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;Now hook it up to the arduino microcontroller. 4pins to control the layers , 4+4 pins to control the individual LEDs at each layer, 4 analog pins to control the dimming effect. Displaying of patterns on the LED cube requires the idea of refreshing the pattern at a high speed, to give human an illusion that there is animation. In actual fact, the LED just took turn to light up, one by one.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;now, code time. This code can be quite scary, looking at the binary pattern used to display the led pattern and using progmem to store the "animations". The code was adopted from an instructable.&lt;br /&gt;&lt;script src="http://snipt.net/embed/afe650fc09b8cf0ee288e7a977353460" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;The end product is totally worth the hours put in to this pet project! Check it out~&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/0GSpClM0yi0" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Next stage, would be modifying the circuit to use LED driver chip MAX7221. Luckily I bought some during my last visit to Shen Zhen.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3_-Tgfbif3Q/TzDNtctUOXI/AAAAAAAAATM/7OKFpKBRDGA/s1600/ledcube+msg.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-3_-Tgfbif3Q/TzDNtctUOXI/AAAAAAAAATM/7OKFpKBRDGA/s1600/ledcube+msg.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;I brought this LED cube around, like a young boy showing off his geeky toy. Upload to my facebook account just to attract some interest.... Little did I know, one of my programming class student surfaced with his 3x3x3 LED cube that he has made.... And the voyage to kernel begins...&lt;br /&gt;check this out yo!&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/iv8QTlsl0qQ" width="420"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1816247486805746521?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1816247486805746521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1816247486805746521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1816247486805746521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1816247486805746521'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2012/02/arduino-4x4x4-led-cube.html' title='[Arduino] 4x4x4 LED cube'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-4d2nClgDehY/TzDJWoljyUI/AAAAAAAAAS8/20_vO7t5xTI/s72-c/IMAG1466.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3345377957387462982</id><published>2011-11-11T13:50:00.002+08:00</published><updated>2011-11-11T13:54:52.533+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><title type='text'>[arduino] RGB led, Introducing LOLSs</title><content type='html'>&amp;nbsp;&amp;nbsp;Introducing LOLSs, an arduino shield made by my student lihsheng using uln2003a darlington.&lt;br /&gt;LOLSs is an acronym, which stands for LED O' LihSheng shield. It uses 3PWM on arduino to control brightness of RGB LEDs. If we use digital output instead of PWM, we could only turn on and off the LED, which is ..... BORING. Supply is 12V, can support about 6RGB LEDS (that is 3x8 LEDs in total)&lt;br /&gt;Behold...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-sziU6pvKlX4/Trytwy6EN1I/AAAAAAAAARw/YKh2wEDdwws/s1600/IMAG1441.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="239" src="http://1.bp.blogspot.com/-sziU6pvKlX4/Trytwy6EN1I/AAAAAAAAARw/YKh2wEDdwws/s400/IMAG1441.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;The component side of stripboard is soldered on the connecting copper side instead&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-S6VB4e5SXC4/TrytzQHygPI/AAAAAAAAAR4/t-mLGK0VFos/s1600/IMAG1442.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://2.bp.blogspot.com/-S6VB4e5SXC4/TrytzQHygPI/AAAAAAAAAR4/t-mLGK0VFos/s400/IMAG1442.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now about RGB LED, in each of them there are 3 LEDs in total which is Red Green and Blue. Red is 2.2v, Blue and Green is 3.5v. Hence we need to use resistors such as 150ohm and 80ohm respectively to limit the current. If not, the LEDs will be burnt. Here, I tested my RGB LED with 1.5v, hence the dim green colour.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cOiJYRFbwHc/TryvSF1VpDI/AAAAAAAAASA/O2QccrW8dGo/s1600/IMAG1439.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://1.bp.blogspot.com/-cOiJYRFbwHc/TryvSF1VpDI/AAAAAAAAASA/O2QccrW8dGo/s400/IMAG1439.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;This is how the RGB led strip looks like. We would need a LED driver circuit to power up long stretch of them. LOLSs can drive up to 6RGB LEDs with 12v 800mAH NiCad battery.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-FS3X1AyYTFY/TryvT-z7mWI/AAAAAAAAASI/jUVpjKpt-Vw/s1600/IMAG1443.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://1.bp.blogspot.com/-FS3X1AyYTFY/TryvT-z7mWI/AAAAAAAAASI/jUVpjKpt-Vw/s400/IMAG1443.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There are 4 "legs" from a normal LED, the longer leg is the anode which we connect the +ve side of VCC. The shorter legs are the cathode which we connect -ve or gnd.&lt;br /&gt;&lt;img src="http://www.ladyada.net/images/minipov2/images/leddetail_t.jpg" /&gt;&lt;br /&gt;Now, how can we wire the LEDs to the arduino?&lt;br /&gt;&lt;br /&gt;check out these diagrams by &lt;a href="http://www.ladyada.net/learn/arduino/lesson3.html"&gt;ADAFRUIT&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.ladyada.net/images/arduino/lesson3sch4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.ladyada.net/images/arduino/lesson3sch4.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now, the fun part. Programming the RGB LED. We could do several of the below in code.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;1. Light the colour one by one&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;2. Fade the brightness of the RGB LEDs with PWM. There is example code to fade 1 LED. It is available at Examples-&amp;gt;Basics-&amp;gt;Fade&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;3. Mix colour of the RGB LED. the value of RGB LED follow this format [255,255,255]. For each colour, 0 to turn off, 255 to turn on. Any values in between is to change the brightness. If all 3 led is 255, what is the resulting colour=? WHITE&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;3. Make the colour change according to music&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;4.etc etc &lt;/div&gt;&lt;br /&gt;Here is my rendition of RGB led with Arduino, based on the sample code given.&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/Kw1ScAkqMZs" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;code here&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;script src="http://snipt.net/embed/7d8ddbb04602083926553d7c2d762ffe" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3345377957387462982?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3345377957387462982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3345377957387462982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3345377957387462982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3345377957387462982'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/11/arduino-rgb-led-introducing-lolss.html' title='[arduino] RGB led, Introducing LOLSs'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-sziU6pvKlX4/Trytwy6EN1I/AAAAAAAAARw/YKh2wEDdwws/s72-c/IMAG1441.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5216489647327404649</id><published>2011-11-03T14:48:00.001+08:00</published><updated>2011-11-04T09:57:58.360+08:00</updated><title type='text'>[game] Shogun2 Legandary difficulty playing for Tokugawa clan</title><content type='html'>I am playing Shogun2 since the last 2 months and you know what, medieval2 last me for a whole 3.1 years!&amp;nbsp;I played all factions and difficulty level. lol&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This campaign is VERY challenging. I got wipe out,&amp;nbsp;annihilated,&amp;nbsp;humiliated, sieged at 10:1 and more.&lt;br /&gt;After a few tries for loosing at the 3-4th turn and the last 40game restarts I did not manage to clear the 30th turn mark.&lt;br /&gt;&lt;br /&gt;Let me give some background information about shogun2 tokugawa clan at Legendary difficulty level.&lt;br /&gt;I started off as vassal for Imagawa with 2000gold, 2 generals, 1unit of yari samurai, 2units each of yari ashigaru and ashigaru archers. I have a metsuke (secret police, good in maintaing order while taxing the population) too. Being a &lt;a href="http://www.totalwars.ru/encyclopedia/how_to_play/015e_enc_manual_hud_diplomacy_options_vassals.html"&gt;vassal&lt;/a&gt; means my overload gets 50% of my $$ and i can only wage a war which pisses off my boss. Politically, putting me at a very passive position. I will explain more later... less income means I can't afford big/elite armies.&amp;nbsp;The whole objective of the game at the early stage is to shake off the vassal status by either Imagawa declare war on me, which hurts their daimyo reputation and diplomatic score or let other enemy rummage over Imagawa. Based on the art of war of sun-tzu, if I let my friend's enemy attack my "friend" and borders me too early, i am in big trouble.&amp;nbsp;&lt;a href="http://baike.baidu.com/view/9212.htm"&gt;唇亡齿寒&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At the start of the game, Oda clan is my arch nemesis and they are marching on my land. Which means, my income from farm got affected, population unrest is higher=&amp;gt; bad and their army outmatch mine in terms of head count and eliteness!&lt;br /&gt;&lt;br /&gt;After many many tries over the weekends playing the game, got wipe out then restarting game, experimenting with the opening strategy to outlast my overload. I think i got one of the effective "opening strategies".&lt;br /&gt;&lt;br /&gt;At 1st turn. offer 20 turns or more of military access to neighbour such as saito and kiso for gold. the more the merrier. I got about 4000 gold for 20turns or 6000 gold for infinite turns. Offer to trade with both of the too, this will generate some income. While still a vassal, let other factions that border you pass your land for a fee. This will generate lots of income. Offer to marry Saito's ugly-greedy-evil-bitch daughter at 120gold (hey, i got 4000 from previous remember?). Straight away the relationship became "very friendly". By doing this , Saito will take Oda (hostile with each other) sooner and defuses the enemy marching on my land and later shadow me from the north against Hattori. With the newly acquired gold, i ordered my metsuke to bribe the oda clan's army that is on my land with 35% chance. A successful&amp;nbsp;acquisition&amp;nbsp;would cost me 3670 with 1unit of yari samurai and couple of the ashigaru units. Next, order my daimyo to attack the remaining Oda force to earn some bad-ass reputation (i always groom my generals to be the level of "intimidating", good for maintaining peace on newly&amp;nbsp;acquired&amp;nbsp;land.). Now the enemy retreated, I had a choice of pursuit Oda at Omi (very fertile land) or not. The fact is, with my current army I have a less than 50% chance of winning. Got to give it to Saito. Research on "chi arts", with the focus of getting my kishio ninja ASAP. These are the featured units for Tokugawa clan. Destroy the "rice exchange", so that the sake den could be build at the next turn. Build the farm land+1 upgrade to sustain the clan. Remaining amount of gold, recruit ashigaru archers but bear in mind the upkeep should not exit the next turn income. Hit next turn.&lt;br /&gt;&lt;br /&gt;Turn 2-4. Build sake den. Train more arches. Research chi-arts to get my kishio ninja. Build trading port and start to send ships to explore for new commodities. Bear in mind, the army/navy maintain cannot be more than the next turn income.&lt;br /&gt;&lt;br /&gt;Turn &amp;gt;4. Upgrade the sake den all the way till criminal syndicate. Behold, my Kishio Ninja. They are expensive tho. 884 for recruiting and 295 for upkeep. By now, Oda should be wipe out by Saito and Hatori is on the rise. Rule of thumb, try to save more gold for rainy days.&lt;br /&gt;&lt;br /&gt;Turn 45. Hojo declare war on Imagawa, my overload. By now, i have some gold at about 2k, an army that could defend my castle and several ninja and metsuke. Here comes the intriguing part. I want to hold Izu the gold producing land held by Hojo and it's kinda far away. I want it so badly i would use my ninja to sabotage imagawa's marching army to delay it by 1 turn so that i could take Izu. But the bad thing is, Hattori would border/siege my castle to the west because Saito gave in to early.&amp;nbsp;Eventually&amp;nbsp;Takeda will then border Izu and overwhelm my castle with their elite calvary. Build a temple too, and the monks recruited could be use to cite unrests in rival land. The rebels will eventually overpower the owner and own the land and thus I would attack the rebels. Good way of taking their land without inciting war.&lt;br /&gt;&lt;br /&gt;The AI in shogun2 is AWESOME, almost 50+ game restarts with different strategies i experienced different game play and still end up loosing at 70+ turn.&lt;br /&gt;&lt;br /&gt;The only time i played until 100+ turn was I did not participate in the war against Hojo and my overload was killed, freeing me from my vassal status. With my monk+mesuke+ninja strategy i took many lands and maintained a chummy relationship with the owner which I took the land from. Awesome isn't it. Things went south when my favourite general Iyeyasu (historically, he created the tokugawa shogunate that runs for 265 years) and the next inline to be daimyo got&amp;nbsp;sandwiched&amp;nbsp;by Hatano, Asai and Kitabake while retreating to the nearest castle. Just a few more inches and he will be safe. Because playing at Legendary difficulty, i could not do a quick save nor a reload, I can't turn back time. Sounds like life huh?? After many set backs i resort to manually copy the save game file to create a "backup" which I found out later.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-rVE3Ya6oRFE/TrI4M6ygNUI/AAAAAAAAARM/7mBkyWtJ9Ho/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://4.bp.blogspot.com/-rVE3Ya6oRFE/TrI4M6ygNUI/AAAAAAAAARM/7mBkyWtJ9Ho/s320/1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-F9hP4NEDFfA/TrI4OsgWY-I/AAAAAAAAARU/UcHj-WlWbz0/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://3.bp.blogspot.com/-F9hP4NEDFfA/TrI4OsgWY-I/AAAAAAAAARU/UcHj-WlWbz0/s320/2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-VI82cpFMsbQ/TrI4QRu-JhI/AAAAAAAAARc/y8nwekRqahc/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://4.bp.blogspot.com/-VI82cpFMsbQ/TrI4QRu-JhI/AAAAAAAAARc/y8nwekRqahc/s320/3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-FPw_ROqPozE/TrI4SG09eoI/AAAAAAAAARk/a4z_JxUu0dY/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-FPw_ROqPozE/TrI4SG09eoI/AAAAAAAAARk/a4z_JxUu0dY/s320/4.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;If you are interested to pick up from where I left with, here is the game saved at turn 45.&lt;br /&gt;&lt;a href="http://db.tt/5JD5ZfvS"&gt;http://db.tt/5JD5ZfvS&lt;/a&gt;&lt;br /&gt;paste it in the saves_game folder at C:\Users\"username"\AppData\Roaming\The Creative Assembly\Shogun2\save_games&lt;br /&gt;&lt;br /&gt;share with me your strategies too~!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5216489647327404649?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5216489647327404649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5216489647327404649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5216489647327404649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5216489647327404649'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/11/game-shogun2-legandary-difficulty.html' title='[game] Shogun2 Legandary difficulty playing for Tokugawa clan'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-rVE3Ya6oRFE/TrI4M6ygNUI/AAAAAAAAARM/7mBkyWtJ9Ho/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-528120007017459014</id><published>2011-11-01T16:15:00.000+08:00</published><updated>2011-11-01T16:15:42.534+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><title type='text'>[Arduino] water sensor</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-totkVTttoYI/Tq-nHWc5gxI/AAAAAAAAAQ8/32TyGiC9K3I/s1600/IMAG1297.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://2.bp.blogspot.com/-totkVTttoYI/Tq-nHWc5gxI/AAAAAAAAAQ8/32TyGiC9K3I/s320/IMAG1297.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-lxblTPrMtXk/Tq-nJmeXsSI/AAAAAAAAARE/vaBlo3MxYDw/s1600/IMAG1298.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://4.bp.blogspot.com/-lxblTPrMtXk/Tq-nJmeXsSI/AAAAAAAAARE/vaBlo3MxYDw/s320/IMAG1298.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;I was tinkering with the idea of water sensing with arduino. The rain sensor / water sensing kit/ water detector/ is kind of hard to come by from the Internet stores. Courtesy of Mr.ChongSP, I get to sample his water detector PCB.&lt;br /&gt;Thanks!&lt;br /&gt;The concept of working is the gap between the PCB routes will close when there is a water droplet run across it.&amp;nbsp;Water conducts electricity. &amp;nbsp;With the appropriate pull up resistor connected with the PCB kit as per the diagram below, we could get the components up within minutes.&lt;img src="http://i55.photobucket.com/albums/g146/icecreamterror/Rain.jpg" /&gt;&lt;br /&gt;Quickly I hook it up with my arduino and used the "button" sample code. i.e the switch button is now my water detector. If there is water, light up the LED, and if there is none off the led......&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/V94dtebDGKs" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Now, here comes the interesting part.&lt;br /&gt;1. instead of the usual project of "detect rain-retrieve-laundry" type of application, can we have something more interesting????? I have at least one in mind... hehe&lt;br /&gt;2. is there a way i could do away with the PCB water detector, it looks kinda out of reach to me. Sure! how about using double row male PCB header?? hehe&lt;br /&gt;&lt;img src="http://www.technobotsonline.com/images/detailed/12/Ext-2700-503.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-528120007017459014?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/528120007017459014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=528120007017459014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/528120007017459014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/528120007017459014'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/11/arduino-water-sensor.html' title='[Arduino] water sensor'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-totkVTttoYI/Tq-nHWc5gxI/AAAAAAAAAQ8/32TyGiC9K3I/s72-c/IMAG1297.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5136371990428038800</id><published>2011-10-10T16:54:00.000+08:00</published><updated>2011-10-10T16:54:00.024+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><title type='text'>[Arduino] Bi-Directional DC Motor Control With Arduino Only.</title><content type='html'>This is probably not the best way to get it done. Nonetheless, we could use Arduino Digital I/O pins configured for PWM to control a small little motor that is meant for solar use. The reason being, the current requirement for solar motors are much lower compared to tamiya motors etc etc at the toy scale.&lt;br /&gt;The risk of frying the Arduino is much lower, but doesn't mean that it will not fry the arduino!&lt;br /&gt;&lt;br /&gt;BEWARE of the risk involved as I am not responsible for your own doings.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ZdvRyXh1R60/TpKwp7rxN-I/AAAAAAAAAQw/_l_G461tHgo/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-ZdvRyXh1R60/TpKwp7rxN-I/AAAAAAAAAQw/_l_G461tHgo/s640/1.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Programming it is pretty straightforward but with a little twist on the understanding of PWM. Standard PWM outputs are used to the DC motor. If both PWM are arrive timely and "synchronized" i.e LHS is logic low and RHS logic high, the SMALL DC motor would see a complete circuit all the time. The small DC motor is tricked on seeing a +5v applied to RHS and gnd at LHS. To reverse the rotation from CCW to CW or vice-versa, just reverse the PWM&amp;nbsp;outputs.&lt;br /&gt;&lt;br /&gt;The goodness of having PWM output to the DC motor, the rotations could be control instead of just rotating at constant speed. Giving the users acceleration if needed instead of just velocity.&lt;br /&gt;&lt;br /&gt;Now the mind boggling part. How to use the limited number of PWMs on arduino to control 2 small DC motors effectively ?? &amp;nbsp;Try it but at your own risk!!&lt;br /&gt;&lt;br /&gt;enjoy the 1 side motor&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/AWMdkqXBraU" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;code here&lt;br /&gt;&lt;script src="http://snipt.net/embed/0c21c6d37da79745bd63ce544455c206" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5136371990428038800?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5136371990428038800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5136371990428038800' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5136371990428038800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5136371990428038800'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/10/arduino-bi-directional-dc-motor-control_10.html' title='[Arduino] Bi-Directional DC Motor Control With Arduino Only.'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-ZdvRyXh1R60/TpKwp7rxN-I/AAAAAAAAAQw/_l_G461tHgo/s72-c/1.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1028531769799747433</id><published>2011-10-10T16:33:00.002+08:00</published><updated>2011-10-10T16:33:45.246+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><title type='text'>[Arduino] Bi-Directional DC Motor Control</title><content type='html'>&lt;div style="background-color: transparent;"&gt;&lt;span id="internal-source-marker_0.19022202026098967" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;[Arduino] Bi-Directional DC Motor Control&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;As time to come, we need to control motor or maybe even motors using our arduino. The 40mA limitations on the arduino Digital I/O pins made the load for the projects somewhat limited to LEDs and small little motors meant for solar (mainly because these motors are low in current requirements). What if I want to control big motors and really BIG A$$ motors? &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;For tamiya motors (3~6v, &amp;lt;1A), I would recommend something such as the &lt;/span&gt;&lt;a href="http://www.sparkfun.com/products/9213"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;ArduMotor &lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&amp;nbsp;shield available from sparkfun at the cost of USD$25.50 (retired from sales) or the &lt;/span&gt;&lt;a href="http://www.ladyada.net/make/mshield/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;MShield&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; from adafruit at the cost of USD$19.50. I do have the luxury of using the earlier, add a heatsink with some thermal paste and run at 2A max per channel continuously before one of the wheel got stuck and fried one side of the shield. For really BIG A$$ motors at the range of 24V 10A, I used &lt;/span&gt;&lt;a href="http://www.dimensionengineering.com/sabertooth2x25.htm"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;Sabertooth2x25&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; available from Dimension Engineering at the cost of USD124.99. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The issues with buying items from the Internet and to ship from US, the turn around time is toolong (or short at the expenses of the consumer), and vendors locally do not carry it in-stock. For simple motor driver circuits, it is just a &lt;/span&gt;&lt;a href="http://www.sparkfun.com/products/9479"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;L298&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; chip (or couple with L297 for stepper motor control) with the accompanying circuit. The real hassle is to wire it up on stripboard and solder it. Which deter many from getting it done. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;I chance upon Mr.ChongSP’s D&amp;amp;I lab previously. Apart for the &lt;/span&gt;&lt;a href="http://shin-ajaran.blogspot.com/2011/10/arduino-solid-state-relay-ssr.html"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;SSR kit&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;, I also asked for the Bi-Directional DC motor control kit, which was meant for the PIC18 MCU sets. Thanks Mr.ChongSP!&lt;/span&gt;&lt;img height="410px;" src="https://lh6.googleusercontent.com/xAJPcTWMsXdc9-H6u_glPE14UqoMfHcSB69enxERyFEu4hcAWkzRwnuxBlY9K7Oainy6X62nMeUN_dB-2f6w09tcZ0rAK9uo3AAn88Bcus8j3dfA4nA" width="685px;" /&gt;&lt;img height="418px;" src="https://lh5.googleusercontent.com/7d0P_pfcg4Kx0NHsswsb84MtXOpGUjPXK_qXy9PAR0YqfU_6lOVkGufRrEnqg2SHGQT8JSA-CVxRhm7IQHZBMUxNfaPQub7UVHeoIM-R4Vi1J-KAr8U" width="698px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;pretty neat huh.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;After soldering up the components, it is time to wire up the tamiya DC motors to the motor controller to the arduino. Making the ribbon cable connector break out cable is such a chore and demanding on the eyesight. Luckily I got student junhan to help me on it. &lt;/span&gt;&lt;img height="408px;" src="https://lh4.googleusercontent.com/XnYApMIFnlzw7VJSLvDct2cx9oLk6rhtFe_C7sNzs0JhHaxlKEZDojHwPBEX-bLUIb4L7TSlTbjPeQ-9kpZl7NbpbzlICziWoTCq13J1ap8m6wrEwLY" width="682px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Attach the power source. +5v to the motor control (VSS) and &amp;gt;5v for the motors (VS). &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Upload the code to Arduino and waiting for the magical moment...... after 2mins... still no sound, no noise and the motor control L298 is totally cool to touch. Something is very wrong here. Check connection, check code, check corresponding pin on motor control board to arduino and to code , just in case there is a mix up. No fault found. A quick check using the Digital Multimeter, only 0.2V measured across the DC motors. Seems to be dry cells I am using the current is not enough to drive the tamiya dc motors. Thus I swap to a 8.4v 200mAh GP rechargeable, only 1 side of the motor is driving. LOLx &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;A quick swap to conventional DC motors &lt;/span&gt;&lt;img height="379px;" src="https://lh5.googleusercontent.com/r6Wc8vxYql_A9psY0pMpFSNM1m0VVSec7AmGwSOFJSL8aY56WiHvd29OVV4lp0mOvEjW15aiiFXM2wwOsYpQSphTbYpZXuY5Lw81LfoEqBiYiPA4RKA" width="633px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pheww... it worked&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/GSmml-eukiE" width="420"&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Time to source for some LiPO cells to play with my tamiya motors setup with the Bi-Dir Motor control board! &lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;source code with comments here&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;script src="http://snipt.net/embed/7e75abec859cf04317c0692aaf9e865a" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1028531769799747433?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1028531769799747433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1028531769799747433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1028531769799747433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1028531769799747433'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/10/arduino-bi-directional-dc-motor-control.html' title='[Arduino] Bi-Directional DC Motor Control'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/GSmml-eukiE/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4908226118067982116</id><published>2011-10-07T16:02:00.001+08:00</published><updated>2011-10-07T16:07:59.095+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[Arduino] Solid State Relay ( SSR )</title><content type='html'>&lt;div style="background-color: transparent;"&gt;&lt;span id="internal-source-marker_0.16316435695625842" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;[Arduino] Solid State Relay ( SSR )&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Currently the DIY PRT prototype uses a HUMANGOUS 24V 10A mechanical relay + transistor circuit to switch between the 5V MCU digital pin and the 24V 10A DC supply to the motors. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: 11pt; white-space: pre-wrap;"&gt;In the next step of modularizing the building blocks of the DIY PRT into an Arduino Shield, that AWESOME relay could not fit into the shield. Worst part of it, the EM generated by the motors traversed the wirings and this affect the reading of the sensors. Previously, sparks was observed in the mechanical relay when the circuit turned on while the wheels were locked accidentally. If working in enclosed environment with dangerous &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;gases&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 11pt; white-space: pre-wrap;"&gt; (not fart pls), the spark might cause an &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;explosion&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 11pt; white-space: pre-wrap;"&gt;...Worst of it, there is no isolation of high current high voltage circuitry from the low voltage low current MCU. The circuit run a risk of frying the components at the low voltage low current side. Well, unless the opto-isolation circuit (opto-coupler) is included. The circuit get more and more complicated with each additional feature added!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The challenge here is to reduce the size of the relay, have opto-isolation and also simplify the circuit. SSR is here to the rescue~~~ &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Solid_state_relay"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;http://en.wikipedia.org/wiki/Solid_state_relay&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;_________________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;One day while running some errands outside the office, I chance upon a SSR circuit from Mr.ChongSP’s D&amp;amp;I lab. It was displayed outside the lab. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Using my &lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;thick-skin-jutsu&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; i approached the lab TSO and executed my BBS move on her. Mr.ChongSP and TSO Ms.Jana were more than happy to supply me a set of the SSR kit. thx! Look at the timestamp of the pictures, It took me more than a month to acquire, experiment and write down the experiment. Time is a rare commodity (exam, marking, checking, tallying, data entry, checking again)….If you have some spare CPU cycles, consider to supply me some.&lt;/span&gt;&lt;img height="261px;" src="https://lh4.googleusercontent.com/J-U_PP73irKyKFNrkC_Q-Ck8ox-9gr8mMqjl1CkCVbzOkfIum1X25SN4Ztup9WDfA55Y7PI0w6bmhAZecgAwBylc7EE8E8GO6J8g4vYWmrbljhtlXQ4" width="436px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The TSO reminded me that this PCB connection is meant for DC-DC switching from low voltage to not so high voltage. &amp;nbsp;But according to the specsheet of the omron SSR (I love omron relays!) &lt;/span&gt;&lt;a href="http://www.omron.com/ecb/products/pdf/G3VM_351BE.pdf"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;http://www.omron.com/ecb/products/pdf/G3VM_351BE.pdf&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This babe is capable of switching to 280V 100mA !!! Just to be safe, I only try to turn on a LED. lol. A quick peek at the specsheet, this babe is capable of switching DC-DC and also DC-AC depending on the configuration.&lt;/span&gt;&lt;img height="185px;" src="https://lh5.googleusercontent.com/C1BnhGnzIQpy_e6xF9598s-QxxJpNALVCTWCNiAM0ycLmKJaXZWeywZnVsney_7w5PESi2LIlZd3zTX6ni5DW6ZM4kmgp40g5VgyAo9YWYgVnKGPjZ0" width="641px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Soldering the PCB is pretty straight forward with the detail explanation on the silk screen. A point to note, when soldering ICs’ , never mount the IC to the IC holder while soldering the IC holder to the PCB. The heat form the solder might damaged the IC. An advise from my lab TSO many many years back when I was a student here. IMMA such a good student @@”&lt;/span&gt;&lt;img height="270px;" src="https://lh5.googleusercontent.com/r3yvLhgmjayBpc7uPAVREP1FLaI8UANeR9W__JUkAkWrwRSeVU0_H9f6Tt6c5IBL_CgUpoiIyukRBV-Ovzq6HeXX5cm8sdEKQet0KjE1pet-pf0Z2_4" width="453px;" /&gt;&lt;img height="286px;" src="https://lh4.googleusercontent.com/X_81UlcvAEShrlnDBcGWR_zmUEkwNAjCol2P0r6O1H3gaBxaYx0yMKiamC2G0Q56oGad5D9Brh873dNuQ0q-nCH-vshhz-cOZNYh4wqSvFz4SO4zgSA" width="478px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Only plug in the SSR when all the soldering is done.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Pretty neat huh...&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;img height="286px;" src="https://lh4.googleusercontent.com/oDE2KwqS1HiJe3V1JCPSeVK9yGbfOtzEggLSa219Qm4KjkpyKp08KG6U4KH8eNdPEfcoEJ1OHNH1CXnlFZpZ37HTR3GSHdkiN4apZ7hDrsgJeziIlFg" width="478px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Now, connect the GND pin from the PCB to GND pin on Arduino (I found some students make this mistake when wiring up stuffs... The consequences may range from very small such as circuit not working to very serious such as sparks and fried MCU), VCC pin to 5V on Arduino and lastly signal pin to any one of the digital output pins on the arduino.&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;img height="458px;" src="https://lh6.googleusercontent.com/FL5iYz-BXm3l9qaXj_eLXElLo0wHYf_Im_Ajji9TyJHJc4wiVvjgHVQ-Xuf7hQscC_e-Ld0ivpDZ35983kozFLv7pmQDSWC-xQP_j510QHoYBhkp8Bk" width="274px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;As for the code, I use the example code found at File-&amp;gt;Example-&amp;gt;Digital-&amp;gt;Blink.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The SSR will be triggered at specific interval, turning on the LED. Phew.... everything work at 1st try. Now, time to wire this SSR to more interesting hardware (&amp;lt;10 V load plssss). Interested to play with it ????? dXD&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4908226118067982116?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4908226118067982116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4908226118067982116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4908226118067982116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4908226118067982116'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/10/arduino-solid-state-relay-ssr.html' title='[Arduino] Solid State Relay ( SSR )'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6707994089782066813</id><published>2011-08-16T12:26:00.001+08:00</published><updated>2011-08-16T13:54:04.247+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>[Java] Credit Card validity checker using Luhn and known MII</title><content type='html'>I received an email from Mr.Chua yesterday seeking help on behalf of "dignitykitchen" to address the matter on&lt;br /&gt;1. whether there is a way to differentiate the various credit/debit cards eg. AMEX, VISA, DINNERS etc?&lt;br /&gt;2. Is it possible to read the card to get the card number and tell the type of card?&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Suddenly&amp;nbsp;the thought of using this as a case study for Java programming I assignment crossed my mind.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Nonetheless, I could not wait till next semester to start to code and quickly hack up a POC using Java for Mr.Chua. Usually, I code in C++ or python, since we are going to learn Java Programming I soon therefore I shall code more often in Java. The implementation can be ported on C, C++, Java, python, android, arduino (to hook up with a magnetic card reader, more later) etc. As long as the programming "logic" is sound, it can be demonstrated using different language. It is&amp;nbsp;analogous&amp;nbsp;to saying "I love you" in different language..... You get the idea.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The code uses luhn algorithm to check the validity of the credit card number, through a series of steps on choosing alternate number starting from the LSB, perform calculation and finally a MOD10 . The code does NOT check the validity of the card with the credit provider. Features such as manual input, identifying credit card provider were added. The code base can be expanded to&amp;nbsp;recognize&amp;nbsp;more info from the number itself.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Apparently I misinterpreted the word "read" from the email received, after&amp;nbsp;realizing&amp;nbsp;it from another colleague's suggestion on using magnetic card reader with an MCU to "read" in the data from the card and do the validation checks on the MCU iteself. Anyway, the validation code can be ported to the said MCU... e.g Arduino with a &lt;a href="http://www.sparkfun.com/products/8633"&gt;magnetic card reader&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;NOTE: &lt;/b&gt;Source code is for academic use only.&lt;/div&gt;&lt;div&gt;1. place Main.Java and&amp;nbsp;LuhnCheck.java in the same folder. Compile (I did it using javac) and run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Main.java&lt;/div&gt;&lt;div&gt;&lt;script src="http://snipt.net/embed/1f0ba3be27b5f40c85b916c0e77b2bb1" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Luhn.java&lt;/div&gt;&lt;div&gt;&lt;script src="http://snipt.net/embed/7dc1d8024c4a1d5887ac63f6d2a05925" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;there goes my lunch time...... duhz.....&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6707994089782066813?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6707994089782066813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6707994089782066813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6707994089782066813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6707994089782066813'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/08/java-credit-card-validity-checker-using.html' title='[Java] Credit Card validity checker using Luhn and known MII'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3071920897679400963</id><published>2011-07-08T18:00:00.000+08:00</published><updated>2011-07-08T18:00:41.975+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] Arduino VU Spectrum Analyzer</title><content type='html'>While searching on the Internet on interesting way of approaching the purpose of doing&amp;nbsp;Fourier&amp;nbsp;transform and why we need FT for my teaching.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;I came across a fellow arduino user (&lt;a href="http://andydoro.com/vulol/"&gt;http://andydoro.com/vulol/&lt;/a&gt;) that posted his toy project on using Fast Fourier Transform (FFT) to make a VU meter. Couple of years back, I did played with my &lt;a href="http://shin-ajaran.blogspot.com/2009/12/merry-christmas-happy-new-year.html"&gt;home made wireless VU&lt;/a&gt; using electronic components that is available from the store. I am quite&amp;nbsp;surprised&amp;nbsp;that &amp;nbsp;an 8bit Arduino is capable of doing FFT, never did I thought of using it because usually I am using a PIC32dsp for transforming from time domain to frequency domain for signal manipulation purposes. Arduino did gave me the WOW moment for a while.&lt;br /&gt;&lt;br /&gt;From the detailed explanations on his website , i downloaded his code and hook up my LOLshield on my laptop playing some song to enjoy the geekness of arduino LOL shield VU meter.... To my dismay, it doesn't work "out of the box". It just display a 1 liner.... both plug in to my laptop and plug out from my laptop. Seems that the VU only picking up white noise from the&amp;nbsp;ambiance. The connections are correct, pin A5 for +ve signal from the left channel and ground to common ground of the mini stereo jack.&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/-1aSSF6qN2J8/ThbROiV3QLI/AAAAAAAAAQY/QW4Gbz5abRM/s1600/IMAG1139.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://1.bp.blogspot.com/-1aSSF6qN2J8/ThbROiV3QLI/AAAAAAAAAQY/QW4Gbz5abRM/s400/IMAG1139.jpg" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To further complicate the issues, I tried on a variety of input of devices ranging from my android phone, my speakers with a &lt;a href="http://shin-ajaran.blogspot.com/2011/05/kit-set-amp-for-old-sony-speakers.html"&gt;BIG ASS amp&lt;/a&gt;&amp;nbsp;etc. Suddenly IT hit me, probably the analog signal read in at pin A5 is too low to be detected as a usable base band signal where the FFT would chop up the signal in time domain to be put into frequency domain and the harmonics combined as 14 outputs (LOL shield only have 14 columns of LED).&lt;br /&gt;&lt;br /&gt;There are 2 ways to put the analog in on steroids. The hardware method, I would use a TIP31C or TIP41C audio amplifying circuit OR the software method by scaling up the data read in on A5. I choose the software method, it requires little time to prove my hypotheses compared to the hardware method.....&lt;br /&gt;&lt;br /&gt;It is kind of worrying.... the VU is more sensitive now ,picking up&amp;nbsp;ambiance&amp;nbsp;noise which is reflected in the below picture. The LEDs are lighting up ....More work needed to change part of the code to filter AWGN....&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-xMwKkXeY-oU/ThbTs6aAScI/AAAAAAAAAQc/SYSF6C7_1zA/s1600/IMAG1141.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://3.bp.blogspot.com/-xMwKkXeY-oU/ThbTs6aAScI/AAAAAAAAAQc/SYSF6C7_1zA/s400/IMAG1141.jpg" style="cursor: move;" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;But once I plug the mini stereo jack to a Y connector with the headphone stereo jack into my laptop, the noise signal disappear.&lt;br /&gt;Played one of my favorite songs with rich sound texture... Sorry for poor sound quality... I am playing it through my headphone.... still office hour and I can't turn on the LOUD music...&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="349" src="http://www.youtube.com/embed/wPqx6yATzSs" width="425"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;enjoy the code. you would need to place the FFT and charlieplexing libraries in &lt;b&gt;your arduino\lib\&lt;/b&gt; folder to compile&amp;nbsp;successfully.&lt;br /&gt;&lt;br /&gt;&lt;script src="http://snipt.net/embed/bfb505c488d2ffbaef043af7ff8ba0ce" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3071920897679400963?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3071920897679400963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3071920897679400963' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3071920897679400963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3071920897679400963'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/07/diy-arduino-vu-spectrum-analyzer.html' title='[DIY] Arduino VU Spectrum Analyzer'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-1aSSF6qN2J8/ThbROiV3QLI/AAAAAAAAAQY/QW4Gbz5abRM/s72-c/IMAG1139.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6845248803535559533</id><published>2011-06-18T17:48:00.001+08:00</published><updated>2011-06-18T17:49:02.956+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>BGP awesomeness with Packet Tracer 5.3.2</title><content type='html'>With Packet Tracer 5.3.2 you can experiment with BGP (eBGP)&lt;br /&gt;&lt;br /&gt;It serves as a good tool for a refresher, especially for poor chap like without exclusive access to the cisco racks....&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zVzR6wtUwrE/Tfxz7OrLKFI/AAAAAAAAAQU/yOEs_wxkdTA/s1600/BGP%2BPKT.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-zVzR6wtUwrE/Tfxz7OrLKFI/AAAAAAAAAQU/yOEs_wxkdTA/s1600/BGP%2BPKT.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here I demo Cross AS BGP. Not all the BGP peers have a direct peering. I use the "network" command to do the routing.&lt;br /&gt;&lt;br /&gt;Common mistakes that might occur&lt;br /&gt;1. Peering with BGP peer on the wrong AS&lt;br /&gt;2. Peering with BGP peer on the wrong IP subnet&lt;br /&gt;3. Configure wrong AS for BGP on the victim router&lt;br /&gt;4. and the list go on....&lt;br /&gt;&lt;br /&gt;to verify your settings...&lt;br /&gt;sh ip bgp &lt;br /&gt;&lt;br /&gt;sh ip bgp neigh&lt;br /&gt;&lt;br /&gt;come code for your reference.....&lt;br /&gt;&lt;script src="http://snipt.net/embed/ec50a8f4d28bcb39103379379ddc5185" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6845248803535559533?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6845248803535559533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6845248803535559533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6845248803535559533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6845248803535559533'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/06/bgp-awesomeness-with-packet-tracer-532.html' title='BGP awesomeness with Packet Tracer 5.3.2'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-zVzR6wtUwrE/Tfxz7OrLKFI/AAAAAAAAAQU/yOEs_wxkdTA/s72-c/BGP%2BPKT.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5465299371174131675</id><published>2011-06-15T22:15:00.000+08:00</published><updated>2011-06-15T22:15:57.845+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>my first attempt: solar cooker</title><content type='html'>Get a BIG cardboard, some aluminium foil and adhesive.&lt;br /&gt;1 black or dark colored cooking vessel.&lt;br /&gt;1 small piece of wood as insulator.&lt;br /&gt;1 clear plastic bag. I got mine from the fresh fruits section at NTUC... but realise it was a lil too small to fit the flower pot I am going to use.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/252919_234680699880521_100000157784700_1213537_3837843_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/252919_234680699880521_100000157784700_1213537_3837843_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We are going to form a cone shape with the cardboard, hence make a cut with a diameter of 25cm or more to accommodate it. Paste the foil on the cardboard, shinny side up. I made a mistake of inverting it....oh well...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/248634_234680729880518_100000157784700_1213538_360967_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/248634_234680729880518_100000157784700_1213538_360967_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I was hunting for a pot like apparatus to secure my new toy... Went hunting around and discover some flower pots......&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/260350_234680759880515_100000157784700_1213539_1087686_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/260350_234680759880515_100000157784700_1213539_1087686_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;weather check.... it was cloudy.... not a good day for solar cooking....&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/248754_234680776547180_100000157784700_1213540_4956304_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/248754_234680776547180_100000157784700_1213540_4956304_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I am experimenting whether solar cooking rice or sweet potato will be edible? Typical Asian staple.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/247104_234680799880511_100000157784700_1213541_6139052_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="720" width="431" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc6/247104_234680799880511_100000157784700_1213541_6139052_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;arrange in this order and secure with cable tie. &lt;br /&gt;  &lt;br /&gt;  /\ &lt;br /&gt; /  \&lt;br /&gt;/    \_______&lt;br /&gt;|   air      |&lt;br /&gt;|            | &lt;br /&gt;|cooking ware|&lt;br /&gt;| insulator |&lt;br /&gt;|plastic bag| &lt;br /&gt;-------------&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/254397_234680849880506_100000157784700_1213542_3667617_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/254397_234680849880506_100000157784700_1213542_3667617_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/260274_234680893213835_100000157784700_1213543_6994698_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/260274_234680893213835_100000157784700_1213543_6994698_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Just in case you guys wondered where did the flower pot went to ...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/247248_234680946547163_100000157784700_1213545_7720706_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="720" width="431" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/247248_234680946547163_100000157784700_1213545_7720706_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Cooking time -&gt; 1245 - 430pm...&lt;br /&gt;the plastic bag burst....&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/250528_234680989880492_100000157784700_1213546_6712102_n.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="431" width="720" src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/250528_234680989880492_100000157784700_1213546_6712102_n.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Conclusion.....&lt;br /&gt;The rice is not cooked..... but the rice water is warmer then room temperature.&lt;br /&gt;The sweet potato is not cooked thoroughly. Never buy $1 sweet potato from NTUC... rotten ...&lt;br /&gt;&lt;br /&gt;next up.... improvised on&lt;br /&gt;a. neater foil reflector will lesser creases when pasting it to cardbord.&lt;br /&gt;1. weather check appratus..&lt;br /&gt;2. temperature check apparatus....&lt;br /&gt;3. quantify the heat generated from this solar cooker.. (a lil far fetched)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5465299371174131675?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5465299371174131675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5465299371174131675' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5465299371174131675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5465299371174131675'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/06/my-first-attempt-solar-cooker.html' title='my first attempt: solar cooker'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9109922538932141885</id><published>2011-05-19T23:20:00.000+08:00</published><updated>2011-05-19T23:20:48.244+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>kit set amp for old Sony speakers</title><content type='html'>So there were 2 VERY OLD, DUSTY (at least 1" thick beneath the cover!!) and UNAPPRECIATED Sony speakers that one day magically appeared in our T902 club hauZ. Seems that somebody conveniently let this GOOD SPEAKERS rot in an isolated corner, get kick around and &lt;b&gt;UNLOVED&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Upon close inspection, the speakers are still usable. Well, at least the leads to the + and - terminal are still intact and no sign of corrosion from the moisture yet. To make these bad boys start to sing angelic tunes AGAIN, I need something to amplify the audio signal from iPod, laptop, android phones etc (not necessary be mine laaaaa). By plainly hooking the other exposed end of the mini stereo jack to the speaker’s 2 terminal won’t yield any sound. Better luck if the speakers are hooked up to a 2kHz function generator.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I need an AMP as cheap as possible. There is no luck finding the original Sony ones. Obviously, it was dumped because of the spoilt amp and hifi system. Try making one amplifying circuit from components from the lab, e.g some TIP31C, R&amp;C ? Too time consuming and the amplified signal produced may only yield &lt;1W from these big ASS speakers. We need something that can yield 8W from the circuit. A quick look at the store, no such IC’s readily available.....Some shopping is seriously needed at your friendly Sim Lim Tower.........After some browsing at the kit set’s section, I came across a 8W amplifying circuit kit set complete with good quality PCB with routes thick enough to pass high current, BIG heat sink and the best part, it is only s$17.50. After laying my paws on it, I hurried back to office can’t wait to start work on it.&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-KXagTvySrbU/TdUzy7gFkwI/AAAAAAAAAPw/zqo-ysj1xGE/s1600/IMAG0975.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="240" width="400" src="http://4.bp.blogspot.com/-KXagTvySrbU/TdUzy7gFkwI/AAAAAAAAAPw/zqo-ysj1xGE/s400/IMAG0975.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The I/O parts are not supplied in the package, just few pieces of measly bare copper connector. I modified the inputs to a 3.5mm Stereo jack for the convenience's sake of plug to a laptop/android/iPod etc. As if it is going to be the headphone, albeit a BIG one. As for the power jack, it is done using a DC power jack with the +ve leads in the inner ring. DO NOT SOLDER or CONNECT inversely ! Outputs, I used some screw down terminal blocks meant for PCB. Too bad the PCB is designed for the above mentioned copper. I got to cut the terminal blocks to half to use it. Make sure to stick some tape on the components side, this is to prevent the components from falling out of place when soldering.&lt;br /&gt;&lt;br /&gt;Fire up the soldering gun and start soldering......&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Rl6abQpe-c4/TdUzy-hXB9I/AAAAAAAAAP4/G8HIdwDKn2I/s1600/IMAG0976.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="240" width="400" src="http://2.bp.blogspot.com/-Rl6abQpe-c4/TdUzy-hXB9I/AAAAAAAAAP4/G8HIdwDKn2I/s400/IMAG0976.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next up, I need a power supply that can supply 12V DC for 1A. My unloved HP charger can only go up to 6v and 200mA. I quick dive into my pile of junk and tadahhhhh... I found a dc wall adapter that satisfy the requirement. Lesson learnt, do not discard the old parts. It may come handy some day. I also added my VU meter which i made many years for practising my soldering skill. Now we got LED light indicators on the sound  &lt;br /&gt;&lt;br /&gt;Hook up the dc adapter, stereo jack to laptop and speakers to the amp circuit. Enjoy!&lt;br /&gt;On a side note, the boys hook up this set to their home made projector and now we got a poor man’s cinema complete with “dolby digital surround” (speakers on the floor facing wall and reflectors to create the effects)!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-T2062gznhWg/TdUzzU9dJNI/AAAAAAAAAQA/j30A5Td4XUQ/s1600/IMAG0977.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="240" src="http://2.bp.blogspot.com/-T2062gznhWg/TdUzzU9dJNI/AAAAAAAAAQA/j30A5Td4XUQ/s400/IMAG0977.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;What's neXt? Tube Amplifiers ???? teeeheeeheeeee&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe width="425" height="344" src="http://www.youtube.com/embed/uL_SAMu2grA?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9109922538932141885?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9109922538932141885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9109922538932141885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9109922538932141885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9109922538932141885'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/05/kit-set-amp-for-old-sony-speakers.html' title='kit set amp for old Sony speakers'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-KXagTvySrbU/TdUzy7gFkwI/AAAAAAAAAPw/zqo-ysj1xGE/s72-c/IMAG0975.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4990819195202777641</id><published>2011-02-08T09:41:00.000+08:00</published><updated>2011-02-08T09:41:09.504+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>exercise code</title><content type='html'>refer to your year1 structure programming book&lt;br /&gt;&lt;br /&gt;1. pg 121 . create a new function that calculates the difference of 2 numbers&lt;br /&gt;&lt;br /&gt;2a. pg 146. modify the code to use a vector instead of an array.&lt;br /&gt;2.b. pass by reference the vector to a new function to add 5 into each elements of the vector. Cout the vector in the main() to verify the value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4990819195202777641?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4990819195202777641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4990819195202777641' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4990819195202777641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4990819195202777641'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/02/exercise-code.html' title='exercise code'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1787744167042873812</id><published>2011-01-25T08:02:00.002+08:00</published><updated>2011-01-25T08:03:25.926+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] binary tree</title><content type='html'>terminology&lt;br /&gt;the root: the beginning of a tree.&lt;br /&gt;&lt;br /&gt;every node is possibly the root node for the nodes below it. eg. the parent node.&lt;br /&gt;&lt;br /&gt;parent node, the n-1 lvl of the n's lvl node.&lt;br /&gt;child node, the n+1 lvl of the n's lvl node.&lt;br /&gt;  &lt;br /&gt; (n-1)&lt;br /&gt;   |&lt;br /&gt;___n____&lt;br /&gt;|       |&lt;br /&gt;(n+1) (n+1)&lt;br /&gt;&lt;br /&gt;edge, the path for traversal to happend.&lt;br /&gt;leaves, the lowest lvl in the tree.&lt;br /&gt;&lt;br /&gt;a binary tree, a tree where each parent node only have 2 children.&lt;br /&gt;&lt;br /&gt;binary search tree (BST)&lt;br /&gt;&lt;br /&gt;a binary tree, where the root node is always the middle value of the list of values.&lt;br /&gt;&lt;br /&gt;remember binary search from previous week?&lt;br /&gt;what are the 2 possible condition to be satisfied before one can qualify for binary search?&lt;br /&gt;&lt;br /&gt;BST it self is not efficient. there is a possibility that the insertion of the node will cause it to behave like a worst case binary tree.&lt;br /&gt;&lt;br /&gt;we need a sorted BST, where each time a node is inserted the tree is "sorted" to find out which is the new node. What are the implications if the tree are always sorted when insertion or deletion is done??? Is there any other possible way to enhance it?&lt;br /&gt;&lt;br /&gt;3 ways for tree traversal&lt;br /&gt;-Inorder&lt;br /&gt;Traverse the left subtree&lt;br /&gt;Visit the current parent&lt;br /&gt;Traverse the right subtree&lt;br /&gt;&lt;br /&gt;-Preorder&lt;br /&gt;Visit the current parent&lt;br /&gt;Traverse the left subtree&lt;br /&gt;Traverse the right subtree&lt;br /&gt;&lt;br /&gt;-Postorder&lt;br /&gt;Traverse the left subtree&lt;br /&gt;Traverse the right subtree&lt;br /&gt;Visit the current parent&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;uses of binary tree data structure&lt;br /&gt;- compression&lt;br /&gt;- encoding&lt;br /&gt;- conversion of mathematical formula to prefix or post fix form&lt;br /&gt;- data structure of choice for "fast" retrieval of search items&lt;br /&gt;&lt;br /&gt;there are many other type of binary tree&lt;br /&gt;full binary tree&lt;br /&gt;perfect binary tree&lt;br /&gt;balanced binary tree&lt;br /&gt;self balancing binary tree&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1787744167042873812?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1787744167042873812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1787744167042873812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1787744167042873812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1787744167042873812'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-binary-tree.html' title='[DSA] binary tree'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9177382449372486871</id><published>2011-01-24T09:55:00.002+08:00</published><updated>2011-01-24T09:55:43.170+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] map and set container</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;map&amp;lt;string,int&amp;gt; mapp;&lt;br /&gt;map&amp;lt;string,int&amp;gt;::iterator mit;&lt;br /&gt;string name_search;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Amy",81377442));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Bob",32731631));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Catherine",32387163));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Danny",21321312));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Ecuador",54543947));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Felicia",32535612));&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mapp.insert(map&amp;lt;string,int&amp;gt;::value_type("Genie",24172312));&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;refer to above on how the map data structure is used.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;use the map data structure to satisfy the following requirements.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;1. create a phone book application that can store name and phone number.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;1a. perform a display all entry in the phone book.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;2. phone number need to that ensure it is 8 numerical digits only.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;3. initialize the phone book application with some data.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;4. perform a lookup for a random entry in the phone book and display it.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;challenge&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;5. Suggest a method to store address, email and msn address to the phone book that you have already created.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;6. what are the advantages and disadvantages of your method??? explain why you choose the design.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9177382449372486871?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9177382449372486871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9177382449372486871' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9177382449372486871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9177382449372486871'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-map-and-set-container.html' title='[DSA] map and set container'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5622847477568392517</id><published>2011-01-18T07:57:00.001+08:00</published><updated>2011-01-18T07:57:58.033+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] searching</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Have you ever tried to find something in your house/room. Yet can't seems to ever find it. Now, lets not talk about misplacing items out of carelessness. Let's discuss how to "find" items in your wardrobe.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Assume you have your apparels hanging in the wardrobe, how would you "find" your favorite shirt/dress? would you start looking from the left hand side? the right hand side or simply in the middle???&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;If you find 1 apparel at a time from either direction, that is linear search. The worst case scenario is, you would traverse all your apparels before finding your favourite.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;If you have sorted your apparels according to a certain sequence, eg, warm colours to the right and cold colours to the left, you can simply start finding from the middle, then to the left if your favourite falls in the cold colour. This is binary search. searching time can be reduced significantly.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Again, if you do like what i did, simply pile up all my apparels in the wardrobe without sorting/folding/ironing it. "Finding" for a particular item in the wardrobe can be disastrous.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Linear Search =&amp;gt; O(N)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Go through the entire array of items to lookup on the searched key. The sequence of items are not sorted.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Best case , the 1st item in the array.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Worst case, the last item in the array.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Average case, traverse for half of the array&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Binary Search =&amp;gt; O(logN)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Uses a divide and conquer method.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;array of items must be sorted first, involves a cost.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;L &amp;lt;&amp;gt; root&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;|---|---|&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;L---M---R&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;For any array of 1000000 items, Linear search need 500000 comparison (assume an average case), Binary Search 20 comparison.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Pop Quiz&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;1. Create a generic code of linear search to take in different data type.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;2. Create a Binary Search tht uses recursive method.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;3. Use find() or search() from the STL to do a lookup of a string, among many strings stored in the memory&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5622847477568392517?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5622847477568392517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5622847477568392517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5622847477568392517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5622847477568392517'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-searching.html' title='[DSA] searching'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4295509004320028349</id><published>2011-01-17T10:33:00.004+08:00</published><updated>2011-01-17T10:36:27.949+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Sorting</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; line-height: 18px;"&gt;Here comes the interesting part in algorithms.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;Sorting and searching are the crowns in the algorithm topic. So to speak, these are hottt topics for research in computer science world.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;Efficiency, cost. Remember???&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;We will be examining bubble sort, insertion sort, selection sort and merge sort in details. Studying the complexity of the above algorithms, and not forgetting the implementation of the algorithm. Both DIY code and STL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;But Why Bother to Sort?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;Here comes the question&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;1. Implement sort descending for Bubble Sort, Selection Sort, Insertion Sort, STL sort. Use int arrays or vectors to try it out.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;2. In our session, we use integer to demonstrate sorting. Is it possible to sort characters, strings, double, objects etc? Use vector or arrays to try it out.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;3. Use the sorting algorithm of your choice, sort 10 tropical fruits of your choice.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;4. On top of the previous implementation, create a class for fruits with 2 parameter namely int price and string fruitName. Sort the 10 tropical fruits according to fruit name or price. Your implementation should be able to sort both price and fruitName ASC or DESC. A menu might help in here.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;5. Lastly, what considerations when we need to ponder when comparing 2 arbitrary Sort Algo A and Sort Algo B. How would we really know that A is better then B ?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;There might be more then one implementation of the above sorting algorithm. Below are my flavor for the 3 algorithm. Codes are commented for easy following.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; line-height: 18px;"&gt;//bubble sort&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/5ccc226064ecceac71ba3bbdf040f625" type="text/javascript"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;font class="Apple-style-span" color="#333333" face="'trebuchet ms', verdana, arial, sans-serif" size="2"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;//insertion sort&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/dd08c7032a0c168e3ae8d743e6fb6bab" type="text/javascript"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;font class="Apple-style-span" color="#333333" face="'trebuchet ms', verdana, arial, sans-serif" size="2"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;//selection sort&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/ae02183a2305c6494ed11c61ee7ca5bf" type="text/javascript"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;font class="Apple-style-span" color="#333333" face="'trebuchet ms', verdana, arial, sans-serif" size="2"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;//merge sort&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/94cd1d7014d56b892c1d038247bd99a1" type="text/javascript"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;font class="Apple-style-span" color="#333333" face="'trebuchet ms', verdana, arial, sans-serif" size="2"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;/script&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4295509004320028349?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4295509004320028349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4295509004320028349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4295509004320028349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4295509004320028349'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-sorting.html' title='[DSA] Sorting'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5456311438565194204</id><published>2011-01-11T08:58:00.002+08:00</published><updated>2011-01-11T08:58:17.456+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Queue</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Long time ago when i was still working in shenton way...&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I need to wear shirt+neck tie+business slack. If there is a need to meet then client, add another blazer under the blazing sun. It&amp;nbsp;rhythms rite~&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Geek like me, I find matching colour of my outfits seem to take forever to learn. There is no hard and fast rule. Best, it is very subjective. Different people will give you different preference and a piece of their mind. ARGHzzzzz. How nice if (day=monday){setBlue();} can be applied to matching my attire.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So to play safe, I bought seven sets of outfit that the colour would match generally. Hang them in my wardrobe from left to right for monday to sunday (I work 8 days per week). I applied FIFO (first in first out) on my "queue" of attire. hehe. Because, I always take from my LHS (Left Hand Side) every morning for my business, and replenish at the RHS after it is done from the laundry.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;To hide the fact that i am lazy to choose my attire, and there is a high probability I would wear the same thing for that day of the week for all the weeks in a year. I did a one left shift on my "Queue". Then my wardrobe queue would behave like a barrel shift register that shifts by one bit. Hence my algorithm would keep me safe from the optic blasts of the "fashion police". Sad to say, I still did not escape the scrutiny of the fashionista.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;There is this girl in my office, which takes a mental note on the pattern of the occurrence of my attire. She observed my algorithm for about 3 weeks then I am busted.... No, she did not became my wife.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Drill Questions&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;1. Create a queue of 10 items, of your choice.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;2. Assume that the 4th item in the queue is of higher priority, retrieve it first.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;3. display the remaining items in the queue.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;HEROES ONLY!&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;4. Create a queue of objects. Each object have a different priority 1-10. 1 is highest priority, 10 otherwise. Object with the highest priority in the Queue need to be service first.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;5. Based on 4, create objects at random interval of 1s to 10s and enqueue them. You can assume that the queue is dequeue at every 1 second&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;6. In the emergency ward, some cases are more serious then the other. Assume there is more then 1 queue is available. Suggest a method that would give Queue tickets to non-priority case, while ensuring life threatening case get service accordingly.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5456311438565194204?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5456311438565194204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5456311438565194204' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5456311438565194204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5456311438565194204'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-queue.html' title='[DSA] Queue'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6590069873599082201</id><published>2011-01-10T09:49:00.001+08:00</published><updated>2011-01-10T09:49:57.390+08:00</updated><title type='text'>[DSA] stack</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Stack, a last in first out (LIFO) type of data structure.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;very similar to our STL list learned last week, there is also a STL stack.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;|a|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;|b|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;|c|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Long long long time ago when i was still a student and still staying in the hall (Now I am still a student, constantly learning new things!). My friends always asked me why i always wear the same t-shirt from monday to sunday. Being the computer science student, I try to explain to them the reason using the stack data structure. Every time my laundry is done, it is folded nicely (assume please) into a stack. When I fold my t-shirt, and placed them in a stack. I fold them in the same order for every week and always take from the top of the stack of tshirts so that my wardrobe will not be messy(assume it is not messy).&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Talking about needing randomization in folding t-shirt and putting them on a stack. Every morning wake up, I am always in a rush. So, I always choose the first t-shirt (the top in stack data structure) of the stack. The cycle repeats it self again and again. Sometimes, I do accidentally pull a tshirt out of the middle of the stack and the stack of tshirt just collapsed. Things got better when I found another person to fold my laundry when I was staying in hall!&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Stack is efficient, minimal disturbance to the memory when data is inserted/deleted because only the top of the stack is modified. But when the 5th element of a 10element in a stack need to be retrieve, there is a lot of manual code needed for manipulation. Hence the efficiency and performance of the stack data structure is not satisfied.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So......what to do with the stack data structure? It can be used to store the dungeon level information. How many of you have played the game dungeons and dragons?? The assumption is that player can only go to 1 level above or 1 level below the current level of dungeon. Hence, using a stack to store is more sensible. Of course, a list can be used too. But... what are the consequences????&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Have you wondered how the mouse in the micro-mouse competition know how to escape from the maze??? All movements of the mouse, eg forward, backward, left, right are stored onto the stack. When a dead end is encountered, the mouse will take a step back by simply pop off the top item on the stack. This is for navigation that requires a step back look left/right algorithm.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Other uses of stack, is in the operating system, where the system variable is stored. The stack is used to hold temporary variable of an executing program. Another stack is used to store the starting address of programs. What happens when the stack used to store variable is "overflow" ????&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Drill question for the week,&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;1. Create a stack of 10 items.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;2. retrieve the 5th item on the stack.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;3. display the remaining item on the stack.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;4. Modify week 4's decimal to binary conversion program and implement with stack.&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;4. Modify week 5's palindrome checking program and implement with stack.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6590069873599082201?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6590069873599082201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6590069873599082201' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6590069873599082201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6590069873599082201'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-stack.html' title='[DSA] stack'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3755597771508777579</id><published>2011-01-06T20:06:00.000+08:00</published><updated>2011-01-06T20:06:09.018+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>SPINNOVEX 2011</title><content type='html'>we are featured on the channel 8 news (1:05 to 1:40)~~~&lt;br /&gt;&lt;br /&gt;35sec of precious air time~&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/RVHp0GeSn3A?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/RVHp0GeSn3A?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3755597771508777579?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3755597771508777579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3755597771508777579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3755597771508777579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3755597771508777579'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/spinnovex-2011.html' title='SPINNOVEX 2011'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6739074683136448641</id><published>2011-01-03T09:39:00.002+08:00</published><updated>2011-01-03T09:39:53.753+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Linked List</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Linked List (LL)&lt;br /&gt;&lt;br /&gt;Let assume today is your first day in school and your are appointed as the class rep. Most likely the first task you and need to do is to write down the names and contact information of your class mates.&lt;br /&gt;&lt;br /&gt;But how are you going to do it??? Do you randomly scribble the information on some paper napkins and shoved it into your bag? Or write down the names and contact information one by one, in a list form? Or fired up your web browser and point to docs.google.com and start making a spreadsheet?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;The data you have entered is unsorted, so this tiny piece of paper/document serves as your lookup table when you need to retrieve some information.&amp;nbsp;E.g your classmate's phone number&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;This week, we are going to explore the several api calls to use STL list to insert data, manipulate data and to retrieve data.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;Say you want to find out your new classmate catherine for her phone number. How would you look for the information in the list? Most of us would look from top to bottom, some bottom to up, some start in the middle and traverse up or down. Inherently, you still lookup the information from the list one by one. All this methods to find her name doesn't really matter, because the list of information is unsorted, it will still take n+1 effort . The effort to lookup a name in the list gets bigger when the list grow longer and longer.&lt;br /&gt;&lt;br /&gt;In the list of names you have,how would you input new names for student that just got into your class? Do you add it at the end of the list? Or simply insert the name to any position where the space permits?&lt;br /&gt;&lt;br /&gt;All the above is the analogy for the Linked List used in the computer&lt;br /&gt;&lt;br /&gt;Items that is stored in Linked List have to be travsersed sequentially. There are no random access iterators to access link list.&amp;nbsp;Hence, you need to declare an iterator of the same data type that is used by the STL list container.&lt;br /&gt;&lt;br /&gt;When you are designing the code and you needed data to be access randomly, Linked list is not the best option. Traversing the whole list of items takes time. The time required will grow accordingly to the size of the list. So, vectors or arrays are the best option (at the moment of learning). The items in vectors and arrays are placed side by side in memory world and can be access in a random fashion.&lt;br /&gt;&lt;br /&gt;Items of a Linked List are not required to be placed side by side in the memory of the computer. How items are "linked" in a link list are done by the maintaiannce of the "header" pointer and the "tail" pointer. Pointers, as we have learned in the previous sessions, are variables that store the memory address of the items we are interested with. The tail pointer of the current items contains the address of the next item, ie. the value stored in the head poiter.&lt;br /&gt;&lt;br /&gt;0-&amp;gt;hP|DATA1|tP-&amp;gt;hP|DATA2|tP-&amp;gt;hP|DATA3|tP-&amp;gt;0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Changing the values of the pointer variable requires only O(1) effort. Hence, the linked list is efficient when data/items are required to be inserted randomly in the list.&lt;br /&gt;&lt;br /&gt;If the deletion of an item is required in the linked list. All need to be done is to modify the tail pointer of the current item, skipping the item we want to delete and points to the head pointer of the item next to the deleted item. In other words, we are merely copying the address in the tail pointer of the deleted item to the previous item's tail pointer. cool huh. No more holes left in the memory, no more statically declared memory that is left unsed, no more ugly algorithm to compact the array after a deletion of items.&lt;br /&gt;&lt;br /&gt;All the above, are naked to the untrained eye. Users can't see the differences, only the programmer does.&lt;br /&gt;&lt;br /&gt;DRill Questions:&lt;br /&gt;1. create a list to store name of your classmates.&lt;br /&gt;2. print out class list&lt;br /&gt;3. "find" a particular person in the list. return found or not found.&lt;br /&gt;4. Find out a method to attach the gpa score to the names in the list above.&lt;br /&gt;hint: use class and OOP.&lt;br /&gt;5. sort the list by gpa descending.&lt;br /&gt;hint, try out stl algorithm&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6739074683136448641?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6739074683136448641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6739074683136448641' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6739074683136448641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6739074683136448641'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/dsa-linked-list.html' title='[DSA] Linked List'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3679894327996245985</id><published>2011-01-02T03:27:00.000+08:00</published><updated>2011-01-02T03:27:05.545+08:00</updated><title type='text'>New Year Resolution</title><content type='html'>It is once again, the same period of time to do some self reflection  on what I have did in 2010 and what I want to achieve in 2011.&lt;br /&gt;&lt;br /&gt;Remember my words?? I am only worth how much I promised..... &lt;br /&gt;&lt;br /&gt;let's recall what I promised to do in &lt;a href="http://shin-ajaran.blogspot.com/2009/12/new-year-resolution.html"&gt;2010&lt;/a&gt;.&lt;br /&gt;&lt;strike style="color: red;"&gt;1. drop 2kg per month&lt;/strike&gt; I did not lose weight, instead i gained weight. Please call me dot1tonner (for) now~&lt;br /&gt;&lt;strike&gt;2. participate in standard charted marathon&lt;/strike&gt; I did not run in standard charted marathon. Lazy duhzzz&lt;br /&gt;3. &lt;b&gt;eat KFC&lt;/b&gt;,&lt;strike&gt; &lt;/strike&gt;every saturday and sunday dinner&lt;br /&gt;4. &lt;b&gt;eat Macdonalds&lt;/b&gt;, yessss!! almost everyday especially it is so convenient.It is right below my office!&lt;br /&gt;&lt;span style="color: red;"&gt;5. &lt;/span&gt;&lt;strike style="color: red;"&gt;go to the gym&lt;/strike&gt;. erm, only step in once last year, the day before I do my annual med check up.&lt;br /&gt;6. &lt;strike style="color: red;"&gt;run 10km every saturday.&lt;/strike&gt; nope was enjoying my beauty sleep till late evening.&lt;br /&gt;&lt;br /&gt;the conclusion, &lt;b&gt;I self pwned. None of my fitness goal is achieved. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As I mentioned last year&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style="color: #063e3f; font-family: Courier,monospace;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px;"&gt;&lt;span style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;When it comes to setting goals, be very sure the goals set are "SMART"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;S= Specific / Simplified / Strategic&lt;br /&gt;M= Measurable / Manageable / Money ?!&lt;br /&gt;A= Achievable / Attainable / Agarlogic?!&lt;br /&gt;R= Realistic / Relevant&lt;br /&gt;T= Timely / Track-able / Traceable&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New',Courier,monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier,monospace; font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;What is missing from the above, is the &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;how to's&lt;/span&gt;   to achieve your goal. More importantly, a schedule on what to do that   you can follow closely to achieve your goal. Since i did not paste&amp;nbsp;on  my  wall&amp;nbsp;my workout schedule as big as loan shark ah long's, hence,  nothing  is &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;tracked closely&lt;/span&gt; and finally nothing happened.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;It  is once again, the same period of time to do some self reflection on   what I have did in 2010 and what I want to achieve in 2011&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, lets do a flash back what I have done in 2010 (instead of the ones I did not do)......&lt;br /&gt;1. &lt;strike&gt;spent many late nights in the labs (FYP, WSS).&lt;/strike&gt; Checked. (Actually I lost count how many nights)&lt;br /&gt;2. &lt;strike&gt;spent many Saturdays and Sunday in the office, lab.&lt;/strike&gt; Checked. (I have access to 2x labs! 24x7 yeay~)&lt;br /&gt;3. &lt;strike&gt;study for certification.&lt;/strike&gt; Checked. 1x CCNA-S, 1x CCAI, 1x CCNP3, 1xCCNP2, failed 1xCCNP1&lt;br /&gt;4. &lt;strike&gt;pickup new programming language&lt;/strike&gt;. Checked. Android, Arduino and Processing.(In the process I mentored 2x group for android competition)&lt;br /&gt;5. &lt;strike&gt;deliver 1x segway like robot for student FYP&lt;/strike&gt;. Checked. Delivered 4x instead, with different variations. FYP roxxxx~! &lt;b&gt;It is fun to be part of the action.&lt;/b&gt; &lt;span style="color: red;"&gt;The anger, the sorrow, the mourning, the delight and the adrenalin rush.&lt;/span&gt;  It was a roller coaster ride, I hope you guys that rode with me enjoyed  the process and learn how to manage tech, people and team work. &lt;b&gt;This item drawn most of my energy, but it is worth every single Joules!&lt;/b&gt;&lt;br /&gt;6. &lt;strike&gt;coach&lt;b&gt; &lt;/b&gt;trainees for final round&lt;/strike&gt;&lt;b&gt;. &lt;/b&gt;Checked. They got 1x GOLD medal in the process of preparation.&lt;b&gt;  It is very hard to manage disappointment, because not all manage to get  through. But, I have to move on instead of swimming in alcohol to  pacify the sorrows.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;7. &lt;/b&gt;&lt;strike&gt;Annual leave of 56days&lt;/strike&gt;&lt;b&gt;. &lt;/b&gt;Checked&lt;b&gt;. I am still finding ways to use them... duhzzzz&lt;/b&gt;&lt;br /&gt;8. &lt;strike&gt;receive a medal of some sort&lt;/strike&gt;&lt;b&gt;&lt;strike&gt;.&lt;/strike&gt; &lt;/b&gt;Checked&lt;b&gt;. I got the Commendation award for E-learning in EETC10&lt;/b&gt;&lt;br /&gt;9. &lt;strike&gt;look out for postgrad / phd lobang&lt;/strike&gt;. Checked&lt;b&gt;. None came to my favour. It is hard on me, especially got rejected twice in a row. &lt;/b&gt;The feeling is worst then getting rejected by my first love(let's assume I had one). &lt;br /&gt;10. Treat myself nicely?? LOL...I just had to make it a 10, since it is for 2010.&lt;br /&gt;&lt;br /&gt;nonetheless, I applied SMART goal method to achieve it. You can do it too!&lt;br /&gt;&lt;br /&gt;I  have been especially harsh on me in my own capacity and this "aura" of  my RDF (Reality Distortion Field) affects the boys and girls that worked  for me directly. They draw the flak most of the time and yet they  survived it. It was unintentional, BUT I really want you people to buck  up and start to prioritized the designated task upon others. &lt;br /&gt;&lt;br /&gt;Now, my 2011 goals which I am going to use the SMART goal method to align it.&lt;br /&gt;1. only eat 1x meat and 2x vegetables for lunch EVERYDAY&lt;br /&gt;2. only eat KFC (and only 1pcs of original breast meat) for dinner once per week.&lt;br /&gt;3. say NO to macdonalds extra value meal with upsize. (only 1 double cheese burger per week)&lt;br /&gt;4. burn 600cal every wednesday in the gym.&lt;br /&gt;5. use my 56days annual leave&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3679894327996245985?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3679894327996245985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3679894327996245985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3679894327996245985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3679894327996245985'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2011/01/new-year-resolution.html' title='New Year Resolution'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1697326397186912256</id><published>2010-12-31T10:22:00.000+08:00</published><updated>2010-12-31T10:22:39.944+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] finishing touches on type II and type III</title><content type='html'>happy new year~&lt;br /&gt;&lt;br /&gt;type III&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/yvvCc4FePSI?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/yvvCc4FePSI?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;type II&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="640"&gt;&lt;param name="movie" value="http://www.youtube.com/v/OK6_FdVXt8Y?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/OK6_FdVXt8Y?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1697326397186912256?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1697326397186912256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1697326397186912256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1697326397186912256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1697326397186912256'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/12/fyp-finishing-touches-on-type-ii-and.html' title='[FYP] finishing touches on type II and type III'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3555713796626216080</id><published>2010-12-20T08:55:00.001+08:00</published><updated>2010-12-21T08:54:50.483+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] TYPEIII prototype</title><content type='html'>&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TQ_6pSJYTKI/AAAAAAAAAPc/nOCTvFcBVlU/s1600/typeIII%2B33830_173837765971976_100000372600727_390901_5869496_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TQ_6pSJYTKI/AAAAAAAAAPc/nOCTvFcBVlU/s400/typeIII%2B33830_173837765971976_100000372600727_390901_5869496_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;mobile chair like self balancing device that is capable of moving one person.&lt;br /&gt;&lt;br /&gt;uses &lt;br /&gt;arduino UNO as the MCU&lt;br /&gt;IMU&lt;br /&gt;flexiforce sensors for maneuvering&lt;br /&gt;wheel chair hub motors.  &lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Bqoq30g1Dso?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Bqoq30g1Dso?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3555713796626216080?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3555713796626216080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3555713796626216080' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3555713796626216080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3555713796626216080'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/12/fyp-typeii-prototype.html' title='[FYP] TYPEIII prototype'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_xcMOgL0aFSs/TQ_6pSJYTKI/AAAAAAAAAPc/nOCTvFcBVlU/s72-c/typeIII%2B33830_173837765971976_100000372600727_390901_5869496_n.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5094442878389426944</id><published>2010-11-23T07:52:00.001+08:00</published><updated>2010-11-23T07:52:05.251+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] General Maths Algo</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Long long long time ago.....&lt;br /&gt;Programs are written in C++ to solve mathematical problem, not much of user click here and there on the GUI. Mathematical problem can range from calculating relative distance, trajectory etc.&lt;br /&gt;&lt;br /&gt;To make life simple, there was "math.h" in C(include math in c++) to help make the calculation. "math.h" alone might not be sufficient to cover each and every possible scenario, hence some programmer do have their custom class to do the math related to their program.&lt;br /&gt;&lt;br /&gt;We have studied general maths routine such as converting from decimal to binary (d2b) and at least 2 method to calculate Greatest Common Divisor(GCD). Through the d2b function, we learned how to decompose the "steps" to get the binary from the decimal and translate the "steps" it into code.&lt;br /&gt;&lt;br /&gt;The direct application of the GCD I could thought of is the computation of the public key and private key pairs in the RSA algorithm (http://en.wikipedia.org/wiki/RSA). Encryption is as simple as calling a function (java and C++ have the library), but behind the function call, these are the necessary code to calculate the key pairs.&lt;br /&gt;&lt;br /&gt;Notice there are 2 possible way of programming the GCD, through the recursive method or the iterative method which we have discussed previously. Is it easier to understand the recursive code then the iterative code???&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below are the questions for the week.&lt;br /&gt;IP address in the form of A.B.C.D, where each octet A,B,C,D range from 0 to 255 in decimal.&lt;br /&gt;1. How many bits each octet hold?&lt;br /&gt;2. What are the "steps" required to convert one octet to binary?&lt;br /&gt;3. Write the function that would convert the IP and gives it equivalence in binary.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;note: you could modify from the d2b function, or propose a simpler algorithm based on the characteristic of the IP address's octet&lt;/b&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5094442878389426944?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5094442878389426944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5094442878389426944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5094442878389426944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5094442878389426944'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-general-maths-algo.html' title='[DSA] General Maths Algo'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-329774196274226830</id><published>2010-11-22T08:17:00.001+08:00</published><updated>2010-11-22T08:17:56.014+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Iteration and recursion</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Look into the mirror and observe your self. Look into your eyes, you will notice that in your pupil (the dark/blue/green color portion of the eye if you are asian/Caucasian) you can see yourself in it. Now, look into that pupil on the mirror. You will observe yourself again, albeit a scaled version. That is what i call recursion, you will see yourself again and again in your pupil.&lt;br /&gt;&lt;br /&gt;Assume that you can see even the smallest detail of yourself through the mirror, notice that there is no end to the vision?&lt;br /&gt;&lt;br /&gt;This is not good for recursion in computer science/programming. The program keeps executing recursively, until the system resources run out. So, at least a condition for the recursion to stop must be defined, which what we called the base case.&lt;br /&gt;&lt;br /&gt;Anything that is solved iteratively, can be solved recursively.&lt;br /&gt;&lt;br /&gt;Fibonacci The first number of the sequence is 0, the second number is 1, and each subsequent number is equal to the sum of the previous two numbers of the sequence itself. Once the formula is established, it is easy to figure out the code.&lt;br /&gt;Fibonacci is a natural candidate for recursion, because it need to use data that are computed before in that particular series. Hence, we need to store this temporary data somewhere. In recursion, temporary data is stored on the stack.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/ef15d8edd00a6960c9c16937cbf14212" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;b&gt;Drill Questions&lt;/b&gt;&lt;br /&gt;1. Write a iteration fuction that calculates 2^n. 2 to the power of n. n being the input from cin.&lt;br /&gt;2. Write a recursive function that calculates 2^n. n being the input from cin.&lt;br /&gt;3. when n is very large, what are the parameters need to take into considerations?&lt;br /&gt;4. What do you observed for the 1. and 2. when n is very large?&lt;br /&gt;5. Is 2^n a natural candidate for recursion??&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-329774196274226830?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/329774196274226830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=329774196274226830' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/329774196274226830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/329774196274226830'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-iteration-and-recursion.html' title='[DSA] Iteration and recursion'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7000115747999160263</id><published>2010-11-21T12:25:00.002+08:00</published><updated>2010-11-21T12:26:48.791+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] mini obstacle course</title><content type='html'>video src from my student's facebook-&gt; sara&lt;br /&gt;&lt;br /&gt;&lt;object width="720" height="480"&gt;  &lt;param name="allowfullscreen" value="true"/&gt;&lt;param name="allowscriptaccess" value="always"/&gt;&lt;param name="movie" value="http://www.facebook.com/v/167054809983605"/&gt;&lt;embed src="http://www.facebook.com/v/167054809983605" type="application/x-shockwave-flash"   allowscriptaccess="always" allowfullscreen="true" width="720" height="480"&gt;  &lt;/embed&gt; &lt;/object&gt; &lt;br /&gt;&lt;br /&gt;if you wonder how to embed facebook video into blogspot. take a look at the code below. simply replace the video id "167054809983605" with your own video from "facebook.com/video/video.php?v=copy_the_id_here"&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://snipt.net/embed/cbde4c06680cda29595ef1b9d5d8912c"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7000115747999160263?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7000115747999160263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7000115747999160263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7000115747999160263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7000115747999160263'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/fyp-mini-obstacle-course.html' title='[FYP] mini obstacle course'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6165004598043531958</id><published>2010-11-15T08:03:00.001+08:00</published><updated>2010-11-15T08:03:50.200+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] STL</title><content type='html'>&lt;span style="font-family: inherit;"&gt;My&amp;nbsp;favorite&amp;nbsp;quote from Issac Newton "I am Standing on the shoulders of giants" greatly illustrate the idea of STL. Code have been written by other programmers, using the template feature to greatly help other programmers to overcome programming difficulties. I.e, reduce the time from concept to code.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"&gt;&lt;span style="font-family: inherit;"&gt;Being a lazy programmer I am (yes I do admit I like to find the easiest and shortest possible way of writing a piece of code), I do not like to reinvent the wheel.&lt;br /&gt;&lt;br /&gt;As in write my own custom code that serves the same purpose as those already written/tested/proven best code by the c++ community.&lt;br /&gt;&lt;br /&gt;Why make your life suffer when there are already ready code for you to use?&lt;br /&gt;&lt;br /&gt;Programming, in general, is the ability to synthesize code to solve real-world problem by making use of available code. Only in the very dire situation (think high security, high accuracy and the need for real time operation), custom code is needed. *read=&amp;gt; proprietary software*&lt;br /&gt;By learning all the basic building blocks of programming such as template, variable passing etc. When one day this dire state occur, YOU have the ability to create the code library to save the day~!&lt;br /&gt;&lt;br /&gt;The STL contains three main components:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;      &lt;b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;Containers&lt;br /&gt;Iterators&lt;br /&gt;Algorithms&lt;br /&gt;&lt;/span&gt; &lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;br /&gt;Containers, as the name suggested is some form of storage for our data.&lt;br /&gt;&lt;br /&gt;Iterators, instead of the programmer manually keeping track on&amp;nbsp;&lt;/span&gt;  &lt;b&gt;&lt;span style="font-family: inherit;"&gt;ALL&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;pointers declared and used (not an easy feat when the code is in the range of &amp;gt;10k lines ), this STL-Iterator helps the programmer to achieve the same objective.&lt;br /&gt;&lt;br /&gt;Algorithms, fancy writing some code to solve the question in the math tutorial? Here is the partial solution. You need to piece this building blocks together.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;    &lt;b&gt;&lt;span style="font-family: inherit;"&gt;Drill question&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;span style="font-family: inherit;"&gt;1. We have written some code to check whether a given word is a&amp;nbsp;palindrome in the previous week, by using some member functions of the string class. Good work guys.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; line-height: 18px;"&gt;&lt;span style="font-family: inherit;"&gt;Now, use STL containers, iterators to achieve the same objective.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; line-height: 18px;"&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/b&gt;&lt;span style="font-family: inherit;"&gt;2. Write a phonebook directory that let the user to store&lt;br /&gt;1. first name&lt;br /&gt;2. phone number&lt;br /&gt;&lt;br /&gt;(Store some dummy data into the phone book for testing,)&lt;br /&gt;and the ability to "scroll" the phone book&lt;br /&gt;&lt;br /&gt;and the ability to "search" for a particular entry in the phone book.&lt;br /&gt;&lt;br /&gt;hint: use ready code from&lt;br /&gt;-Containers&lt;br /&gt;-Iterators&lt;br /&gt;-Algorithms&lt;br /&gt;&lt;br /&gt;*non-OOP implementation is acceptable for now.*&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.cppreference.com/wiki/stl/algorithm/start&lt;br /&gt;http://www.cplusplus.com/reference/stl/&lt;/span&gt;      &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6165004598043531958?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6165004598043531958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6165004598043531958' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6165004598043531958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6165004598043531958'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-stl.html' title='[DSA] STL'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8754151181486766980</id><published>2010-11-11T20:20:00.002+08:00</published><updated>2010-11-11T20:20:55.512+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] smooth handling</title><content type='html'>&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/dAtW06Ny8ac?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/dAtW06Ny8ac?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8754151181486766980?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8754151181486766980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8754151181486766980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8754151181486766980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8754151181486766980'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/fyp-smooth-handling.html' title='[FYP] smooth handling'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8443842010282201930</id><published>2010-11-09T07:54:00.001+08:00</published><updated>2010-11-09T07:54:17.691+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] string class</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;I hope you have enjoyed and learned some "know how" of writing a program from scratch, with our lil' palindrome example.&lt;br /&gt;&lt;br /&gt;To make our lives easier, C++ have lots of library for us to choose from&lt;br /&gt;#include &amp;lt; string &amp;gt; is one of them. Take note string and cstring. both are different!&lt;br /&gt;&lt;br /&gt;If you check out the book pg260. There is a piece of code that is very similar of what we have done today. It is using CString instead of String.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Drill Question&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Write a name generator (star wars name anybody? hehe) software.&lt;br /&gt;1. The software takes in a name for input and&lt;br /&gt;2. think of the "magic" algorithm to generate a "NINJA" name. Or any name modifiers you can think of. Similar to those name generators you have played on facebook. I guess pretty much of everybody have generated at least once. &amp;nbsp;Code it&amp;nbsp;&lt;b&gt;FREE STYLE&lt;/b&gt;&amp;nbsp;~maybe you want to start by storing 10 sample first name and 10 sample last name. Which gives a 10 to 10 mapping. Easily 100 names~&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Append part of your original name to the sample name "randomly".&lt;br /&gt;3. Check out the string member functions attached~&lt;br /&gt;&lt;br /&gt;below are the member functions of String. http://www.cplusplus.com/reference/string/string/&lt;br /&gt;&lt;br /&gt;Member functions&lt;br /&gt;&lt;br /&gt;(constructor) Construct string object (constructor member)&lt;br /&gt;operator= String assignment (public member function)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Iterators:&lt;br /&gt;begin Return iterator to beginning (public member function)&lt;br /&gt;end Return iterator to end (public member function)&lt;br /&gt;rbegin Return reverse iterator to reverse beginning (public member function)&lt;br /&gt;rend Return reverse iterator to reverse end (public member function)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Capacity:&lt;br /&gt;size Return length of string (public member function)&lt;br /&gt;length Return length of string (public member function)&lt;br /&gt;max_size Return maximum size of string (public member function)&lt;br /&gt;resize Resize string (public member function)&lt;br /&gt;capacity Return size of allocated storage (public member function)&lt;br /&gt;reserve Request a change in capacity (public member function)&lt;br /&gt;clear Clear string (public member function)&lt;br /&gt;empty Test if string is empty (public member function)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Element access:&lt;br /&gt;operator[] Get character in string (public member function)&lt;br /&gt;at Get character in string (public member function)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Modifiers:&lt;br /&gt;operator+= Append to string (public member function)&lt;br /&gt;append Append to string (public member function)&lt;br /&gt;push_back Append character to string (public member function)&lt;br /&gt;assign Assign content to string (public member function)&lt;br /&gt;insert Insert into string (public member function)&lt;br /&gt;erase Erase characters from string (public member function)&lt;br /&gt;replace Replace part of string (public member function)&lt;br /&gt;copy Copy sequence of characters from string (public member function)&lt;br /&gt;swap Swap contents with another string (public member function)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;String operations:&lt;br /&gt;c_str Get C string equivalent (public member function)&lt;br /&gt;data Get string data (public member function)&lt;br /&gt;get_allocator Get allocator (public member function)&lt;br /&gt;find Find content in string (public member function)&lt;br /&gt;rfind Find last occurrence of content in string (public member function)&lt;br /&gt;find_first_of Find character in string (public member function)&lt;br /&gt;find_last_of Find character in string from the end (public member function)&lt;br /&gt;find_first_not_of Find absence of character in string&lt;br /&gt;find_last_not_of Find absence of character in string from the end (public member function)&lt;br /&gt;substr Generate substring (public member function)&lt;br /&gt;compare Compare strings (public member function)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8443842010282201930?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8443842010282201930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8443842010282201930' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8443842010282201930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8443842010282201930'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-string-class.html' title='[DSA] string class'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4483255009132519970</id><published>2010-11-08T09:13:00.001+08:00</published><updated>2010-11-08T09:13:41.518+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] template class</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Template, as the name suggested is a standard or generic way/form we could use for creating different output. For an example, you would ask for a report template from your senior so that you more or less know how what is expected from you.&lt;br /&gt;&lt;br /&gt;One of the benefits of programming through a template, it reduces the effort to recode the same function/class but pass in a different variable type. Our good friend the STL Algorithms is the best example of programming template. Imagine the sort() function need to be rewrite again and again and again for each type of variable...............&lt;br /&gt;&lt;br /&gt;I strongly do not advocate of getting report from other people and change it to your name. That is not template nor referencing. It is called plagiarism.&lt;br /&gt;&lt;br /&gt;A function template or class template, beside used with primary variable, eg int, char, double. It can be used with data structures too. As usual, it is possible to pass in more then 1 parameter of the same or different variable type to the function template or class template.&lt;br /&gt;&lt;br /&gt;reference the code below.&amp;nbsp;&lt;b&gt;NOTE: The Code is NOT COMPLETE&lt;/b&gt;&amp;nbsp;you need to fix it before you could use it.&lt;br /&gt;&lt;br /&gt;Q1. What does both of the function trying to do??? Is there a way to generalize it without repeating the "same" code?&lt;br /&gt;Q2. Populate the given code with a template function that will double each number stored as elements in the data structure. Is it possible to double a char or a string stored in the data structure??&lt;br /&gt;&lt;br /&gt;//===CHALLENGE==&amp;gt; HEROES ONLY=====//&lt;br /&gt;Q3. Write a template function reverselist() that could take in a list display the content of the list and store the contents of the list on to a stack and later display the content of the stack.&lt;br /&gt;Q4. Is there a more efficient way to create a test for a palindrome????&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/a704777c8adcc4c118611314f4d91a33" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4483255009132519970?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4483255009132519970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4483255009132519970' title='26 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4483255009132519970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4483255009132519970'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-template-class.html' title='[DSA] template class'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7185940070333296917</id><published>2010-11-02T07:54:00.001+08:00</published><updated>2010-11-02T07:54:31.215+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] File Op</title><content type='html'>Data need to be saved somewhere. The reason being, if all data are stored in memory and the computer get accidentally turned off. The effect would be epidemic!&lt;br /&gt;Data output using fstream are clear text by default! ENCRYPT any sensitive info before output to file!!!!!&lt;br /&gt;&lt;br /&gt;Some text file are delimited in a certain way, for example below.&lt;br /&gt;sample of comma delimited file=&amp;gt; aa,bb,cc&lt;br /&gt;sample of semicol delimited file=&amp;gt;aa;bb;cc&lt;br /&gt;&lt;br /&gt;File operations of the program, should be able to read in the lines, and "parse" the input accordingly and stored into the required variable.&lt;br /&gt;&lt;br /&gt;This usually happens when legacy software needed an upgrade to the most-IN technology (Programmer Guru Mantra= If it ain't spoil, don't fix it). However, the data are not compatible. One common feature of software, it has the ability to "dump" data out of the system.&lt;br /&gt;&lt;br /&gt;As as programmer, we need to write code to extract those that required to the new system. Therefore, we still get to keep our jobs, make ourself valuable.&lt;br /&gt;&lt;br /&gt;Regarding on the issue of Out Sourcing to other country. Fret Not. Why would the company would entrust their data to a 3rd party other then their employer? The audit trail of hands dipped into the data would be clearer and easier to trace. Hence the accountability.&lt;br /&gt;&lt;br /&gt;With Great monies, comes great responsibilities.&lt;br /&gt;&lt;br /&gt;Talking about file IO and security, take a look at the game below.&lt;br /&gt;&lt;a href="http://www.takegame.com/logical/htm/boxworld.htm"&gt;http://www.takegame.com/logical/htm/boxworld.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I played the game when i was still a teenager like most of you. My friend challenged me to complete the game (eg Lvl 99) in the shortest possible time. Few of us, being kiasu (hokkien&amp;nbsp;colloquial for afraid to loose), keep comparing each other's progress. Me, for being me went to my usual corner and gave my friend Lvl99 at the end of the day. Guess how I manage to get it done????&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Homework&lt;/b&gt;&lt;br /&gt;The sample of file operations are in the writescore.cpp and readscore.cpp. Compile and run it to get a feel of how File I/O is done.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Drill Questions&lt;/b&gt;&lt;br /&gt;1. Write a program that READS IN records (eg A.txt) that are &lt;b&gt;semicol&lt;/b&gt; delimited eg&lt;br /&gt;tom 19 dcpe/2B/01 DSA B+&lt;b&gt;;&lt;/b&gt;kelly 18 dcpe/2B/01 DSA A&lt;b&gt;;&lt;/b&gt;&amp;nbsp;.....&lt;br /&gt;&lt;br /&gt;2. Write a program that WRITE OUT records (eg B.txt) that are &lt;b&gt;semicol&lt;/b&gt; delimited eg&lt;br /&gt;tom 19 dcpe/2B/01 DSA B+&lt;b&gt;; &lt;/b&gt;kelly 18 dcpe/2B/01 DSA A&lt;b&gt;;&lt;/b&gt; ....&lt;br /&gt;&lt;br /&gt;3. write a program that reads in Q1 but modifies to &lt;b&gt;comma&lt;/b&gt; delimited and output to a new file.&lt;br /&gt;&lt;br /&gt;HINT: It is good to have a menu driven system to choose between the options instead of running 2 cpp projects concurrently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7185940070333296917?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7185940070333296917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7185940070333296917' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7185940070333296917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7185940070333296917'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-file-op.html' title='[DSA] File Op'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1642269707238304107</id><published>2010-11-01T08:21:00.002+08:00</published><updated>2010-11-01T08:21:48.000+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Class &amp; Objects</title><content type='html'>&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;In programming, class is a common topic. No matter is C++ or Java, the same concept on class still applies. Killing N birds with 1 stone.&lt;br /&gt;&lt;br /&gt;In programming, objects are end product of a class. Objects represent data that are generalized by the class.&lt;br /&gt;&lt;br /&gt;Think of the Class as a cookie cutter, Objects are the cookies, the dough is generic material that all cookie need to use. Each object may have some unique attribute(s), such you would sprinkle some chocolate on the dough to make a chocolate chip cookie or add some almond to it almond cookie. In the generalization point of view (the class pov), it is still cookie. All cookie uses the same dough.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Think about it, I went to eat dim sum&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Dim_sum"&gt;http://en.wikipedia.org/wiki/Dim_sum&lt;/a&gt;&amp;nbsp;last weekend and&amp;nbsp;realize&amp;nbsp;some of the items taste the same. I wonder they use the class method to make it. I.e generic minced meat to make dim sum of different shapes.&lt;br /&gt;&lt;br /&gt;How would data be generalized and yet representable?&lt;br /&gt;For an example, Cats and dogs. Both are mammals. Both have four legs. Does it means that the cat is a dog and vice versa???!!! Sure we can think of some other attribute that differentiates a dog and a cat. dog barks and cat meows.&lt;br /&gt;&lt;br /&gt;So we can have a class named pets, we can have data attribute of pet type, pet breed etc. Below is the sample code for inventory I have for the dog class for my imaginary dog kennel.&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/ee3095aea2a7fadb03e1e944e846644c" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;b&gt;drill question 1&lt;/b&gt;, create a class for a cat shelter? Think of the attribute you can put into the class to represent the data of a cat. Some attributes like owner telephone and address should be set as private, and accompany by the neccesary get and set function.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;drill question 2&lt;/b&gt;, create bank account objects with classes as specified in DS03 Objects Q3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice from the code I posted, I have to manually track the objects, manually remember what objects I have created and use it.&lt;br /&gt;In programming, the ability to link one topic learned previously to another topic, "mesh" the knowledge together is very important. So to speak.&lt;br /&gt;From data structures , we know that it is convenient to manipulate data in a data structure, and depends on the condition we can choose the best data structure to represent the data. Can we "link" class&amp;amp;objects with data structures?&lt;br /&gt;&lt;br /&gt;Refer to the code below,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/77cff6cf74991bf9c00f0e0fba356cb6" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Drill question 3&lt;/b&gt;. Based on the class you have created, can you store the objects in a data structure of your choice???? Think of what are the possible applications for data structures "meshing" with class&amp;amp;objects?&lt;br /&gt;HINT: try to use constructors&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;below is the code for the SpStudent class in the slides, with my comments&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; color: #e8e8e8; font-family: Arial; line-height: normal; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/97bee05525216fc42b72faa17b424735" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #e8e8e8; font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #e8e8e8; font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/810817e8cbce067ea11a7b167fef38e9" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #e8e8e8; font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #e8e8e8; font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/fa1dac269394cf640f1101bf968ee217" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1642269707238304107?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1642269707238304107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1642269707238304107' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1642269707238304107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1642269707238304107'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/11/dsa-class-objects.html' title='[DSA] Class &amp; Objects'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3220915842114384342</id><published>2010-10-31T14:56:00.000+08:00</published><updated>2010-10-31T14:56:10.091+08:00</updated><title type='text'>[FYP] climbing up a ramp</title><content type='html'>well done boys and girls~! We shall not stop here. There are more to come.....&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RAWWRRRRRR&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/RarFz4XdWfg?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/RarFz4XdWfg?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3220915842114384342?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3220915842114384342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3220915842114384342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3220915842114384342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3220915842114384342'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/fyp-climbing-up-ramp.html' title='[FYP] climbing up a ramp'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6651283056981444040</id><published>2010-10-27T18:29:00.000+08:00</published><updated>2010-10-27T18:29:17.104+08:00</updated><title type='text'>[FYP] almost there</title><content type='html'>&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rUxd5CA1ec0?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rUxd5CA1ec0?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;turning the segway using a pot while maintaing balance&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6651283056981444040?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6651283056981444040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6651283056981444040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6651283056981444040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6651283056981444040'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/fyp-almost-there_27.html' title='[FYP] almost there'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6348495401111512295</id><published>2010-10-25T08:00:00.002+08:00</published><updated>2010-10-25T08:00:37.206+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] pointers stuff</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;Well done to those that have completed the drill question (well, at least you did the “EASY” one) last week. To those that did my STUN question, KUDOS!!!! By doing this exercise, you have examine the buggy code and correctly identified the syntax errors, logic erros and some went further of discovering the differences of using “cin” and “getline”. The application and synthesis skills, such as isolating the buggy portion of the code, using the debugger, and reading error message from the IDE are particularly important especially in programming. These are the skills that I hope you can exhibit or demonstrate at the future assessments to come.&lt;br /&gt;&lt;br /&gt;For those that have yet to attempt, please give it a try. And for those have done, try out the “HERO” question. Everybody loves to be a hero and get "worshiped" (I assumed that is).&lt;br /&gt;&lt;br /&gt;Pointer is used for example when sorting a data structure. It is “expensive” to move the data physically, hence, changing the value of the pointer that points to the data is considered “cheaper”.&lt;br /&gt;&lt;br /&gt;Below is a chunk of code that demonstrates pointers, the differences when pointers are applied to “char array” and “int array”. YOU are MOST WELCOMED to add more examples of using a pointer in c++.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pointers come a long history in C and C++, some hate it so much but some really love it. Take it like a durian. Pointers enable the manipulation of the memory directly. PLEASE be EXTRA meticulous when it comes to programming pointers. Commented code really helps a lot for others to look, learn, debug another programmer’s code.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;Now Comes the drill question for&amp;nbsp;&lt;b&gt;pointer&lt;/b&gt;. Write a program that calculates the volume of a cube (A x A x A), which need to satisfy some "requirement" identified from the "problem analysis" (which is done by me for you)&lt;br /&gt;1. Read in 2 inputs from the user&lt;br /&gt;2. Code a function that takes in this 2 parameter&amp;nbsp;&lt;b&gt;passed by reference&lt;/b&gt;&amp;nbsp;and the result is stored in another variable, which is also accessible by the pointer ptrArea. Print out the area for the user.&lt;br /&gt;3. Code another function, which takes in the ptrArea and calculate the volume of the cube.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now come to the drill question&amp;nbsp;&lt;b&gt;array&lt;/b&gt;. Arrays are “containers” that can be used to store data in a structural manner. There are some disadvantages when it comes to using array. First, memory need to be allocated first (static). What happends when there are many copies of the same programme are running? Since memory is allocated, and used up but there are more data to come, array do not have the flexibility to increase like the vector. What are the other cons of using array compare to any other data structure?&lt;br /&gt;&lt;br /&gt;Consider using “arrays”. Code a simple 100 seat cinema booking system that will do the following&lt;br /&gt;1. Given (x,y) coordinate set the seat to be occupied.&lt;br /&gt;2. Suggest a scheme/algorithm that detects duplicate seat entry.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6348495401111512295?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6348495401111512295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6348495401111512295' title='49 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6348495401111512295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6348495401111512295'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/dsa-pointers-stuff.html' title='[DSA] pointers stuff'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>49</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5919199185131818492</id><published>2010-10-20T22:02:00.001+08:00</published><updated>2010-10-20T22:05:13.744+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] my LED belt buckle bling</title><content type='html'>I was toying with the idea of&amp;nbsp;controlling&amp;nbsp;rows and rows of LED for display purposes. Why not LCD (monochrome)? some may ask. First of all, LCD doesn't display well under outdoor condition and secondly we can see from afar if compared relatively with an LCD.&lt;br /&gt;&lt;br /&gt;So there I go finding different ways of multiplexing LEDs. If no multiplexing method is used, I am limited with N number of LEDs. Where N is the number of digital pins available from my MCU. I am not in the state of getting a MCU with 64 IO pins just to control 64LEDs. What a waste of resources.&lt;br /&gt;&lt;br /&gt;There I stumbled on the idea of &lt;a href="http://www.instructables.com/id/Charlieplexing-LEDs--The-theory/"&gt;charlie-plexing&lt;/a&gt; on the Internet. After reading about it and getting hook on the idea, I am eager to give it a try. But to my horror, the wiring on the vero-board can be quite nightmarish. Any 1 wire connected wrongly can result in a disaster.&lt;br /&gt;&lt;br /&gt;I am looking for a better solution, eg a PCB for my own use. I stumbled upon LOLshield V0.1 and it cost USD$99 excl shipping. It is way out of my reach.&lt;br /&gt;&lt;br /&gt;I went around asking our staff about it and luckily, I met Mr.Chong SP which he kind enough to supply me a PCB he designed to use charlieplexing for&amp;nbsp;56LEDs. The experiment time was cut down drastically, because of the time reduce from making the connection. PHEW... programming was not straightforward but still&amp;nbsp;manageable.&lt;br /&gt;&lt;br /&gt;But somewhat 56LEDs I am still not satisfy with it..... The number of text I can scroll is limited. Couple of months later, &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=17_21&amp;amp;products_id=274"&gt;LOLshield v1.&lt;/a&gt;5 is going for USD25. I know i got to get my paws on it.&lt;br /&gt;126LEDs in a 9x14 grid! wow!!! Quickly, I made my order and waited patiently for it to reach SG.&lt;br /&gt;&lt;br /&gt;I thought inserting of 126LEDs of&amp;nbsp;3mm&amp;nbsp;is going to be a breeze...but i was wrong......spent about 1hr + just to insert them all....Make sure you get all the polarity of the LED correct. Any 1 mistake will make the whole board defect.JimmyRodges silk screen the LED polarity on the PCB, so you will not mess up with the + and -. How&amp;nbsp;thoughtful.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TL7xnsFw35I/AAAAAAAAAO8/1cqUH8CKZ04/s1600/IMAG0464.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TL7xnsFw35I/AAAAAAAAAO8/1cqUH8CKZ04/s400/IMAG0464.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;Next, Apply masking tape of the LED side to support when doing the soldering. The spacing are very small (1.5mm apart) and can be quite &lt;b&gt;intimidating&lt;/b&gt; to beginners. I got some steady hands and couple shots of coffee to help me stay focus. I have soldered 126x2 = 252 pins in another 1hr + time.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL7ymJ1n9pI/AAAAAAAAAPA/bIxLSHLtJPI/s1600/IMAG0466.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL7ymJ1n9pI/AAAAAAAAAPA/bIxLSHLtJPI/s400/IMAG0466.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL7ytsVmNJI/AAAAAAAAAPE/3JNtWc1HxtI/s1600/IMAG0467.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL7ytsVmNJI/AAAAAAAAAPE/3JNtWc1HxtI/s400/IMAG0467.jpg" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="" style="clear: both; text-align: left;"&gt;When soldering PCB of this caliber, make sure you have a really good solder tip. Having a good condition tool is to the success of this toy. My newest soldering iron is getting really troublesome. After a few pins, the heat became uneven and it felt very sluggish..... I changed to my old solder iron which I am reluctant to throw away. Same problem..... The soldering tip is worn out badly. I went digging around my pile of junk and discover that I have a spare soldering tip, but for a smaller watt which I bought earlier but did not get to used it.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL7zosQ0g7I/AAAAAAAAAPI/s9tcEYG99Nw/s1600/IMAG0468.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL7zosQ0g7I/AAAAAAAAAPI/s9tcEYG99Nw/s400/IMAG0468.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;On the left is the badly battered soldering tip, on the right is the new one.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Then soldering is really a FASSSTTTTT.... I only spent about 1-3 seconds per pin....&lt;b&gt;I recommend&lt;/b&gt; to trim off the excess leads from the LED to as short as possible, roughly 1-2mm above the PCB then solder. I will explain in the next paragraph. My soldering skills are getting rusty, I am getting old and my eye sight is still as good. God knows how many more years I can do such delicate soldering.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TL7z46RvwaI/AAAAAAAAAPM/G93S7RLKU4M/s1600/IMAG0469.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TL7z46RvwaI/AAAAAAAAAPM/G93S7RLKU4M/s400/IMAG0469.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL70NZ9QmmI/AAAAAAAAAPQ/rnzV2lboEMk/s1600/IMAG0470.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TL70NZ9QmmI/AAAAAAAAAPQ/rnzV2lboEMk/s400/IMAG0470.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Hook up the LOLshield to the Arduino. Note in the previous step. If you do not trim the leads as short as possible, when you fit the LOLshield to the Arduino there might be a gap and caused loose contact. Worst, the exposed leads will come in contact with the USB connector on the arduino. Hence, I covered the metal connector with masking tape to prevent it from shorting my LEDs.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL71DA3VcdI/AAAAAAAAAPU/EPiXp_vyfFw/s1600/IMAG0472.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="238" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL71DA3VcdI/AAAAAAAAAPU/EPiXp_vyfFw/s400/IMAG0472.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Now, the code part, I am using the basic test from the &lt;a href="http://jimmieprodgers.com/kits/lolshield/programlolshield/"&gt;example&lt;/a&gt;. Download to the chip... and....Kept my fingers crossed..........&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/NYRbdtp9vTs?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/NYRbdtp9vTs?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The moment of seeing all the LEDs light up accordingly, it is really priceless.........all the hours spent did went off.........&lt;br /&gt;Next, I want to scroll some text, but i realised that the library I imported is buggy and doest not support fonts. jimmrodges did release another version of the library. Comparing the modified code is really mentalling taxing. So i used the "diff" function from notepad++ to compare the changes in the 2ver of the lib files.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL72lMTaluI/AAAAAAAAAPY/EhXOMM-QJAg/s1600/diff+cmp.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="302" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TL72lMTaluI/AAAAAAAAAPY/EhXOMM-QJAg/s400/diff+cmp.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Life is so much simpler with this small helpers....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Load in the new changes in the lib file... mod the existing sample code to scroll a longer text. Please note that it only supports 22char and capital letters only.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;script src="http://snipt.net/embed/3f6672175b5a9c087d530428638ca19a" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;have fun!!! It is going to appear as my belt buckle with&amp;nbsp;customizable&amp;nbsp;text. Anybody wants to shrink the footprint to make it even smaller? LOL&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HFcjPi4-crQ?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HFcjPi4-crQ?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5919199185131818492?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5919199185131818492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5919199185131818492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5919199185131818492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5919199185131818492'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/diy-my-led-belt-buckle-bling.html' title='[DIY] my LED belt buckle bling'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_xcMOgL0aFSs/TL7xnsFw35I/AAAAAAAAAO8/1cqUH8CKZ04/s72-c/IMAG0464.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1838001146810911640</id><published>2010-10-19T08:01:00.002+08:00</published><updated>2010-10-19T08:01:29.396+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] stun question Wk1</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/St1G2b_P5wI/AAAAAAAAAJU/5X5VJyZ4c5k/s1600-h/P2010090001.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5394545829699643138" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/St1G2b_P5wI/AAAAAAAAAJU/5X5VJyZ4c5k/s400/P2010090001.jpg" style="cursor: pointer; display: block; height: 300px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I came across this "game" when our department have a staff retreat at the Singapore flyer.&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The objective of the game is to arrange staffs into 3 "E" characters.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Since this week our learning topics revolves around functions(), arithmetic evaluations, use of variables and proper programming methodology. I think it would be interesting to write a program to solve it. Anyway, during that period of time, access to a computer is a luxury. All equations have to be done on the paper. I manage to save this data in my memory and it is fresh still.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Attached is the screenshot of the piece of paper that illustrate the requirements.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Assume that the top and bottom horizontal bar is X, mid horizontal bar is (X-1) and the vertical bar is (X+1). Instinctively, this is a classic case where we can solve for X to the total number of staff and use it to form the "E". There is a possibility that there will be some staff remained, because we would want to maintain the uniformity of the 3 "E" characters.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;3[(x-1)+2x+(x+1)] = total staff available.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;which can further deduce to&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;12x = total staff available. =&amp;gt; that is for forming 3 "E" characters.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Hence forming of 1 "E" character would be&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;4x = (1/3) staff available&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The diagram below are not drawn to scale.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;(x+1)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;======== (x)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;+&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;+&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;====== (x-1)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;+&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;+&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;======== (x)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;But how to translate the problem specs to code????????&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;we can use a divide and conquer approach to subdivide the problem into smaller portion.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Solving the algebra problem in the program might be redundant, since we have solve it on paper.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Some questions to ponder before start writing the code&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;a. what are the variables will be used.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;b. do we need to use some form of data structure to store the temporary data?&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;c. what are the algorithms to calculate the X's, to display on the screen.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;below are the sub-problem that need to be solve. drill down to further detail is not required.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;1. Read in inputs from user for the number of staff available&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;2. Calculate how many will be left out from the E formation&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;3. calculate how many staff will form the top, mid and bottom horizontal bar&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;4. calculate how many staff will form the vertical bar&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;5. output to a screen&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;let the code and comments flow in!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1838001146810911640?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1838001146810911640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1838001146810911640' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1838001146810911640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1838001146810911640'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/dsa-stun-question-wk1.html' title='[DSA] stun question Wk1'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_xcMOgL0aFSs/St1G2b_P5wI/AAAAAAAAAJU/5X5VJyZ4c5k/s72-c/P2010090001.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8198936371122201070</id><published>2010-10-17T16:41:00.008+08:00</published><updated>2010-10-17T16:46:23.448+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] Common Mistakes in Programming</title><content type='html'>&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;There are few categories of mistakes/error/bug in programming. Suchs as logic erros, syntax errors, core dumpz (run time error)/&lt;br /&gt;I came across many many types of mistakes in programming that student commit. These mitakes fall majorly into the syntax error which is the easiest to troubleshoot. As compared to logic errors, there are formal mathematical way to prove that the logic and the premise it holds.&lt;br /&gt;&lt;br /&gt;As the old programming guru’s mantra: “It takes more pairs of eyes to spot the bug”&lt;br /&gt;&lt;br /&gt;Below is NAF (Need A Fix) buggy code that I have created (50lines only....easy). Your "TASK" is to "SOLVE IT", "FIX IT", PLS DO NOT EAT IT!!!&lt;br /&gt;&lt;br /&gt;PLS POST/SHARE your answers here, add in as comments.&lt;br /&gt;//=======================================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/985a884caeac4c5673b3f005c6d28158" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;//=========================================================&lt;br /&gt;&lt;br /&gt;NO KICK???????????!!!!!!!!!!!&lt;br /&gt;&lt;br /&gt;try the below (100lines, 5qns), covers strings, STL containers, iterators. Errors such as syntax error, runtime error and a little bit of logic error.&lt;br /&gt;&lt;br /&gt;Note: "HEROES ONLY"&lt;br /&gt;&lt;br /&gt;//==========================================================&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 13px; line-height: 18px;"&gt;&lt;script src="http://snipt.net/embed/90a3ed1fed7fd4d188e6546b1ae7552a" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8198936371122201070?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8198936371122201070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8198936371122201070' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8198936371122201070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8198936371122201070'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/dsa-common-mistakes-in-programming.html' title='[DSA] Common Mistakes in Programming'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-706944480867604844</id><published>2010-10-14T16:40:00.001+08:00</published><updated>2010-10-14T16:55:40.217+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] pc based oscilloscope-zelscope</title><content type='html'>&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;sometimes we need to use&amp;nbsp;oscilloscope&amp;nbsp;to verify our findings, especially with data acquisition.&amp;nbsp;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;But, if you working from home, having the hardware it self is a luxury.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;this is pc based. you would need to connect it to the mic input of your laptop/computer.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;stereo audio cable, stereo mini 2.5" jack (male and female) both can draw from the store.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;if you need to look at a sample. come to my office.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;Pls do not, put &amp;gt;5v as input. might damage your sound card.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;alternatively, go SLS get those &lt;s&gt;9bux&lt;/s&gt; USB soundcard and use that mic input.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;Anything fried, will be at the USB sound. Take it as an insurance, &lt;s&gt;9bux&amp;nbsp;&lt;/s&gt;&amp;nbsp;10 bux only.&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TLbEmaFwXxI/AAAAAAAAAO0/KymCuAQp4N0/s1600/IMAG0278.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TLbEmaFwXxI/AAAAAAAAAO0/KymCuAQp4N0/s320/IMAG0278.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This is how the usb soundcard oscilloscope looks like&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TLbFAlQZZKI/AAAAAAAAAO4/47mhZTe2H_8/s1600/IMAG0287.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TLbFAlQZZKI/AAAAAAAAAO4/47mhZTe2H_8/s320/IMAG0287.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;for the software, download here the&amp;nbsp;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;a href="http://www.google.com/url?q=http%3A%2F%2Fdownload.cnet.com%2FZelscope%2F3000-2094_4-10782631.html&amp;amp;sa=D&amp;amp;sntz=1&amp;amp;usg=AFrqEze15z1pQLyE-S8IUsvvewlq_6uxXw" style="color: #0033cc; text-decoration: underline;"&gt;http://download.cnet.com/Zelscope/3000-2094_4-10782631.html&lt;/a&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;there is the free ver, which is not floating from the official website. It is in my laptop&lt;/span&gt;&lt;br /&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 25px;"&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;a href="http://www.google.com/url?q=http%3A%2F%2Fwww.zelscope.com%2Fscreenshotwav1.jpg&amp;amp;sa=D&amp;amp;sntz=1&amp;amp;usg=AFrqEzfYajTisxlkSiujMFjy2Xi8KoDFlA" imageanchor="1" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: #0033cc; text-decoration: underline;"&gt;&lt;img border="0" src="http://www.zelscope.com/screenshotwav1.jpg" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please note the sampling frequency is only until 44kHz, which is equivalent to the CD quality for the USB sound. Hence, any hi frequency waveform is not able to observe using the software.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-706944480867604844?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/706944480867604844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=706944480867604844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/706944480867604844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/706944480867604844'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/diy-pc-based-oscilloscope-zelscope.html' title='[DIY] pc based oscilloscope-zelscope'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_xcMOgL0aFSs/TLbEmaFwXxI/AAAAAAAAAO0/KymCuAQp4N0/s72-c/IMAG0278.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4390662229359982289</id><published>2010-10-03T23:09:00.000+08:00</published><updated>2010-10-03T23:09:41.183+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] Almost there....</title><content type='html'>Weekends well spent with the students...&lt;br /&gt;&lt;br /&gt;Happy Bdae to KKKY too~~!~!&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/PcKikd2RIE0?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/PcKikd2RIE0?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6Jy4OYBqB_4?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/6Jy4OYBqB_4?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4390662229359982289?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4390662229359982289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4390662229359982289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4390662229359982289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4390662229359982289'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/fyp-almost-there.html' title='[FYP] Almost there....'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8493455785693120078</id><published>2010-10-02T15:07:00.000+08:00</published><updated>2010-10-02T15:07:12.660+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WIN'/><title type='text'>Congratulations Cisco NetRider Singapore 2010</title><content type='html'>Congratulations!!!!&lt;br /&gt;&lt;br /&gt;You made us PROUD!!!!!&lt;br /&gt;Photo Source: sjteo&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TKbZ-vX8CwI/AAAAAAAAAOw/z0VeHg1VDLE/s1600/NR2010+GOLD_edt.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TKbZ-vX8CwI/AAAAAAAAAOw/z0VeHg1VDLE/s640/NR2010+GOLD_edt.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8493455785693120078?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8493455785693120078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8493455785693120078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8493455785693120078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8493455785693120078'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/10/congratulations-cisco-netrider.html' title='Congratulations Cisco NetRider Singapore 2010'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_xcMOgL0aFSs/TKbZ-vX8CwI/AAAAAAAAAOw/z0VeHg1VDLE/s72-c/NR2010+GOLD_edt.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1879417442037079287</id><published>2010-09-22T14:06:00.002+08:00</published><updated>2010-09-22T14:13:12.016+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] how to bake a light cheese cake</title><content type='html'>Was really tied up with work and processing the&amp;nbsp;semester&amp;nbsp;exam.Finally I found some FREE time to blog about stuffs I have done over the weeks!&lt;br /&gt;&lt;br /&gt;The following ingredients called for 2 cakes.&lt;br /&gt;&lt;br /&gt;250g Cream Cheese (I used&amp;nbsp;Philadelphia,you can use any type of cream cheese of your choice&amp;nbsp;).&lt;br /&gt;100g Butter&lt;br /&gt;Leave both above at room temperature.&lt;br /&gt;8eggs , yolk and white separate.&lt;br /&gt;100g sugar (can be reduced to 80g if you are watching the sugar intake)&lt;br /&gt;2 Tbsp (Table spoon) corn flour&lt;br /&gt;2 Tbsp flour&lt;br /&gt;0.5 serving of mango yogurt&lt;br /&gt;150ml of whipping cream (chilled)&lt;br /&gt;1tsp (tea spoon) of vanilla&amp;nbsp;essence&lt;br /&gt;&lt;br /&gt;This baking of cheese cake called for the hot water bath treatment (to be elaborated later). I did wrapped some foil on my spring foam pan (the baking tin with detachable base) to prevent water from seeping in.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmVEF1S4CI/AAAAAAAAAM4/7UK2hDURv5w/s1600/IMAG0308.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmVEF1S4CI/AAAAAAAAAM4/7UK2hDURv5w/s320/IMAG0308.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Sieve the powder ingredient.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmVS1PIO2I/AAAAAAAAANA/30TPZSVmVUU/s1600/IMAG0309.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmVS1PIO2I/AAAAAAAAANA/30TPZSVmVUU/s320/IMAG0309.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Beat butter and cream cheese with the mixer at medium speed or high speed if you are impatient like me!haha&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmVnWUtntI/AAAAAAAAANI/5AppzayW3rE/s1600/IMAG0310.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmVnWUtntI/AAAAAAAAANI/5AppzayW3rE/s320/IMAG0310.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Beat with a mixer untill light and fluffy. How to determine the mixture is fluffy? Where the mixture is beaten until it have risen AKA volume increases, that is about time to stop the mixer. If you are using a manual one, this is a good exercise to burn off the calorie... (which you going to consume later anyway...hahahaha)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmWQZzr0KI/AAAAAAAAANQ/hpP7JvfPf14/s1600/IMAG0311.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmWQZzr0KI/AAAAAAAAANQ/hpP7JvfPf14/s320/IMAG0311.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Beat in the egg yolk 1 by 1.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmWcAZGtgI/AAAAAAAAANY/h7eT_fAG1NY/s1600/IMAG0312.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmWcAZGtgI/AAAAAAAAANY/h7eT_fAG1NY/s320/IMAG0312.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Add in vanilla essence&lt;br /&gt;Sieve in (for the 2nd time) the powder in batches and stir with a spatula. Doing for some body i Love, so I did put in extra effort. Otherwise.....&lt;br /&gt;Make sure there are no granules of powder in the mixture. This will affect the texture of the cake&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmW6pEXMJI/AAAAAAAAANg/QayUxHHpV7s/s1600/IMAG0313.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmW6pEXMJI/AAAAAAAAANg/QayUxHHpV7s/s320/IMAG0313.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Turn On the mixer, add in&amp;nbsp;yogurt to batter&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmXlL5MXNI/AAAAAAAAANo/DKww2Bdd-Pw/s1600/IMAG0315.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmXlL5MXNI/AAAAAAAAANo/DKww2Bdd-Pw/s320/IMAG0315.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Then add in whipping cream (chilled) to batter&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmXvzThL8I/AAAAAAAAANw/x5E72Kb3C1k/s1600/IMAG0316.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmXvzThL8I/AAAAAAAAANw/x5E72Kb3C1k/s320/IMAG0316.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;This is how the batter going to look like after all the ingredients are mixed. We are not done yet. Still have the most important step, making the meringue.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmYjH4ja7I/AAAAAAAAAN4/axdUvv2oaZE/s1600/IMAG0317.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmYjH4ja7I/AAAAAAAAAN4/axdUvv2oaZE/s320/IMAG0317.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the mean time, lets go and heat up the oven at 170deg C with a hot water bath. Prepare a pan in the oven, add in hot water until 4/5 or 3/4 filled. Do not fill to the brim, It will overflow and caused scalding. The cake tin is going to take a bath in the pan in a little while. My oven is the those that comes with a fan, the fan is good when roasting. Baking wise, conventional oven is good.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmYqdx3MwI/AAAAAAAAAOA/noxS070uzbI/s1600/IMAG0318.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TJmYqdx3MwI/AAAAAAAAAOA/noxS070uzbI/s320/IMAG0318.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Meringue time.&lt;br /&gt;Make sure your mixer, bowl and utensils are free from dirt, water and grease. Must be very very clean and dry thoroughly.&lt;br /&gt;The egg white must be free from egg yolk too. TURN On the mixer at HIGH SPEED&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmY_3PYviI/AAAAAAAAAOI/h47jinKMeho/s1600/IMAG0320.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmY_3PYviI/AAAAAAAAAOI/h47jinKMeho/s320/IMAG0320.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Add in the sugar in batches&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmZP31a6BI/AAAAAAAAAOQ/tEIh5lGcKv4/s1600/IMAG0322.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmZP31a6BI/AAAAAAAAAOQ/tEIh5lGcKv4/s320/IMAG0322.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Beat the mixture until semi liquid form. This is the tricky step. In between mixing, turn off the mixer then lift up the mixer and observe the runny egg white. If it is still very liquid form, continue to beat. If it still flow down from the mixer and form a perk, that is the texture we want. If the egg white is beaten until set, &amp;nbsp;i.e. you can practically overturned the container with the white sponge in it over and it will not fall by force of gravity. This is the no no.&lt;br /&gt;&lt;br /&gt;This takes a couple of practices to get the perfect meringue. I tried to master it, but it is really a costly experiment. Lab rats are really hard to come by to eat my experiment! hahahaha&lt;br /&gt;&lt;br /&gt;Stir in the egg white mixture in batches to the batter.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmamdccOMI/AAAAAAAAAOY/Hb-fzqniRpc/s1600/IMAG0324.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmamdccOMI/AAAAAAAAAOY/Hb-fzqniRpc/s320/IMAG0324.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;My mum trained me (never inspired to be a ) to stir in such a way that, it forms an numerical eight. She said this will fold maximum amount of air into the cake.&lt;br /&gt;&lt;br /&gt;Pour the batter into the cake tin, and off it goes into the oven into the hot bath.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmbReU8H4I/AAAAAAAAAOg/uLqqar0jbos/s1600/IMAG0325.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/TJmbReU8H4I/AAAAAAAAAOg/uLqqar0jbos/s320/IMAG0325.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Bake for 40minutes.&lt;br /&gt;&lt;br /&gt;My mum's technique again.....&lt;br /&gt;while(cake!=ready){&lt;br /&gt;Insert a LONG bamboo skewer into the cake,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;If the skewer comes out clean,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; then cake is ready.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; else &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue with another 10 minutes.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I got carried away chatting on MSN with her and forgot to observe the time.........Then i sense a burnt smell......&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmc3Mgf0iI/AAAAAAAAAOo/Kz28beZM-8k/s1600/IMAG0326.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/TJmc3Mgf0iI/AAAAAAAAAOo/Kz28beZM-8k/s320/IMAG0326.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1879417442037079287?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1879417442037079287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1879417442037079287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1879417442037079287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1879417442037079287'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/09/diy-how-to-bake-light-cheese-cake.html' title='[DIY] how to bake a light cheese cake'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_xcMOgL0aFSs/TJmVEF1S4CI/AAAAAAAAAM4/7UK2hDURv5w/s72-c/IMAG0308.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4007529260939658944</id><published>2010-08-31T11:08:00.000+08:00</published><updated>2010-08-31T11:08:24.427+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dsa'/><title type='text'>[DSA] feedback~~!</title><content type='html'>&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;RAWWRRRRRRRRRR is Feeding time....ooops feedback time.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;feedback about me, you can use the below as a guide&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;1. my teaching&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;2. your learning&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;3. what you have learned from me&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;4. what you want me to improve on&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;I hope to see you guys again, prolly FYP or other modules.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #063e3f; font-family: Courier, monospace; font-size: 17px; line-height: 21px;"&gt;It was fun and fulfilling to see you all keep upgrading your code to impress, yours truly.&amp;nbsp;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4007529260939658944?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4007529260939658944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4007529260939658944' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4007529260939658944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4007529260939658944'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/08/dsa-feedback.html' title='[DSA] feedback~~!'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4233212727871698481</id><published>2010-08-23T11:56:00.001+08:00</published><updated>2010-08-23T12:18:00.499+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] hamster riding self balancing robot</title><content type='html'>As promised,&lt;br /&gt;Sudah datang....&lt;br /&gt;&lt;br /&gt;NO hamster is harmed in this production!!&lt;br /&gt;&lt;br /&gt;actors:&lt;br /&gt;Jack the beanstalk (hamster)&lt;br /&gt;self balancing robot-&amp;gt; KKKY &amp;amp; co&lt;br /&gt;&lt;br /&gt;Crew:&lt;br /&gt;SJTEO. camera boy, gives direction but that doesn't makes him a director. ZZZZzzzZZzzz&lt;br /&gt;KKKY and Sara. Robot rigger&lt;br /&gt;Daniel and CWei. Hamster rigger&lt;br /&gt;JLiang: tools rigger&lt;br /&gt;mew: pacifier (for the hamster duhzz)&lt;br /&gt;&lt;br /&gt;&lt;object height="405" width="500"&gt;&lt;param name="movie" value="http://www.youtube.com/v/VOasE3KyHus?fs=1&amp;amp;hl=en_US&amp;amp;border=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/VOasE3KyHus?fs=1&amp;amp;hl=en_US&amp;amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4233212727871698481?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4233212727871698481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4233212727871698481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4233212727871698481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4233212727871698481'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/08/fyp-hamster-riding-self-balancing-robot.html' title='[FYP] hamster riding self balancing robot'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5299070544416113238</id><published>2010-08-20T14:43:00.005+08:00</published><updated>2010-08-25T13:43:04.627+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] self balancing robot</title><content type='html'>This are 2 of the student's FYP i am supervising now.&lt;br /&gt;&lt;br /&gt;the common components on the 2 bots&lt;br /&gt;MCU= arduino&lt;br /&gt;accelerometer and gyroscope.&lt;br /&gt;&lt;br /&gt;what makes it so different from one and another?&lt;br /&gt;The bot in the 1st video, uses IMU. A chip that have accelerometer and gyroscope bundled into a single PCB. For locomotive, it uses a tamiya twin gear with 2 DC motors on ardumotor.&lt;br /&gt;&lt;br /&gt;The bot in the 2nd video, uses a wii nunchuck for the accelerometer and a standalone gyroscope. For locomotive, it uses 2 servo motor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The main objective is to make a &amp;nbsp;robot that is able to balance on 2 wheels that are position laterally on both sides.&lt;br /&gt;The other objective is to investigate the difference in the algorithm/software/code that need to reflect the different hardware setup.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/1mUfRu3Lzeo?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/1mUfRu3Lzeo?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/58175FKHdic?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/58175FKHdic?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;stay tune,&lt;br /&gt;&lt;br /&gt;akan datang.................&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5299070544416113238?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5299070544416113238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5299070544416113238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5299070544416113238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5299070544416113238'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/08/fyp-self-balancing-robot.html' title='[FYP] self balancing robot'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-492708965912731836</id><published>2010-08-17T09:42:00.009+08:00</published><updated>2010-08-25T13:43:14.577+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FYP'/><title type='text'>[FYP] fire &amp; hazard SOP in lab or workshop</title><content type='html'>&lt;table cellspacing="0" class="sites-layout-name-one-column sites-layout-hbox" style="color: #444444; font-family: Arial, Verdana, sans-serif; font-size: 13px; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; table-layout: fixed; text-align: left; width: 969px;" xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="sites-layout-tile sites-tile-name-content-1" style="padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; vertical-align: top;"&gt;&lt;div dir="ltr"&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TGtAmkwe7AI/AAAAAAAAAMs/pJI2ofaZSxQ/s1600/pants+on+fire+40869_420685675677_729515677_4854600_2466117_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="380" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TGtAmkwe7AI/AAAAAAAAAMs/pJI2ofaZSxQ/s640/pants+on+fire+40869_420685675677_729515677_4854600_2466117_n.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;Today 16 aug 10, yours truly is vising the lab at 5.10pm to check out on the progress of the project.&lt;br /&gt;While moving around the the robot platform ,&lt;br /&gt;explaining the requirements of the robot, fiddling around with the motors and gears mounted to the robot platform.....&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;Yours truly's micro-fiber business pants came in contact with a hot solder iron that was left on a chair for an extended period of time.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;Why is the SOLDER left on the chair!!!??!!!???!!? GRRRZZZZZ&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;LUCKILY&lt;/span&gt;&lt;/b&gt;, no roast meat is served for dinner. Poor alan brooke, he did not made his business pants to be heat proof.&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;An old saying=&amp;gt; You never came lucky, TWICE.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;SAFETY&amp;nbsp;PRECAUTIONS&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;DO NOT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&amp;nbsp;LEAVE heated elements turn&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;ON&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;for extended period of time.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;2. Make sure all heated elements are&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;inside their guard/holder&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;3.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Turn off&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&amp;nbsp;any unattended &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;heating/electrical&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt; elements.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="display: block; text-align: left;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;4. Work on the workbench.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;There is a reason why it is called a "work"bench&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-492708965912731836?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/492708965912731836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=492708965912731836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/492708965912731836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/492708965912731836'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/08/fyp-fire-hazard-sop-in-lab-or-workshop.html' title='[FYP] fire &amp; hazard SOP in lab or workshop'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_xcMOgL0aFSs/TGtAmkwe7AI/AAAAAAAAAMs/pJI2ofaZSxQ/s72-c/pants+on+fire+40869_420685675677_729515677_4854600_2466117_n.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6615298601952186429</id><published>2010-07-29T18:57:00.001+08:00</published><updated>2010-07-29T19:01:16.413+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] android on a laptop (live CD)</title><content type='html'>my student (WS) from SPIC is exploring on how to put android on a laptop. &lt;br /&gt;After some tinkering he manage to try live CD.&lt;br /&gt;He had put up a very detailed step by step guide. Which you guys can check out from the link below&lt;br /&gt;&lt;br /&gt;http://spic.cca.sg/2010/07/27/run-android-on-your-pc-or-laptop/&lt;br /&gt;&lt;br /&gt;Since it is booting from a liveCD, no damages will be done on your computer logically.&lt;br /&gt;&lt;br /&gt;After you take out the iso image, Your computer resumes as per normal.&lt;br /&gt;&lt;br /&gt;&lt;iframe height="1000" src="http://spic.cca.sg/2010/07/27/run-android-on-your-pc-or-laptop/" width="100%"&gt;&amp;lt;p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;   &amp;lt;p&amp;gt;Your browser does not support iframes.&amp;lt;/p&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/p&amp;gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6615298601952186429?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6615298601952186429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6615298601952186429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6615298601952186429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6615298601952186429'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/07/diy-android-on-laptop-live-cd.html' title='[DIY] android on a laptop (live CD)'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3551642240237697406</id><published>2010-07-02T09:55:00.001+08:00</published><updated>2010-07-02T09:59:25.887+08:00</updated><title type='text'>Chromium OS, Cloud Computing</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I had a dream.......&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The computers at CSSC does not require a HDD, an optical drive (DVD/CD) nor a installed OS.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The TCO of the computers can be on the cheap.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;We could juz load chromium OS on a USB drive, boot from USB and use our computer as if it is a super big web browser.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for docs processing, we could use docs.google.com&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for multimedia, we could use youtube with the playlist feature.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for storing of images, i could use flickr , photobucket&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for storing of code, i could use snipt&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for IM, i could use e-buddy&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;for social networking, i could use facebook...&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;hhhmmmsss.... what i could do more on my computer?&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;but for software development.... it is a little bit tricky......&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;but.... it is still cool on my development computer.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;but for scanning of &amp;nbsp;photos from a scanner... it is a little bit tricky&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;but for printing of from a conventional printer... it is a little bit tricky&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;OVERALL.... it is still cool, for using chromium in a CyberCafe type of deployment.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;check out the how-to documents of running chromium OS from my young padawan yonglin.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src ="http://spic.cca.sg/2010/06/28/chromium-os/" width="100%" height="300"&gt;&lt;br /&gt;  &lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;&amp;gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 12px;"&gt;link:&amp;nbsp;&lt;/span&gt;&lt;a href="http://spic.cca.sg/2010/06/28/chromium-os/"&gt;http://spic.cca.sg/2010/06/28/chromium-os/&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Chromium is still breaking on computers that sports broadcomm wifi chip. Altheros is still cool.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;more info here&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://www.chromium.org/chromium-os/getting-dev-hardware/dev-hardware-list"&gt;http://www.chromium.org/chromium-os/getting-dev-hardware/dev-hardware-list&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3551642240237697406?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3551642240237697406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3551642240237697406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3551642240237697406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3551642240237697406'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/07/chromium-os-cloud-computing.html' title='Chromium OS, Cloud Computing'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1985084880780177439</id><published>2010-06-08T13:49:00.001+08:00</published><updated>2010-06-08T19:52:56.894+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] the accidental human conductor</title><content type='html'>Usually  I would take a break from intense studying by doing some non technical related activity such as cooking, baking etc. But in the office environment, en-suit kitchen is consider a luxury and way out of my reach. Instead, I make little toys (electronics) /handicraft (mastering the art of folding roses) to kill off the gloomy mood from studying non stop.&lt;br /&gt;&lt;br /&gt;I wanted to make a Amplitude Modulated Laser Transmitter for Audio. There are many examples (successful ones) plastered all over the Internet.It originates from here ...&lt;br /&gt;&lt;a href="http://www.freeinfosociety.com/site.php?postnum=2310"&gt;http://www.freeinfosociety.com/site.php?postnum=2310&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What you will need&lt;br /&gt;1. 1x laser pointer S$1.9 from $2shop.&lt;br /&gt;2. 4.5v battery&lt;br /&gt;3. Audio output transformer (8ohm and 1k ohm impedance)S$1, S$3. This is the tricky one, i shall elaborate later.&lt;br /&gt;4. LDR&lt;br /&gt;5. Speaker, USB powered preferred over passive ones.&lt;br /&gt;&lt;br /&gt;Connect them up accordingly. The schematics are available from the link above. From left the laser pointer, the battery pack, the audio output transformer and audio out from the laptop.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_xcMOgL0aFSs/TA3XHPDGhLI/AAAAAAAAAMk/k2JY412nHYc/s1600/IMAG0154.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_xcMOgL0aFSs/TA3XHPDGhLI/AAAAAAAAAMk/k2JY412nHYc/s320/IMAG0154.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, hook up the receiver part. The USB powered speaker, LDR.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/TA3XB5RFhhI/AAAAAAAAAMc/m4dkVuRaOho/s1600/IMAG0152.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/TA3XB5RFhhI/AAAAAAAAAMc/m4dkVuRaOho/s320/IMAG0152.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Now, the tricky part. The "audio output transformer" (branded by the shop with no rating) which was sold to me for $3 does not work. After measuring the impedance using a Digital Multi Meter, it only have 2ohm and 600ohm impedance, a far cry from what I need. The output from laser pointer is very very very weak. The LDR cannot pick up the light intensity. I made another trip down SLT and one of the shop owner sold me a $1&amp;nbsp;&amp;nbsp;"audio output transformer" . Tough luck I may say, the impedance does not match. The output from the laser pointer still as weak. Hunt around the labs for some spares......no luck at all.&lt;br /&gt;&lt;br /&gt;I guess there will be another round of parts hunting, &lt;b&gt;AFTER&lt;/b&gt; I finish my exam.&lt;br /&gt;&lt;br /&gt;During the 30minutes of playing with the above mentioned toy, i noticed something.&lt;br /&gt;&lt;br /&gt;When I am holding the LDR+USB powered speaker's mini stereo jack on my RHS and the laser pointer + messy wires at my LHS. The speaker output some music&amp;nbsp;even though I &lt;span class="Apple-style-span" style="color: red;"&gt;DID NOT&lt;/span&gt;&amp;nbsp;&amp;nbsp;press the "on" button on the laser pointer. Which it should not be the case. When I &lt;span class="Apple-style-span" style="color: red;"&gt;DID &lt;/span&gt;press the "on" button, the music is cut off! For a moment, I thought it is a very strange phenomena that doesn't make sense. But...after 2 seconds... HAHA.....&lt;br /&gt;&lt;br /&gt;The first correct answer to that "strange" phenomena and why I press on the button of the laser pointer the music is off, shall get 1x muesli bar from me. Leave your answer on my post as a comment~&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Nonetheless, it is still COOL to be the human conductor by touching both the receiver end and the&amp;nbsp;transceiver&amp;nbsp;end to produce some sound without using a physical wire. &lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;TRY IT AT YOUR OWN RISK!!! IF you or any parts&amp;nbsp;thereof&amp;nbsp;&lt;/span&gt;Got&lt;span class="Apple-style-span" style="color: red;"&gt; FRIED, I shall bear no liability nor responsibility.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Below is a video of it, still can &lt;b&gt;WOW&lt;/b&gt; some crowd if it is packaged in a magic show. E.g, asking an audience come up to the stage to touch an exposed end (eg the receiver side), while holding at the magician's hand. The magician shall strut his/her stuff with the physics behind it.&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qlBJTCXBEjQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/qlBJTCXBEjQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;now... back to the books..........&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1985084880780177439?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1985084880780177439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1985084880780177439' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1985084880780177439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1985084880780177439'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/06/diy-accidental-human-conductor.html' title='[DIY] the accidental human conductor'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_xcMOgL0aFSs/TA3XHPDGhLI/AAAAAAAAAMk/k2JY412nHYc/s72-c/IMAG0154.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9167168182996601836</id><published>2010-06-01T10:55:00.000+08:00</published><updated>2010-06-01T10:55:31.965+08:00</updated><title type='text'>[news] Top 500 super computers!!!!</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src ="http://news.bbc.co.uk/2/hi/technology/10187248.stm" width="100%" height="800"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;link :  http://news.bbc.co.uk/2/hi/technology/10187248.stm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9167168182996601836?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9167168182996601836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9167168182996601836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9167168182996601836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9167168182996601836'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/06/news-top-500-super-computers.html' title='[news] Top 500 super computers!!!!'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3454885408671406424</id><published>2010-05-20T20:48:00.002+08:00</published><updated>2010-05-29T14:18:31.885+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] light saber ver 2</title><content type='html'>Still remember my &lt;a href="http://shin-ajaran.blogspot.com/2010/03/diy-light-saber-with-15-and-60minutes.html"&gt;15bux light saber&lt;/a&gt; i made couple months ago?&lt;br /&gt;&lt;br /&gt;I made an upgrade of it, with proper light saber handle...It is kinda cool to take graduation picture with it!!!!But I did not dress up as obi-wan and bring it to the ceremony, it is too eccentric somehow.&lt;br /&gt;&lt;br /&gt;I went to the mom&amp;amp;pops hardware shop trying my luck to get parts to make the handle, but some how, lady luck is not smiling at me. None of the parts express their enthusiasm to be modified by me. Then I went to tom&amp;amp;stephanie to buy present for my friends daughter and I bump into a toy that looks like a light saber and it is CHEAP. s$8.90 only.&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ryXseaubflM&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ryXseaubflM&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_Urq7Vi8xI/AAAAAAAAALc/SyZ8Ka5_Wn8/s1600/IMAG0133.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_Urq7Vi8xI/AAAAAAAAALc/SyZ8Ka5_Wn8/s320/IMAG0133.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I did put 3x AAA battery to turn it on and record down the animation. &lt;s&gt;Did not upload it, because wanted to save me from the&amp;nbsp;embarrassment of the toy.&lt;/s&gt; BUT, it is still cheap.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Since young, I have a knack of opening up things (+ forgot how to put it back!! haha) and take a look "under the hood". Being young, I have no idea what are the "innard" looking components and the wiring that are so intriguing to look at. My parents are &amp;nbsp;language teachers and can't really help much on the electronics/physics part. It is very important to have a mentor, a guide and somebody to teach the basics and principles of the working. Alternatively, I self taught by experimenting...... but that was a long time ago......&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;Here is how it looks like after it is dissected.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/S_UtEo8N0KI/AAAAAAAAALs/JejxkGNUWqg/s1600/IMAG0134.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="267" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/S_UtEo8N0KI/AAAAAAAAALs/JejxkGNUWqg/s400/IMAG0134.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the lower container, from left. small DC motor with counter weight to create vibrations when turn on. speaker, small IC circuit for sound &amp;amp; light.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;while trying to cut out the excess plastic to make room for my modification, it snapped. So much for a s$8.90 toy. Luckily, it is not affecting the overall stability of the mod.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UtcuFnqoI/AAAAAAAAAL0/CX0y-Rs_g0A/s1600/IMAG0135.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UtcuFnqoI/AAAAAAAAAL0/CX0y-Rs_g0A/s320/IMAG0135.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I got some tracing paper and transparent blue flim (2m &amp;nbsp;x1m) popular book store for s$1.50, but I only use 4" of it. the materials can be save for later use. Line them up nicely, secure with double sided tape and slide in the&amp;nbsp;acrylic&amp;nbsp;tube from the previous light saber. 3R= Reuse, Recycle, Re .... ahem...forgot....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;After I finally got the LED strips into the acrylic tube that is lined with the diffuser and colour filer, 3 hours had passed...... I am running short of time to attend the graduation ceremony.....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Went to ah yap's lab to use his power tool to do some fabrication on the handle...&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;this is the final look of it.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UuysJXEdI/AAAAAAAAAL8/StV-pHwFB4I/s1600/IMAG0144.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UuysJXEdI/AAAAAAAAAL8/StV-pHwFB4I/s400/IMAG0144.jpg" width="267" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/S_Uu2UDHBMI/AAAAAAAAAME/RGL-JdjphNs/s1600/IMAG0145.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/S_Uu2UDHBMI/AAAAAAAAAME/RGL-JdjphNs/s400/IMAG0145.jpg" width="267" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;some soldering, mouting and testing... the clock showed 5 pm.... i better get my shirt and tie ready....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;boys &amp;amp; girls, May I present to you.... my s$23.90 light saber&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/S_UvVI0DUvI/AAAAAAAAAMM/BLQFjV_Av-U/s1600/IMAG0140.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="428" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/S_UvVI0DUvI/AAAAAAAAAMM/BLQFjV_Av-U/s640/IMAG0140.jpg" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;this is how it looks under fluorescent light.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UvfHHJlzI/AAAAAAAAAMU/Cql27z3Lg7U/s1600/IMAG0138.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/S_UvfHHJlzI/AAAAAAAAAMU/Cql27z3Lg7U/s400/IMAG0138.jpg" width="267" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3454885408671406424?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3454885408671406424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3454885408671406424' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3454885408671406424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3454885408671406424'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/05/diy-light-saber-ver-2.html' title='[DIY] light saber ver 2'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_xcMOgL0aFSs/S_Urq7Vi8xI/AAAAAAAAALc/SyZ8Ka5_Wn8/s72-c/IMAG0133.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8842879706979242478</id><published>2010-05-15T19:43:00.000+08:00</published><updated>2010-05-15T19:43:04.632+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] arduino and temperature sensor LM35</title><content type='html'>I accidentally scalded my hand 2weeks ago when I left my solder iron on for a prolonged period and I grabbed the metal guard. It is really a painful mistake. Luckily, no 3rd degree burn of that sort.&lt;br /&gt;&lt;br /&gt;So prevent this from happening again, I decided to make a colour changing bling that reacts to temperature. All I is just hook up the temperature sensor to the heat source, for this example, the metal guard. It can be also modified to be fitted into a tap to give visual warning on the temperature of the water. &lt;br /&gt;&lt;br /&gt;I laid my paws on RGB LEDs from sim lim tower that cost $1 per piece. It is on the pricey side and i only bought 5 of them. Loaned 1 to nigel and saravanan each for their D&amp;I. Mr.Chew told me last Wednesday he got some for 40cents each (at 100pc lar)!! I felt I was really ripped off....I also have a temperature sensor LM35z lying in some dark corner in my tool box..&lt;br /&gt;&lt;br /&gt;To light up R,G and B individually, just connect it to a logic low. My RGB LED is the common anode type. In arduino, this can be achieve by using the digital write.&lt;br /&gt;&lt;br /&gt;But, to achieve "blending" of another color, it is necessary to input different intensity of Red, Green and Blue for that "new" colour. Hence an analog write is used.&lt;br /&gt;I have used a 0-255 value, it is the same as programming HTML colour blending.&lt;br /&gt;&lt;br /&gt;connect as below&lt;br /&gt;int redLED=11;    //Pin11 = Red LED&lt;br /&gt;int blueLED=10;    //Pin10 = Blue LED&lt;br /&gt;int greenLED=9;    //Pin9 = Green LED&lt;br /&gt;A0 connect to vout of LM35z.&lt;br /&gt;&lt;br /&gt;Vout is scaled to 1024 steps for easy conversion.&lt;br /&gt;&lt;br /&gt;the code below is for your reference. Uncomment the colour blending part to play with the RGB LED.&lt;br /&gt;&lt;script type="text/javascript" src="http://snipt.net/embed/3002142ce79f3d07062a28150d72edd2"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;take a look at the video. My office is at 20degC -&gt; BLUE, my laptop is emitting heat at 30degC +++ RED. Anything in between, green.&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/X_0N1b37Tog&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/X_0N1b37Tog&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8842879706979242478?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8842879706979242478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8842879706979242478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8842879706979242478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8842879706979242478'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/05/diy-arduino-and-temperature-sensor-lm35.html' title='[DIY] arduino and temperature sensor LM35'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7891774489871954843</id><published>2010-05-03T12:52:00.000+08:00</published><updated>2010-05-03T12:52:29.971+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laser'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><category scheme='http://www.blogger.com/atom/ns#' term='graffiti'/><title type='text'>annotating power point slides with laser graffiti</title><content type='html'>I came across the GRL (Graffiti Research Lab) website while researching for open platform and openCV to do tracking of an image blob.&lt;br /&gt;&lt;br /&gt;I am totally amazed by the ability to draw with a laser, albeit not the emotion they are expressing with graffiti. &lt;br /&gt;&lt;br /&gt;So I was thinking, can I used it to annotate my powerpoint slides while teaching?? + the wireless presenter I am issued with to scroll the slides back and forth. It is going to be damn cool lar! commercial product such as "afterglow" is going for usd$1950 per copy for the same feature i mentioned.&lt;br /&gt;&lt;br /&gt;quickly, I downloaded the code (I love open source!!) and compile it. The webcam is the input device looking at the whole vision field and the code tracks the red dot (it is called a blob)&lt;br /&gt;you will need&lt;br /&gt;&lt;br /&gt;1x code&lt;br /&gt;1x webcam (any model with driver)&lt;br /&gt;1x &lt;5w laser pointer1x projector&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/X6gC3o2a_9Q&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/X6gC3o2a_9Q&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;check out the video.&lt;br /&gt;&lt;br /&gt;sadly, when i run it with power point slides as the background, the slides doesn't show up as the background. More code tweaking ahead and more weekends are needed....&lt;br /&gt;&lt;br /&gt;Akan Datang............................&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7891774489871954843?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7891774489871954843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7891774489871954843' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7891774489871954843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7891774489871954843'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/05/annotating-power-point-slides-with.html' title='annotating power point slides with laser graffiti'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3195049099185165673</id><published>2010-04-30T15:11:00.002+08:00</published><updated>2010-04-30T15:15:10.896+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>Arduino with servo (360deg)</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;arduino with servo motor (360 deg)&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;There are some servo code that came with arduino.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;File-&amp;gt;examples-&amp;gt;servo-&amp;gt;sweep&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;The servo is from parallax. It is a continuous rotation type. Courtesy of Ah Yap, TSO of T822.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;a href="http://www.acroname.com/robotics/parts/R174-CONT-RO-SERVO.html" style="color: #551a8b;"&gt;http://www.acroname.com/robotics/parts/R174-CONT-RO-SERVO.html&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I don't have a servo controller handy....&amp;nbsp;&lt;a href="http://www.crustcrawler.com/downloads/manuals/ServoController.pdf" style="color: #551a8b;"&gt;http://www.crustcrawler.com/downloads/manuals/ServoController.pdf&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;So I would just make do with manually programming my arduino to control 2 servo at a later stage.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;The the servo takes 6v and 12mA and we do not want to power it directly off the MCU. If the current load is too high,&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;the MCU might be fried. I really take good care of my arduino, so I will try 1x servo instead of 2x.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Just to illustrate the working of it.&lt;/div&gt;&lt;br /&gt;&lt;div id="t:bb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_138vnmn3xgb_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="t:bb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Ignore the sonar in the above picture. It is for decoration purposes.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Hook up servo +6v and gnd to arduino 5v and gnd, data to pin D10.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;you can try try the example code "SWEEP" that comes with it and for convenience sake, it is attached below.&lt;/div&gt;&lt;script src="http://snipt.net/embed/da97ab0423d2c025667b3b2b90dc0c6f" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Check out the servo in action...&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ePQSGbTFs2M&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ePQSGbTFs2M&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Now the questions come begging, how can we drive 2 servo using arduino (note: data pin only) for a forward and backward movement.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3195049099185165673?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3195049099185165673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3195049099185165673' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3195049099185165673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3195049099185165673'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/arduino-with-servo-360deg.html' title='Arduino with servo (360deg)'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-622292483506711603</id><published>2010-04-30T15:10:00.002+08:00</published><updated>2010-07-08T10:43:47.191+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>Arduino interface with maxbotic maxsonarEz1</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Arduino interface with maxbotic maxsonarEz1&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Maxsonar comes with a couple of flavours to interface, namely the analog and the pulse width. Below are the experiments I have done with them.&lt;/div&gt;&lt;br /&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_132nwxr5wcz_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Connect MaxSonar pin 5v and Gnd to Arduino's 5V and gnd respectively. I am using Analog pin on max sonar, hence I connect it to A0 on arduino.&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_133dqbb7tgb_b" style="height: 972px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;The ruler here is to help me to identify whether my readings are as accurate as possible. As I would put my hand across the sonar sensor at 15cm point and hopefully the readings will be 15cm too.&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;There are some sample code for sonar in arduino itself. I am using this from allen bruce. But he interface it to PING sonar instead.&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;http://snipt.net/teos0009/arduino-maxsonar-analog-pin/?key=2f06d19e68c5145fe0bbe650d3624ff8&lt;br /&gt;&lt;br /&gt;&lt;script src="http://snipt.net/embed/2f06d19e68c5145fe0bbe650d3624ff8" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="frik" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="rhye" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_134gm8v4qg6_b" style="height: 972px; width: 648px;" /&gt;&lt;/div&gt;&lt;/div&gt;The readings are plain crazy. 35x cm before I move my hand across the sensor. The analog pin is not accurate for short distance. But for longer distance where granularity in terms of 10s' of cm is still acceptable.&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="uep." style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Next up, try with the PW pin. PW= pulse width. It is the Tc of the pulse generated by maxsonar that is measured. Wire to pin D8 instead of A0.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="ueqs" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_135jwjb2bdc_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="ueqs" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ueqs" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Same setup as previous. But the code have to change to reflect the method.&lt;/div&gt;&lt;div id="ueqs" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;http://snipt.net/teos0009/arduino-maxsonar-pw-pin?key=327e03f8dfda55271e87ed42d99f16ac&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;script src="http://snipt.net/embed/327e03f8dfda55271e87ed42d99f16ac" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div id="vfu:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&amp;nbsp;The data looks so much more interesting.......&lt;br /&gt;&lt;div id="efgr" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_136rfr9256s_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="efgr" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="efgr" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-622292483506711603?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/622292483506711603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=622292483506711603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/622292483506711603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/622292483506711603'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/arduino-interface-with-maxbotic.html' title='Arduino interface with maxbotic maxsonarEz1'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-6380582500020122137</id><published>2010-04-28T08:26:00.000+08:00</published><updated>2010-04-28T08:26:08.720+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>Interfacing Arduino with wiimote (and later the nunchuck)</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Interfacing Arduino with wiimote (and later the nunchuck)&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I was toying with the idea of interfacing wiimote to my arduino as my replacement for accelerometer and gyroscope which comes in this package the&lt;br /&gt;&lt;h2 class="product_name" style="color: black; font-size: 14pt; margin-left: auto; margin-right: auto;"&gt;&lt;span class="Apple-style-span" style="color: #77776e;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;IMU Combo Board - 3 Degrees of Freedom - ADXL203/ADXRS614&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;&amp;nbsp;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9249" style="color: #551a8b;"&gt;http://www.sparkfun.com/commerce/product_info.php?products_id=9249&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;which cost USD$124 which is equivalent to SGD$162.44.&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;FYI, my wiimote cost me sgd$69 (left over from last year FYP project) and nunchuck sgd$25 (which I got from the shop at clementi city vibe where my student yenyu working part time).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Shall not elaborate about the wiimote and nunchuck...There are plenty of resources in the Internet.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I found out that the pin outs for the wii expansion port (WEP) from the Internet, thanks to the people that are willing to share the data! The drawing are for interfacing the IEEE1394 to the WEP.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Connect pin1 of WEP to Aref on arduino&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;pin2 of WEP to A5&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;pin5 to A4&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;pin6 to ground&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_127fp2xmphh_b" style="height: 972px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I also found out that, it is not necessary to buy a nunchuck, cut out the connector part and used it with the wiimote. That, will render the nunchuck useless (to the Wii ofcourse, later you guys will find out more about my experiment with wiimote and why I have to use the nunchuck instead...........)&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;The replacement is a IEEE1394 male to male cable for sgd$7 from simlim square.&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;The pin out on the IEEE1394 and the WEP are carefully map out....&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;This is how it is going to look like, when they are connected...&lt;/div&gt;&lt;div id="x:tm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="jbpn" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_128d9z68ghg_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="jbpn" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="pi::" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_130d7kpmqd9_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="jbpn" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Below are the code for sending and receiving data between arduino and pc. Similar code can be found at wiimeadows too! thanks to them for discovering the pattern of data send and receive out of the wiimote.&amp;nbsp;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;script src="http://snipt.net/embed/9304d2ccd393beb32265c227a6017abe" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;below are the ASCII art for the data flow of the devices that are hooked up together.&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;arduino ---wired---&amp;gt;wiimote--bluetooth--&amp;gt;PC&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;arduino &amp;lt;---wired---wiimote&amp;lt;--bluetooth--PC&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Some way, some how, when I open my hyperterminal to observe the data output, I only receive my debug message which is "serial init finished". This means my serial connection of 119200 is setup correctly, but no generated data is observed. No subsequent data is collected both from the arduino through the wiimote to the pc (need to use 3rd party wiimote driver, such as wiimote library on the windows OS), nor the pc through the wiimote to arduino (through hyper terminal).&amp;nbsp;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Used my multimeter to check the VCC and the gnd pin of IEEE1394 pin out, all seems to be correct. Just that no data is observed from the transferring between the devices.&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Rewire the IEEE1394 again, with more meticulous effort put in... the result is still the same............................................&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Fustrated, because if I can't get the accelerometer readings from the wiimote to arduino, my hypotheses of using it as my sensor would be false!!!!!!&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I was contemplating to cut my nunchuck to retrieve the WEP PROPRIETARY connector..........because, I could still use the nunchuck on the wii (As if I got one, hahahah). If &amp;nbsp;In the end, I &amp;nbsp;decided to mutilate the nunchuck. Plug in the connector to the wiimote and the exposed end to the arduino.... No eureka moment.......... the data output is the same as the IEEE1394 cable........Very fustrated................................because of my hypotheses would failed..........................&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;But, which part went wrong?????? I am still finding the cause of it..........There are success stories on the Internet that used the similar setup.......&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Before the last straw to be thrown, I tried to hooked up the nunchuck to the arduino instead.&amp;nbsp;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;with the code attached below&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;script src="http://snipt.net/embed/a5c524ea94c70bbdf311bff43a5a5029" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Atlas.... some readings from the accelerometer on the hyperterminal...data from the nunchuck.......&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/QiF950efoFY&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/QiF950efoFY&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="s72q" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-6380582500020122137?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/6380582500020122137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=6380582500020122137' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6380582500020122137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/6380582500020122137'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/interfacing-arduino-with-wiimote-and.html' title='Interfacing Arduino with wiimote (and later the nunchuck)'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9159313238047811190</id><published>2010-04-19T14:41:00.002+08:00</published><updated>2010-05-30T15:59:10.211+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY]{arduino} POV</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;my POV (persistence of vision)&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;some years ago, i created a spinning LED display on my decommissioned hdd. I want to display message and time in the air, while the HDD spins. Basically I opened up the HDD, attached 7LEDs to it. Hook it up to a PIC16 which is the only MCU that is made available to me at that time. The result turns out to be very bulky, and I need to use a computer PSU (power supply unit) to on the HDD and a separate step down circuit for supply 5V to my pic16. During that time, I am still using a non-cam HP nor I have a camera and I do not document it down. BUT, the know how is already with me.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Ever since I got my hands on my&amp;nbsp;&lt;a href="http://shin-ajaran.blogspot.com/2010/04/diy-arduino-protoshield.html" id="k365" style="color: #551a8b;" title="arduino and my protoshield ready"&gt;arduino and my protoshield ready&lt;/a&gt;&amp;nbsp;I have been toying with the idea of making 1 POV that is easy, less bulky and can fits into my palm in a snag. So that when I sing/dj in a concert, my fans would gyrate with their hands in the air and write a message for me with the POV (I hope is not asking me to stop singing!!). The EGO meter will shoot rocket high, so does my blood pressure. haha&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;you would need 1x arduino+protoshield, 8x LEDs, 8x 330ohm resistor and code.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I am using the digital output of arduino, current limited by the resistor to the LEDs. This is how it will look like after hooking up all the components.&lt;/div&gt;&lt;br /&gt;&lt;div id="icrp" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_123mz4jr6gs_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;br /&gt;The Idea behind POV is to play a trick on the human eye. It is a known fact that human eye see things at a rate of 27Hz.&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;That is our eye's refresh rate. So anything that refreshes above that rate, the eye cannot notice the flicker.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Say I want to display the character&amp;nbsp;&lt;b&gt;"E"&lt;/b&gt;&amp;nbsp;in a 8x8 matrix, the col is indicated with col1, 2 and so forth, row indicated by LED #.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;col1, 2,3,4,5,6,7,8&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led1 ********&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led2&amp;nbsp;*&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led3&amp;nbsp;*&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led4&amp;nbsp;*****&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led5&amp;nbsp;*&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led6&amp;nbsp;*&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led7&amp;nbsp;*&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Led8&amp;nbsp;********&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I would light up the matrix column by column and each of the column is differ by 2.5ms (400Hz), this is only to light up 1 character.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;If I want to light up a message say "EEE", I need to repeat the process above for each of the character.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Straight away, I know that I need some form of loop control structure to display column by column, and character by character.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Furthermore, I need a data structure of some sort to hold the message. The easiest way is to store the characters in a 2D array.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;To make my life easier, I am using this website to help me generate the 2D array for the message to print.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;a href="http://www.repulsor.net/minipov/" style="color: #551a8b;"&gt;http://www.repulsor.net/minipov/&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I have a code template for you to use. Fill in the loop control structure and the message to print in the template.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;script src="http://snipt.net/embed/95af536f97783d756d93d4a88e042788" type="text/javascript"&gt;&lt;/script&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After finish programming, I need to test that all LEDs are working at the init of the code. It is cumbersome to swing the breadboard together with the USB cable. Hence I made a 9V battery connected for it.&lt;br /&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_124f9fwcscb_b" style="height: 972px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="uifq" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_125fnb9x3hf_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Below is an example of POV.... note that I hold my camera upside down....&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;What message am I printing????&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;What can place you can think of to use with this "toy" ??&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/JXoZ7k5kDFg&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/JXoZ7k5kDFg&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div id="r8jj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9159313238047811190?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9159313238047811190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9159313238047811190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9159313238047811190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9159313238047811190'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/diyarduino-pov.html' title='[DIY]{arduino} POV'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4920505490417233359</id><published>2010-04-19T14:09:00.003+08:00</published><updated>2010-05-30T15:59:30.466+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] how to start programming with arduino</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: 'Times New Roman'; font-size: 12pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;ol style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Download&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0A"&gt;&lt;/a&gt;&lt;img alt="image" height="122" src="http://docs.google.com/File?id=dc6pdvnc_113fkc8wthg_b" width="147" /&gt;&amp;nbsp;from the arduino website.&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Extract the downloaded file into a folder&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0B"&gt;&lt;/a&gt;&lt;img alt="image" height="214" src="http://docs.google.com/File?id=dc6pdvnc_1147k2jr9gn_b" width="576" /&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;proceed to \drivers\&lt;/span&gt;FTDI USB Drivers and make sure the drivers are in it.&lt;/li&gt;&lt;/ol&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0C"&gt;&lt;/a&gt;&lt;img alt="image" height="219" src="http://docs.google.com/File?id=dc6pdvnc_115cvfvddp9_b" width="575" /&gt;&lt;/div&gt;&lt;ol start="4" style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Plug in arduino to the computer using the provided USB cable.&lt;/span&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;When it prompts to install driver for&amp;nbsp;&lt;/span&gt;the USB to serial converter, point it to the location where 3. is located.&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;After installing complete, a reboot is necessary.&lt;/span&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Click on&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0D"&gt;&lt;/a&gt;&lt;img alt="image" height="64" src="http://docs.google.com/File?id=dc6pdvnc_116ghc2kz99_b" width="150" /&gt;&amp;nbsp;to start programming.&lt;/li&gt;&lt;/ol&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Normal" style="margin-bottom: 0px; margin-left: 18pt; margin-right: 0px; margin-top: 0px;"&gt;&amp;lt;&lt;arduino ide=""&gt;&amp;gt;&lt;/arduino&gt;&lt;/div&gt;&lt;ol style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;This is how the IDE looks like.&lt;/span&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;each project is called a&amp;nbsp;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;“&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;sketch&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;”&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;.&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0E"&gt;&lt;/a&gt;&lt;img alt="image" height="628" src="http://docs.google.com/File?id=dc6pdvnc_117hsrstqfx_b" width="521" /&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;In thi&lt;/span&gt;s location, there are sample codes on how the arduino can be used. We will use&amp;nbsp;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;file-&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;examples-&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;digital-&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;button&lt;/b&gt;&lt;/span&gt;&lt;span class="Normal__Char Apple-style-span"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic0F"&gt;&lt;/a&gt;&lt;img alt="image" height="459" src="http://docs.google.com/File?id=dc6pdvnc_118g26pmcgg_b" width="502" /&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Make the connections for the LED and the switch. Connect JC1 to pin 2 and LED&lt;/span&gt;&amp;nbsp;(JC2) to pin 13.&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Click on play button&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic10"&gt;&lt;/a&gt;&lt;img alt="image" height="48" src="http://docs.google.com/File?id=dc6pdvnc_119jmt3kfgz_b" width="41" /&gt;&amp;nbsp;to start compiling. Once compiled, below screen will be shown.&amp;nbsp;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic11"&gt;&lt;/a&gt;&lt;img alt="image" height="123" src="http://docs.google.com/File?id=dc6pdvnc_120nwwkv9gc_b" width="500" /&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Click on&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2137743283716015909&amp;amp;postID=4920505490417233359" name="graphic12"&gt;&lt;/a&gt;&lt;img alt="image" height="59" src="http://docs.google.com/File?id=dc6pdvnc_121f445fgg9_b" width="56" /&gt;&amp;nbsp;to upload it to arduino.&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Press reset button on arduino after download to start the code uploaded.&lt;/span&gt;&lt;/li&gt;&lt;li class="Normal" style="margin-bottom: 0px; margin-left: 0pt; margin-top: 0px;"&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt;Happy programming.&lt;/span&gt;&lt;/li&gt;&lt;div&gt;&lt;span class="Normal__Char Apple-style-span" style="text-decoration: none;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4920505490417233359?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4920505490417233359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4920505490417233359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4920505490417233359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4920505490417233359'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/diy-how-to-start-programming-with.html' title='[DIY] how to start programming with arduino'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8312572304015717530</id><published>2010-04-19T10:48:00.002+08:00</published><updated>2010-04-19T10:48:42.809+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] {Arduino} Protoshield</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Arduino protoshield&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I was toying with the idea of buying an arduino&amp;nbsp;&lt;a href="http://www.arduino.cc/" id="pahj" style="color: #551a8b;" title="http://www.arduino.cc/"&gt;http://www.arduino.cc/&lt;/a&gt;&amp;nbsp;for some time. It is one of the best open source MCU, complete with sample code and comes with 6 analog in and 6PWM (depends on the flavour). The best thing I liked about arduino is, it comes with many many "shield". Each shield serves a specific purpose, such as the motor shield, the ether shield etc. The shield package comes in a kit set. Hence, the low cost.&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;The price is not prohibitively expensive, but some how I spent my disposable income on my other research interest....Recently I got some cash to spare (not a windwall tho) and quickly approach my colleague Mike Ong to help me to contact his supplier get a set of protoshield and arduino. His supplier quoted me&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Arduino Duemilanove = $52.80&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;Arduino ProtoShield V.4 Kit = $15.70&lt;/div&gt;mini breadboard = out of stock&lt;br /&gt;&lt;br /&gt;Good pricing! For $68.30, I can play it for a very long period of time.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;So..... what is this protoshield alll about ?? Basically it is a mini development board for the arduino. Instead of using the big breadboard the store issued me and having many wires extending from the arduino to it. Sadly, the mini breadboard I wanted was out of stock....&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;The protoshield comes in a kit form. The PCB is of a very good quality, each description on the pin can be seen clearly.&lt;/div&gt;&lt;br /&gt;&lt;div id="ayez" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_1077wtzrkkm_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="ayez" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ayez" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Close up of the PCB&lt;/div&gt;&lt;div id="ayez" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_108c68rmvcr_b" style="height: 972px; width: 648px;" /&gt;&lt;br /&gt;&lt;div id="u7gh" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;There is no instruction manual that comes together with the kit. Nevertheless, it is very straight forward to mount the components by reading the description on the PCB and do the soldering. The LEDs have their cathode filled off and it matches the pattern on the PCB.&lt;/div&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_10963sjz598_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="okh8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;Now, the soldering part. Secure the components with some sticky tape/masking tape or what ever tape that is convenient to you. Flip it over and let the soldering begin!&lt;br /&gt;&lt;div id="as.t" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_110c3ntmbc2_b" style="height: 432px; width: 648px;" /&gt;&lt;br /&gt;&lt;div id="m7or" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="as.t" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="as.t" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;This how it looks like, arduino mounted with protoshield. Let alone the name sounds so coOOOooOOooOOoOL right!&lt;/div&gt;&lt;div id="as.t" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I insulated the USB mini connector with some masking tape, because it is dangerously near to some of the points I soldered.&lt;/div&gt;&lt;div id="as.t" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_111cw25k2xb_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;For the next 2 hours, I am playing with PoV (persistence of vision). Some of the staff, my project's boys and girls have seen it&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I know I owe all of you the how-to. Writing a how-to actually takes more time then playing with it... *sigh*&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I will try to write the how to for using the arduino IDE, that uses PROCESSING (another C-like programming language) and the how to of my PoV.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;AFTER I attended my meetingS............&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8312572304015717530?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8312572304015717530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8312572304015717530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8312572304015717530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8312572304015717530'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/diy-arduino-protoshield.html' title='[DIY] {Arduino} Protoshield'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9223035070917950035</id><published>2010-04-14T19:20:00.002+08:00</published><updated>2010-05-30T15:59:45.889+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] kinetic hand phone charger</title><content type='html'>&lt;div style="background-color: white; color: black; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;my attempt at Kinetic handphone charger.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;I received this toy as my christmas present (after some present exchange game that too difficult for me to comprehend) last year. It is a handphone charger that is powered by a 1.5v AA battery. I tried it on my HTC magic... and it works. 1AA battery can charge about 5% on my phone.&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_98g52c3rc6_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I was tinkering with the idea of marrying the circuit in the AA battery charger with a kinetic to electric generator (aka the shaker) which works on the concept of rare earth magnet's magnetic flux is cut when it is moved in and out of a coil of enameled wires. &amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Faraday's_law_of_induction" style="color: #551a8b;"&gt;http://en.wikipedia.org/wiki/Faraday's_law_of_induction&lt;/a&gt;.&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;The basic construction of the shaker is a rare earth magnet, sliding in and out of a acrylic tube that is coiled by some enameled wires.&amp;nbsp;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I also need a circuit that made up of 4 diodes (1N5819) and a capacitor (10000uF) to make the output into a constant DC. A voltage regulator LM29317 can be added too. Ai Ling the TSO is kind enough to provide me the components. thx!!. This circuit gave me about 3v across the load.&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="foo1" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_99xbknh85d_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Since the AA charger only needs 1.5v, if I can supply constant 1.5v to the AA charger through my shaker, I would be able to charge my handphone for FREE!!! (assume cost of energy acquired from food is FREE)&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;I got my rare earth magnet from a shop in sim lim tower basement 1 for $18. Use the remaining acrylic tube from my&amp;nbsp;&lt;a href="http://shin-ajaran.blogspot.com/2010/03/diy-light-saber-with-15-and-60minutes.html" id="mt.v" style="color: #551a8b;" title="light saber project"&gt;light saber project&lt;/a&gt;&amp;nbsp;&amp;nbsp;and now I need to coil 1400 revolutions of enameled wire on the acrylic tube. Ask around the lab TSOs for it and Hamzah show me some which is left over from a previous project. Now the challenging part is how am I going to coil 1400 times by hand!?&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;My first attempt trying to coil by hand... very tiring. Wanted to use a power drill, but none of the bits fit my acrylic tube......and I lost count after the 300th revolution.....&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z3.o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="fqyb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_100gs2c7md9_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="fqyb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="fqyb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;My 2nd attempt, with the power drill. The bit is a knob I salvaged from a variable resistor........&lt;/div&gt;&lt;div id="fqyb" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_101cst5n7c4_b" style="height: 972px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Apparently, there is this antique coiling device that is sitting somewhere in the cupboard. I only discovered it after I have done coiling with the power drill....&lt;/div&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="rkt:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_102d3npww9z_b" style="height: auto; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="rkt:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="rkt:" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;I have varied the simple circuit of the above to provide better charge storing (2x capacitors) and capacitor to stabilize the input of the LDO .&lt;/div&gt;&lt;div id="jb2g" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_103f6r9jjcf_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;After couple of shakes............ not to bad, the voltage is 4.43v and current in the range of 0.9~1mA.&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;More then enough to power an LED, but how about charging my phone through USB????!!!&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;USB on my laptop provides 5v and 100mA per port to charge my phone. The current might be an issue here&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="ledq" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_104dq8pppgx_b" style="height: 432px; width: 648px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;After hooking up the output of this circuit to the input to the circuit of the AA battery charger then connect to my phone through the USB and after many many many many many many many many violent shakes, my phone is still not charging....&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;Voltage across the load is still 0v after many violent shakes. the capacitors are not building up charges as fast as the discharge....&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;My hypotheses might be WRONG!!!&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;with a sore arm, a dented ego and a finite FREE time to play with my hobby,&amp;nbsp;&lt;/div&gt;&lt;div id="kz.r" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;akan datang ...................&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9223035070917950035?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9223035070917950035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9223035070917950035' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9223035070917950035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9223035070917950035'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/diy-kinetic-hand-phone-charger.html' title='[DIY] kinetic hand phone charger'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1473952877979370364</id><published>2010-04-07T14:22:00.001+08:00</published><updated>2010-04-07T14:24:50.871+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] light saber with SOUND!!</title><content type='html'>still remember my DIY light saber which I made couple of weeks back??&amp;nbsp;&lt;a href="http://shin-ajaran.blogspot.com/2010/03/diy-light-saber-with-15-and-60minutes.html"&gt;http://shin-ajaran.blogspot.com/2010/03/diy-light-saber-with-15-and-60minutes.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I brought it to &lt;a href="http://barcamp.org/BarCampSingapore5"&gt;BarCampSingapore5&lt;/a&gt;in SP, gave a flash talk on how to make it. the response was OK, there are some jedi out there in &amp;nbsp;the crowd... One comment from the ground was.... where is the sound from the light saber. It suppose to have the VOOOOM sound every time the light saber is swing.&lt;br /&gt;&lt;br /&gt;OK, Sim Lim Tower Here I come again!.........&lt;br /&gt;there are 2 parts to solve this issue.&lt;br /&gt;1. the mechanical motion detection switch&lt;br /&gt;2. the voice/sound electronics.&lt;br /&gt;&lt;br /&gt;item 1 was tricky to solve, because the COTS available is out of my reach. I tried to fabricate one with ball bearings and some metal plate, a close circuit will form when the metal ball bearing touch the metal plate. The outcome is not satisfying. I am using a roller switch instead.&lt;br /&gt;&lt;br /&gt;item 2, i bought a "puma" voice digital kit for $8 at SLT, so that I can quickly hook it up to my light saber.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653185116607_100000157784700_287280_8238528_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653185116607_100000157784700_287280_8238528_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Sadly, on the first try, nothing worked!!!!&lt;br /&gt;The troubleshooting begins~!~!&lt;br /&gt;The transistor is configured as a BJT and act as an amplifier in the circuit, and the IC is the one that generates the sound. The kit's PCB (printed circuit board) and the IC chip does not contact properly, there is some miss alignment. Small issue I presume and I ignore it.&lt;br /&gt;&lt;br /&gt;the voltage between base and emitter suppose to be 0.7v when it is in forward biasing, eg the transistor is working. But, i got a 0v reading on my multimeter. The best part, voltage between collector and emitter is 2.7v which is the voltage of my supply. it means that emitter and collector is shorted, e.g spoilt transistor.&lt;br /&gt;All the other components tested fine, except for the chip alignment... small issue....I think....&lt;br /&gt;&lt;br /&gt;Can't really sit down to trouble shoot, because in between office hours, I have to attend meeting and conference and the circuit is left at a corner&amp;nbsp;paralyzed.......&lt;br /&gt;&lt;br /&gt;When I got the time to fix it, Thinking that is the transistor fault, I swapped it with another spare I have. But I do not have the exact c9013 low power and have to used another NPN equivalent make the chip contact to the PCB closer with the use of the piece of paper as spacer.&amp;nbsp;When I decide to cut the PCB to make sure the alignment is accurate and solder the chip's contact and the PCB contact&lt;br /&gt;this is what i got... random noise.....&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3f5KBwgKTBE&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/3f5KBwgKTBE&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Is it the chip is spoilt, or the transistor i swapped is not working. The only good news, voltage between emitter and collector is not 2.7v and voltage between base and collector is 0.5v.&lt;br /&gt;&lt;br /&gt;I deduce that, it should be the transistor, so I changed back to the default one and voila~!&lt;br /&gt;I got my "PUMA" roar. but.......it doesn't sound like a puma, more like a creepy animal you watch on horror movie...&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/mBkd4JqYRlM&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/mBkd4JqYRlM&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The whole idea of using a swappable chip is such that when i get my paws on the VOOOM sound chip, I can easily hook up to my circuit. Since now I solder down already to make the circuit more realiable, this is not any option. Nonetheless, I "wire wrap" it to my light saber.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653188449940_100000157784700_287281_7319638_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653188449940_100000157784700_287281_7319638_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;this is my small button battery that gives 3v all together in the light saber. I did not share the 9v of the light saber coz i would need to use another voltage step down circuit (lazy lar duhz..... my excuse of not enough time..hahaha)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653191783273_100000157784700_287282_1283013_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs439.snc3/25265_115653191783273_100000157784700_287282_1283013_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Me playing with the light saber in the office...&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3gSUvJu1_Eo&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/3gSUvJu1_Eo&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1473952877979370364?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1473952877979370364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1473952877979370364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1473952877979370364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1473952877979370364'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/04/diy-light-saber-with-sound.html' title='[DIY] light saber with SOUND!!'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-8060626082111093317</id><published>2010-03-26T09:36:00.000+08:00</published><updated>2010-03-26T09:36:37.253+08:00</updated><title type='text'>[DIY] light saber with $15 and 60minutes!!</title><content type='html'>&lt;div style="text-align: center;"&gt;Last Saturday, After the whole day in office reading, trying and experimenting for my academic usage.... Out of sudden..... I question my self. What am I doing in the office on a Saturday??!!! Whereas my friends are busy preparing to party. Well, in the long run I see in my self there are some significant benefits for seeking knowledge and most importantly applying it. Instead of joining my friends to party and getting wasted the next few days (wasting time sleeping duhzzzz), I decided to make my self a LIGHT SABER, just to perk things up.&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Sim Lim Tower (SLT), here I come again!&lt;/div&gt;&lt;div style="text-align: center;"&gt;Window shopping around and I chance upon this flexi LEDs in plastic strips that run on 12V DC. Aha! The perfect illumination for my light saber. Best part of it, it is only sgd $15 and the shop next door is selling for $45!!!!!! absolutely the same real deal. Delighted with my find, I headed back and continue with my books.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://photos-h.ak.fbcdn.net/hphotos-ak-snc3/hs436.snc3/25115_111990295482896_100000157784700_269037_5106641_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-h.ak.fbcdn.net/hphotos-ak-snc3/hs436.snc3/25115_111990295482896_100000157784700_269037_5106641_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Some of you might wonder, what colour will my light saber be? I choose white instead of the available red, green and yellow LEDs. Just for pragmatic reasons, I can still use my light saber as source of illumination. Don't you think is eerie to read in green lights?&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;The next few days are spent on hunting parts for the light saber. I went to T822 look for ah yap for some&amp;nbsp;acrylic tube, diffused the clear acrylic with&amp;nbsp;tracing paper in it and there it go my spoils from last Saturday.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://photos-g.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990298816229_100000157784700_269038_61643_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-g.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990298816229_100000157784700_269038_61643_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;This is how it looks like incomplete....&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://photos-a.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990302149562_100000157784700_269039_4911193_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-a.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990302149562_100000157784700_269039_4911193_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;I am toying with the idea of making a really uber cool steampunk looking light saber handle. Found some really cool ones from the Internet, but........... I can't afford the time to hunt for the parts, assemble and fabricate them and not forgetting blogging about it.. hahahaah&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Just made do what I could find in my office. Emptied plastic holder for solder coils, some paper clips, 9v battery clip some wires, a variable resistor for showing strong and weak force and NO soldering involve (save time!! but might break down anytime from rough handling)&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://photos-f.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990315482894_100000157784700_269041_3773347_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="265" src="http://photos-f.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990315482894_100000157784700_269041_3773347_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;a href="http://photos-d.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990308816228_100000157784700_269040_7214782_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-d.ak.fbcdn.net/hphotos-ak-snc3/hs416.snc3/25115_111990308816228_100000157784700_269040_7214782_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;The FORCE is STRONG in this one&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://photos-h.ak.fbcdn.net/hphotos-ak-snc3/hs436.snc3/25115_111990318816227_100000157784700_269042_1142626_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; color: black;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://photos-h.ak.fbcdn.net/hphotos-ak-snc3/hs436.snc3/25115_111990318816227_100000157784700_269042_1142626_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-h.ak.fbcdn.net/hphotos-ak-snc3/hs436.snc3/25115_111990318816227_100000157784700_269042_1142626_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Your Focus determines your DESTINY&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://photos-b.ak.fbcdn.net/hphotos-ak-ash1/hs456.ash1/25115_111990322149560_100000157784700_269043_5407959_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; color: black;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://photos-b.ak.fbcdn.net/hphotos-ak-ash1/hs456.ash1/25115_111990322149560_100000157784700_269043_5407959_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://photos-b.ak.fbcdn.net/hphotos-ak-ash1/hs456.ash1/25115_111990322149560_100000157784700_269043_5407959_n.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;May the FORCE be with you&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://photos-c.ak.fbcdn.net/hphotos-ak-ash1/hs456.ash1/25115_111990325482893_100000157784700_269044_2508054_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://photos-c.ak.fbcdn.net/hphotos-ak-ash1/hs456.ash1/25115_111990325482893_100000157784700_269044_2508054_n.jpg" width="266" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-8060626082111093317?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/8060626082111093317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=8060626082111093317' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8060626082111093317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/8060626082111093317'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/03/diy-light-saber-with-15-and-60minutes.html' title='[DIY] light saber with $15 and 60minutes!!'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7687562115889553899</id><published>2010-02-19T13:34:00.000+08:00</published><updated>2010-02-19T13:34:51.668+08:00</updated><title type='text'>[DSA] Feedback</title><content type='html'>Feedback about me regarding&lt;br /&gt;&lt;br /&gt;1.my teaching&lt;br /&gt;2. your learning&lt;br /&gt;3. what you have learned from me&lt;br /&gt;4. what you want me to improve on&lt;br /&gt;&lt;br /&gt;I hope to see you guys again, but not in the same module!!!!!&lt;br /&gt;It was fun and fulfilling to teach your class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7687562115889553899?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7687562115889553899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7687562115889553899' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7687562115889553899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7687562115889553899'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/02/dsa-feedback.html' title='[DSA] Feedback'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-1560733385059805814</id><published>2010-01-14T18:21:00.000+08:00</published><updated>2010-01-14T18:21:20.962+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY'/><title type='text'>[DIY] LED fiber optic bangle BLING</title><content type='html'>I had some spare 3mm fiber optic cable from my student's FYP project, since they only use some of it to direct IR light source to a very focus beam to use on their IR camera.&lt;br /&gt;&lt;br /&gt;It would be a waste to leave the balance items at one corner, collect dust and hopefully some day later some people would discover it.&lt;br /&gt;&lt;br /&gt;Remember my Blinking LEDs belt BLING????&amp;nbsp;&lt;a href="http://shin-ajaran.blogspot.com/2009/10/diy-blinking-led-bling-belt-buckle.html"&gt;http://shin-ajaran.blogspot.com/2009/10/diy-blinking-led-bling-belt-buckle.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I found one of blinking LED on my pile of parts, very lonely and in need of some serious company.&lt;br /&gt;&lt;br /&gt;Quickly, I use some heat shrink tube, a 5mm blinking LED, 2x 1.5v button size battery and 10cm of the fibre optic cable to make a bangle. Very cool when used in dark environment.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_xcMOgL0aFSs/S07usU5b54I/AAAAAAAAALQ/K-LpbTrXg5s/s1600-h/P1401100001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_xcMOgL0aFSs/S07usU5b54I/AAAAAAAAALQ/K-LpbTrXg5s/s320/P1401100001.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;If you wonder how it works.... check out the video below..... BTW, I took this video in my office with lights switch off and most importantly, in a very dark corner (below my desk). With&amp;nbsp;fluorescent&amp;nbsp;light &amp;nbsp;(read: good for reading book), the light from the LED is barely noticeable.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px; white-space: pre;"&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/8qtVBxdR68E&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/8qtVBxdR68E&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;1x bling LED: $0.5&lt;br /&gt;2x 1.5v battery: $2&lt;br /&gt;10cm fiber optic cable:$1.2 ($12 per meter from SLT B1 Continental electronics)&lt;br /&gt;time:10minutes (OK, I din factor in my wage. Because now is wayyy pass 5pm.)&lt;br /&gt;total cost:$3.7&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-1560733385059805814?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/1560733385059805814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=1560733385059805814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1560733385059805814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/1560733385059805814'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2010/01/diy-led-fiber-optic-bangle-bling.html' title='[DIY] LED fiber optic bangle BLING'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_xcMOgL0aFSs/S07usU5b54I/AAAAAAAAALQ/K-LpbTrXg5s/s72-c/P1401100001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-3989475553191340884</id><published>2009-12-25T14:39:00.004+08:00</published><updated>2010-01-06T18:06:11.217+08:00</updated><title type='text'>merry christmas + happy new year</title><content type='html'>As usual, half day on christmas eve. The air-cond was turn off at 1pm and I am still in the office trying to get my things done. With my small little fan, it start to get cooler but not until the sun shine again. It became too warm for me stay in the office.&lt;br /&gt;&lt;br /&gt;As usual, public holiday eve, there are people EVERYWHERE! I wanted to avoid the crowd, the aimless drinking and partying on the excuse that it is a public holiday eve. Wandered to Sim Lim Tower (SLT), I am sure the crowd there suits my palate. Walking in shop by shop to hunt for a temperature sensor for my new toy (some of you might heard it straight from the horse's mouth and want to be part of the action) but none avail. I was tempted to ripped off the temperature sensor on my motherboard. haha&lt;br /&gt;&lt;br /&gt;Chance upon some kit set at B1 in SLT. wireless VU meter!!!!!!!! What is better to do then having a wireless VU meter to decorate my office!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_xcMOgL0aFSs/SzRcRtfDI0I/AAAAAAAAALA/adlywYKilmY/s1600-h/P2512090011.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_xcMOgL0aFSs/SzRcRtfDI0I/AAAAAAAAALA/adlywYKilmY/s320/P2512090011.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;Can't wait to open the kit set. So I hurry back to my office where all my tools are available. Spent the next 2 hours playing with another simpler VU that is passive. It is already 10pm....it is about time to head home.&lt;br /&gt;&lt;br /&gt;=================================================================&lt;br /&gt;&lt;br /&gt;Wakeup, exited about my wireless VU, here I am again in my Office. But to my dismay, the security guards locked the doors of the corridor that leads to my office, on christmas&amp;nbsp;day! Hungry, eager to make my toy,&amp;nbsp;frustrated&amp;nbsp;because I have to wait and certainly not in a very good mood. Call them to unlock the corridor door.&lt;br /&gt;&lt;br /&gt;I made the input ports and output ports detachable. Once I got the circuit running I want to hook it up to my headphone, my tshirt etc. Kinda cool when I am DJ-ing in the pitch dark with funky LEDs that lights up according to the sound pickup from the dance floor. Any SP-DJ kids want to loan my set? hehe&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/SzRd3QSXtQI/AAAAAAAAALI/5-xivD_Ai0U/s1600-h/P2512090010.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/SzRd3QSXtQI/AAAAAAAAALI/5-xivD_Ai0U/s320/P2512090010.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Here I present to you my toy for this christmas.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It reall rox!!!!!!!!!!!! check out the video&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: 10px; white-space: pre;"&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HSvc8cc0PUA&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HSvc8cc0PUA&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-3989475553191340884?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/3989475553191340884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=3989475553191340884' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3989475553191340884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/3989475553191340884'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/12/merry-christmas-happy-new-year.html' title='merry christmas + happy new year'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_xcMOgL0aFSs/SzRcRtfDI0I/AAAAAAAAALA/adlywYKilmY/s72-c/P2512090011.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-9017012234441916108</id><published>2009-12-07T09:22:00.002+08:00</published><updated>2009-12-07T09:30:49.997+08:00</updated><title type='text'>the dillemma of not preparing to tackle a challenge</title><content type='html'>Some time in July 09, sitting on the table for a casual dinner....&lt;br /&gt;&lt;br /&gt;After a few drinks and merry making, I was dutch uncled by the boys and girls at the dinner table. 4 of the guys are regular marathon runners. 2 of the ladies run 10km regularly. I am the only "dude" that eat+drink as much (or more) then them but minus the physical exercise. Call it peer pressure, which I succumb to it willingly. Because i know that i need to exercise, if I want to see the moon again when I am 60 years old.&lt;br /&gt;&lt;br /&gt;The next couple of day, I received an email telling me that i am participating in SCSM09 - HM. What? I never paid for it....Anyway, found out that my friends help me to register and I got to pay them back. 21Km, seems to be very loooooooooong ....... When I go to gym once in a very blue moon, I can't even complete a 2Km slow jog. Logically, 21Km requires 10x of the determination and effort.&lt;br /&gt;&lt;br /&gt;Since then, my friends took turn to run with me. Usually we would run the perimeter of the campus. Because I ran so slowly and lack of motivation, they have to push me from behind both physically and verbally. Came to a point that it is abusing already. But I just smile at them and continue with my antics. Eventually, nobody would run with me anymore.....&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;Sounds familiar??????&lt;/span&gt; It is like the studying for a subject. Especially subject that you do not like it very much or hated it completely nonetheless.&lt;br /&gt;&lt;br /&gt;Fast forward to Dec09. With very little training (I only ran 10Km once in Aug, not even 4KM per weekly basis), I am having second thoughts of going for the run. I read the maps in detail, trying to look for an "escape route" along the path. I even have the thoughts of completing it "virtually", by tagging the chip on a stranger (by putting in their pocket or something like that). &lt;span style="background-color: yellow;"&gt;This lack of confidence is the true reflection of not preparing for the challenge.&lt;/span&gt; It is like exams is coming in few weeks time but did not study nor prepare for it. Sitting for the exam is simply for the sake of taking it and hope that will pass the exam by luck.&lt;br /&gt;&lt;br /&gt;Usually I would &lt;span style="background-color: yellow;"&gt;over prepare&lt;/span&gt; before I take any exams. I actually look forward to take the exam and not the other way round. Somehow, this mental capability does not reflect on my physical capability. Or is it because of my &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;l&lt;/span&gt;&lt;span style="background-color: yellow;"&gt;ack of&amp;nbsp;empathy&lt;/span&gt;&amp;nbsp;to work out physically?&lt;br /&gt;&lt;br /&gt;My friends run the 42Km marathon, they start as early as 5am. Leaving me alone waiting for my flag off. Thoughts of escaping keep seeping into me. The thoughts of running away is so strong. I start to make excuse such as I would hurt my self during the run, take photo as "COP" (Certificate of Participation),run for 2km and go home after that. &lt;span style="background-color: yellow;"&gt;Sounds familiar again??&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the Fight or Flight Situation...&lt;br /&gt;&lt;br /&gt;Until I met Mr.Seow warming up, have a chit chat with him and he gave me some positive&amp;nbsp;reinforcement. We started together and jog the first KM together. He left, because I could not catch up with his pace.&lt;br /&gt;&lt;br /&gt;At the 2nd KM mark, I can still jog albeit slowly. I kept jogging until the 5Km mark, where I met this uncle. He is 2x my age, had a mild stroke before and sharing his life changing experience with me and the reason that kept him moving. &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;This resonates with the fear within me...&lt;/span&gt;We jog-walk-jog intermittently together. After the 7Km mark, I bump into Mr.Seow again.&lt;br /&gt;&lt;br /&gt;Uncle was stopping at the first aid station to get some help for his knee pain. I am all alone again. Along the way, a few people gave me a pat of the back and keep encouraging me. At the 15Km mark, Andy bump into me. Tell me to try harder.&lt;br /&gt;&lt;br /&gt;At the 17Km mark, blisters develop on both of my sole. It is really painful even to walk. Thanks so much to the $200+ running shoes. I kept jog-walk-jog, not wanting to lose the momentum. I knew once I sat down, I would call a cab to go home. I saw people that are bigger size, heavier and less healthy then me also keep moving forward.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Savor&amp;nbsp;the last moment to the finishing line.&lt;/b&gt; Strangers enthusiastically cheering for strangers. Not forgetting the muscle ache after the run too!&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_xcMOgL0aFSs/SxxYjFqo53I/AAAAAAAAAKw/IjoMvsDVMJQ/s1600-h/medal+P0712090000.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_xcMOgL0aFSs/SxxYjFqo53I/AAAAAAAAAKw/IjoMvsDVMJQ/s320/medal+P0712090000.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-9017012234441916108?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/9017012234441916108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=9017012234441916108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9017012234441916108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/9017012234441916108'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/12/dillemma-of-not-preparing-to-tackle.html' title='the dillemma of not preparing to tackle a challenge'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_xcMOgL0aFSs/SxxYjFqo53I/AAAAAAAAAKw/IjoMvsDVMJQ/s72-c/medal+P0712090000.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5760346269802921617</id><published>2009-12-01T09:46:00.000+08:00</published><updated>2009-12-01T09:46:35.093+08:00</updated><title type='text'>New Year Resolution</title><content type='html'>&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;It is around the corner again during this period of time, where you made some self reflections on the one year that have passed. Any of you still remembered what did I set at dec08?&lt;/span&gt;&lt;br /&gt;&lt;a href="http://shin-ajaran.blogspot.com/2008/12/new-year-resolution.html"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;http://shin-ajaran.blogspot.com/2008/12/new-year-resolution.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #063e3f; line-height: 21px;"&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Wasted 2009? Thinking of something you want to do but procrastinated/idled/let time pass by????&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt; --&amp;gt; &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;s&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;o passe, it was mentioned last year. haha&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;I, inevitable, procrastinated my way to the 100KG i am now. &lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;--&amp;gt; I am now &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;95KG&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;, just measure it yesterday night.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;&amp;lt;[2009 Goals]&amp;gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="text-decoration: line-through;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;1. Drop 1 Kg per Month &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;Tried but failed to do it. Otherwise I will be at 88KG now.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span class="Apple-style-span" style="text-decoration: line-through;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;2. Participate in Sun Down Marathon 30th May 09 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;been busy "lah" (sounds so familiar right?) Anyway, i participating Standard Charted Marathon on 6Dec09&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;What are the caused of the failure of not achieving the goals?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Let's analyse the way my goals are set. Still remember my "SMART" goal setting technique?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="line-height: 21px;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px;"&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;When it comes to setting goals, be very sure the goals set are "SMART"&lt;br /&gt;&lt;br /&gt;S= Specific / Simplified / Strategic&lt;br /&gt;M= Measurable / Manageable / Money ?!&lt;br /&gt;A= Achievable / Attainable / Agarlogic?!&lt;br /&gt;R= Realistic / Relevant&lt;br /&gt;T= Timely / Track-able / Traceable&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;What is missing from the above, is the &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;how to's&lt;/span&gt; to achieve your goal. More importantly, a schedule on what to do that you can follow closely to achieve your goal. Since i did not paste&amp;nbsp;on my wall&amp;nbsp;my workout schedule as big as loan shark ah long's, hence, nothing is &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;tracked closely&lt;/span&gt; and finally nothing happened.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;More importantly, I have made a &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;promise&lt;/span&gt; to her that I would cut down 2KG per month. She did 5KG per month. Oh my goodness.....&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;As I told my boys and girls, you are only worth what you have promised. It is either you keep your promise, or not. Will I end up self-pwned? Lets see on dec 2010. I am actually looking forward to it. hhahaha&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #063e3f; font-family: Courier, monospace; font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: 17px; line-height: 21px;"&gt;&lt;span class="Apple-style-span" style="color: #e8e8e8; font-family: Arial; font-size: 13px; line-height: normal; white-space: pre;"&gt;&lt;script src="http://snipt.net/embed/f1981584ea6f719aa9150f7d5fcfeec8" type="text/javascript"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5760346269802921617?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5760346269802921617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5760346269802921617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5760346269802921617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5760346269802921617'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/12/new-year-resolution.html' title='New Year Resolution'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7888994304344639352</id><published>2009-11-23T09:23:00.000+08:00</published><updated>2009-11-23T09:23:25.368+08:00</updated><title type='text'>[warez] fun with plasma ball</title><content type='html'>&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px; white-space: pre;"&gt;Still remember my USB plasma ball toy? &lt;a href="http://shin-ajaran.blogspot.com/2009/11/warez-usb-plasma-ball.html"&gt;http://shin-ajaran.blogspot.com/2009/11/warez-usb-plasma-ball.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px; white-space: pre;"&gt;I have decided to play around with it using a fluorescent light tube. But what worries me was the power rating of the usb plasma ball. It is running on 5V, 110mA from the USB. I am not sure whether it will work on a 2' 10W fluorescent light tube. Anyway, i got a 8W 6" fluorescent light tube for the repair man I bump into this repair man when i was conducting my lab session. He is kind enough to loan me for a while. thx man~&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px; white-space: pre;"&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/xsQLBRoKTEo&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/xsQLBRoKTEo&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7888994304344639352?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7888994304344639352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7888994304344639352' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7888994304344639352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7888994304344639352'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/11/warez-fun-with-plasma-ball.html' title='[warez] fun with plasma ball'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-4414521457113321862</id><published>2009-11-18T18:16:00.002+08:00</published><updated>2009-11-18T18:39:18.913+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='warez'/><category scheme='http://www.blogger.com/atom/ns#' term='ohp'/><category scheme='http://www.blogger.com/atom/ns#' term='lcd'/><title type='text'>[warez] poor man's projector</title><content type='html'>&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;div style="background-color: white; counter-reset: __goog_page__ 0; font-family: Verdana; font-size: 10pt; line-height: normal; margin-bottom: 6px; margin-left: 6px; margin-right: 6px; margin-top: 6px; min-height: 1100px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;Google Docs ROX!!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;I was toying with the idea of owning a projector at my pad. So that I can watch movie, play games, do word processing, write code on the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;BIG&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;screen. It's year end nearing the corner and this is the time where all the "crazy" sales begin. But The projector's price still as "crazy". Ranging from s$1k and above for a XVGA ones with acceptable lifetime of the bulb. I should save my year end bonus for paying the education loan i have taken and pay for more important stuffs (buying a LV neverfull is never important! duh...), instead of splurging on warez.&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;div id="v0c1" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_2dkpjj4g9_b" style="height: 188px; width: 250px;" /&gt;&amp;nbsp;&amp;nbsp;I am not going through the details about LCD technology, but here is where you can read more about it.&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Liquid_crystal_display" style="color: #551a8b;"&gt;http://en.wikipedia.org/wiki/Liquid_crystal_display&lt;/a&gt;. I love wikipedia!&lt;br /&gt;&lt;/div&gt;&lt;div id="ff5o" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="p2wj" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;By reading up on how LCD monitors are constructed. I could have remove item2 on the picture and replaced the back light with a light source from the OHP and "tahdah" my projector! There go my frenzy search for spoilt LCD and OHP.&amp;nbsp;&lt;b&gt;DO NOT THROW&lt;/b&gt;&amp;nbsp;away your old warez, breath new life into them. Alternatively, you can donate it to me! hahaha. I would like to thank monir, pauline and chin hee for sourcing the written off items or faulty items such as the LCD, OHP and tools. Items are really old and chuck in a dark corner, until i salvage them. Proceed with care. Observe safety requirements and bleed the voltage stored in the LCD monitor before proceed by disconnecting from the mains and let it sit for some time, I do not have a professional bleeding circuit on hand nor i am making one. Too hazardous....&lt;br /&gt;&lt;/div&gt;&lt;div id="s5p1" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="szps" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;What I have used.&lt;br /&gt;&lt;/div&gt;&lt;div id="mr_e" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;1. 1x Phillips Brilliant 105p 15" LCD monitor (FREE)&lt;br /&gt;&lt;/div&gt;&lt;div id="wawk" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;2. 1x OHP (FREE)&lt;br /&gt;&lt;/div&gt;&lt;div id="osq8" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;3. 2 wednesday afternoon (PRICELESS).&lt;br /&gt;&lt;/div&gt;&lt;div id="f8mx" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="jjvs" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="uik2" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_3gdqkxvgh_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="c9zn" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;This is the LCD monir gets me. After removing the base stand from the LCD (requires some yanking and potential risk to crack the plastic housing), Unscrew the nut that holds the back panel to the LCD. Look out for the latch that hooks the lcd monitor housing in place. Usually, they come in a pair.&lt;br /&gt;&lt;/div&gt;&lt;div id="ma8v" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="b-lq" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="dmw_" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_4cv4cfrf3_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="b.-g" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;carefully lift the front panel cover after unlatching all the sides.&lt;br /&gt;&lt;/div&gt;&lt;div id="bumq" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="iavn" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="cc_8" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_5cpwts6g2_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="u3t0" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Remove the plastic front panel carefully, without damaging the hooks and latches.The black glass material in the picture above is the LCD. Handle with care.&lt;br /&gt;&lt;/div&gt;&lt;div id="eeu8" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ihl5" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="o87n" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_6qpjwmhd4_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;This is the connector for the IO panel which the power button resides. Remove with care. It will be used again in the later part.&lt;br /&gt;&lt;/div&gt;&lt;div id="fm8." style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;The push button and LED to the right is the power button and power led.&lt;br /&gt;&lt;/div&gt;&lt;div id="o05c" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="ujo-" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_7dtzcwntf_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="zd.k" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Carefully lift the black glass material that is hold in the metal frame. Here i used 2 screw driver as the lever to lift it up.&lt;br /&gt;&lt;/div&gt;&lt;div id="p:nn" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ky5b" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="lvlq" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;div id="l.vx" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_8gf6wp7gd_b" style="height: auto; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="nblf" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;This is the reverse view of the panel lifted out. Inside the metal housing which sports the vga out, dvi out and the power socket is the controller board for the LCD. Basically power driver circuit for the back light and graphic display driver circuit for the LCD. The yellow ribbon cable is the ones we disconnected in the previous step.&lt;br /&gt;&lt;/div&gt;&lt;div id="j3o9" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="d:uq" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="sk5z" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_9c2x79chc_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="myj7" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Unscrew the screw that holds the metal housing together. In this picture it circuits mentioned above. On the right is our power driver circuit to the back light. on the left is the graphics driver circuit. Note the orange coloured ribbon cable. Remove with care, because we are using it. I use my smallest flat head screw driver to slowly pry it off.&lt;br /&gt;&lt;/div&gt;&lt;div id="um4." style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="mhuc" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_10dnrzqxgt_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="pzh6" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="faka" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_12dwwx5rcx_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="nuq." style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;clearer picture. I removed the metal plate below, thinking of putting it in my plastic hobby kit box (for insulation). But the cables are simply too short to handle. To save time and hassle, i just use back the plate. More about insulation later.&lt;br /&gt;&lt;/div&gt;&lt;div id="kdqq" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="deag" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="o6r3" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_1173db8qhj_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;This is how the ribbon cable looks like after it is disconnected. Gently peel of the metallic sheet, the black foam separator. They are self adhesive on the LCD.&lt;br /&gt;&lt;/div&gt;&lt;div id="mt2u" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="fsec" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="tbjc" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_13d7nqrxct_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="mb_2" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;To remove the metal frame at the perimeter of the LCD from the panel is a little bit tricky. Because the metal pieces are bent towards the grove. So, just bent it the other direction as in the picture above.&lt;br /&gt;&lt;/div&gt;&lt;div id="i9kj" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="zca4" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="nsww" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_14cvdbv7fd_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vs0b" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;This is how it looks like after the metallic sheet is lifted out. The white colored plastic frame have to be removed from the LCD. The PCB is green in colour. Do not scratch, break or remove any connections from the PCB. These are the data lines to light up each pixel of the LCD.&lt;br /&gt;&lt;/div&gt;&lt;div id="xq0c" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="yb-6" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="x3:d" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_15c8kqz9hk_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;The screw in the above picture is the main hindrance for me to complete this project within the same wednesday afternoon. It is so small, such that all my screw driver bits will not fit. Luckily, pauline ,manage to source one from me. To the right is the connector to the LCD panel from the graphics driver circuit. To the left are the data lines connector. DO NOT REMOVE the plastic cover, those are the ribbon cable.&lt;br /&gt;&lt;/div&gt;&lt;div id="gygx" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="n2rw" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_16dwf8pxg5_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="dmtw" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;DO NOT remove the plastic cover that holds the ribbon cable. Unlatch the black latch to the white groove.&lt;br /&gt;&lt;/div&gt;&lt;div id="ev.e" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ojna" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="v.0h" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_17g49dsddb_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="eehh" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Behold, the LCD panel at all it's glory and the back light at the background.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="v3lh" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="kgar" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_18hm8mvfd6_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="y0jc" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="w1ag" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;we are using the lcd panel in black.&lt;br /&gt;&lt;/div&gt;&lt;div id="mwpx" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="yjp4" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="x2ij" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="fbha" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_19vr7jrpct_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="k471" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;The OHP that chin hee get hold for me. It was dusty and littered with lizard poo. Got to clean it before use.&lt;br /&gt;&lt;/div&gt;&lt;div id="yztl" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="f5zc" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;The next step is to snap the ribbon cable from LCD panel to the graphics driver circuit. Secure it somewhere to the OHP. I used 1 cable tie to secure it and laced some plastic sheet to provide some insulation. Assembly was a breeze. Please do not do it without supervision or safety precautions.&lt;br /&gt;&lt;/div&gt;&lt;div id="ubsr" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="qt-v" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_20f6cscggj_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="vpsr" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_21grj23sfs_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="p05l" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_22hfq2p8ch_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="cf8d" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_23cjncxdgn_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="wd1-" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="ctm1" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_24gf7mzn99_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="ywh_" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="jfc5" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Now, the viola moment. Or i have another paper weight on my desk?&lt;br /&gt;&lt;/div&gt;&lt;div id="q09c" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;div id="hjk9" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_25c84ngkhm_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="yqu3" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_26c43x2z9s_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="qwc4" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_28gb7km7dr_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="sb5p" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;Look ma, there is picture in the well~&lt;br /&gt;&lt;/div&gt;&lt;div id="ng7v" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="peja" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_29g22vptgh_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="c3g." style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;The projection is not as fantastic. It have a yellow tinge on display. I guess the OHP is really aged. Time to change to a xenon lamp!&lt;br /&gt;&lt;/div&gt;&lt;div id="kir3" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="im60" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="i6lv" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;img src="http://docs.google.com/File?id=dc6pdvnc_30hpfdrphf_b" style="height: 486px; width: 648px;" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="z7w4" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;The end&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="b0v1" style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ogOHUAHk7Tzc&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;/p&gt;&lt;p&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/p&gt;&lt;p&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/p&gt;&lt;p&gt;&lt;embed src="http://www.youtube.com/v/gOHUAHk7Tzc&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="pvhm" style="margin-bottom: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-4414521457113321862?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/4414521457113321862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=4414521457113321862' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4414521457113321862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/4414521457113321862'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/11/warez-poor-mans-projector.html' title='[warez] poor man&apos;s projector'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-5028605482580931328</id><published>2009-11-09T13:21:00.002+08:00</published><updated>2009-11-09T13:24:36.098+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='USB'/><category scheme='http://www.blogger.com/atom/ns#' term='plasma'/><title type='text'>[warez] USB plasma ball</title><content type='html'>&lt;span style="font-family: monospace; font-size: 13px; white-space: pre-wrap;"&gt;After 3 weeks of agonizing wait, my usb plasma ball finally arrived~  yeaaayyyyyy!! 1 more coooool display in my office. I am another step closer to make my office into more disco-ish. &lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt;The best part of it, powered by USB, 5V and 110mA. Yet to try to power it with some dry cells. None to be found in my drawers. Arghhzzz&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt;was discussing with yushan this morning, whether i can use his robo complete with the wheel to make a generator to power it. stay tuned&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt;If you wonder what is plasma is all about, please read..&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Plasma_(physics)"&gt;http://en.wikipedia.org/wiki/Plasma_(physics)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 13px; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 12px; line-height: 15px; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;div&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/r2BEf3NCb7A&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/r2BEf3NCb7A&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/xieL8xcBNPo&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/xieL8xcBNPo&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 12px; line-height: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 12px; line-height: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-5028605482580931328?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/5028605482580931328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=5028605482580931328' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5028605482580931328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/5028605482580931328'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/11/warez-usb-plasma-ball.html' title='[warez] USB plasma ball'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-7892448209759781898</id><published>2009-10-28T08:30:00.001+08:00</published><updated>2009-10-28T08:31:28.859+08:00</updated><title type='text'>[DSA] posting of link in comment box</title><content type='html'>pls use HTML code&lt;br /&gt;&lt;br /&gt;The following link is done with&lt;br /&gt;&lt;span style="color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: black; font-family: 'Times New Roman'; font-size: medium; font-weight: normal;"&gt;&lt;a href="http://www.google.com/"&gt;www.google.com&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;b&gt;&amp;lt;a href="&lt;span style="color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;http://URL&lt;/span&gt;" &amp;gt;&amp;nbsp;&lt;span style="color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;the link &amp;lt;&amp;nbsp;&lt;/span&gt;/a &amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #666666; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;b&gt;still figuring out how to post js in the comment box. as for entry, no problem encountered. If you have a solution to it, I did like to hear from you&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-7892448209759781898?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/7892448209759781898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=7892448209759781898' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7892448209759781898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/7892448209759781898'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/10/dsa-posting-of-link-in-comment-box.html' title='[DSA] posting of link in comment box'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-2265082589891368453</id><published>2009-10-08T11:17:00.004+08:00</published><updated>2009-10-08T11:52:40.254+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LED bling'/><title type='text'>[DIY] Blinking LED bling belt buckle</title><content type='html'>&lt;div&gt;Last Last week, attended one of my secondary school classmate's wedding. Btw, late Sept and early Oct I have already received 4x invites to wedding. More are in the pipeline..oh my goodnessssssss...........&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Arghz, wedding reception is soOOooOoo boring. The food is usually not on par (mass produced), the alcohol is crazy (I'm in the brotherhood team, I'm used to blockade drinks targeting the groom.No drink driving please), lots of photo taking (I don't like to be the subject and I insisted to be photoshopped!!!! RAWRRR)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What totally grab my attention was my the first dish served, the cold platter. The lights are dimmed, Techno song was played (yeay!!!)  and at the center of the dish there is this very "beng" blinking LED. It is in the shape of a dome, served in a cup of lightly coloured agar-agar (to give the light a medium to be illuminated). Quickly my I laid my paws on it before my bro daniel get to lay his! haha&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Can' wait, I fished out my phone switch on the flash and tried to open the dome. But it is secured by screws! Well, I usually carry a handy tool set with me. No effort at trying to pry it open.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What drove me thinking was, how possible to pack 1 LED, some sort of controller/pic/MCU and battery cell small enough to fit into a dome shaped container at the size of a 20cents????&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The content of the dome  is just 1 LED and 2 button shaped battery (gives 3v). But, where is the controller???? Upon close inspection of the LED, i saw a tiny weeny black chip in the LED itself. That briefly explains the whole LED blinking sequences. My girl said I am "sua gu" (frog living in a well)...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;well....I am pretty much exited with the "new" toy, open it up and find out that I can easily make 1 myself too without the hassle of wiring up a controller/MCU/pic and the considerations to make it small enough to be portable. The sample dome is in my office.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;"Inspired" by this blinking LED, I was telling my trainees about this bling i going to make.&lt;/div&gt;&lt;div&gt;&lt;div&gt;It is basically a belt buckle, complete with flashing LED. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Went Sim Lim Square (SLS) and Sim Lim Tower (SLT) last week for window shopping. &lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;What?? Window shopping at SLS and SLT??? Not orchard ION, illuma? you gotta be kidding me!&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;Was hopping in and out of the shops in SLT looking for cool kit set and wares i can play with.&lt;/div&gt;&lt;div&gt;Chance upon this Flashing LED that cost 50cents each. They came complete default with flashing sequence, such that, there is no need to have a pic/MCU attached to the LEDs. Small is beautiful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Initially, I only want to use 3v (button sized) to light up the LEDs, so all LEDs are wired in parallel circuit. Because there are too many branches and the current are divided at each branch of the circuit, it is not enough to drive the blinking LEDs. Normal LED are still OK. It Is in the circuit as a referencing point for the "beng-ness", lumens [brightness]. Actually, i only bought 10 of these. "LED not enough lar".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;here I gave you my prototype belt buckle, 3v and 9v powered. Can spot the characters I am flashing?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/m674vUxykKI&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/m674vUxykKI&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/AJLqeFkq_WM&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/AJLqeFkq_WM&amp;amp;color1=0xb1b1b1&amp;amp;color2=0xcfcfcf&amp;amp;feature=player_embedded&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2137743283716015909-2265082589891368453?l=shin-ajaran.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shin-ajaran.blogspot.com/feeds/2265082589891368453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2137743283716015909&amp;postID=2265082589891368453' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/2265082589891368453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2137743283716015909/posts/default/2265082589891368453'/><link rel='alternate' type='text/html' href='http://shin-ajaran.blogspot.com/2009/10/diy-blinking-led-bling-belt-buckle.html' title='[DIY] Blinking LED bling belt buckle'/><author><name>sjteo</name><uri>http://www.blogger.com/profile/09436569281310042987</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://2.bp.blogspot.com/_xcMOgL0aFSs/Su-jSxDxmRI/AAAAAAAAAJg/xuJnZddVtxc/S220/headshot.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2137743283716015909.post-2377655313258966661</id><published>2009-09-17T12:20:00.009+08:00</published><updated>2009-09-17T12:59:59.719+08:00</updated><title type='text'>[wares] upgrading fujitsu e8410 with 500gb hdd on windows 7 x64 64bit OS</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Last Monday, the 2.5" 500GB WD essential passport i owned was dissected, disassembled to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;retrieve&lt;/span&gt; the goodies in there.&lt;/div&gt;&lt;a href="http://shin-ajaran.blogspot.com/2009/09/wares-opening-wd-passport-essential-25.html"&gt;http://shin-ajaran.blogspot.com/2009/09/wares-opening-wd-passport-essential-25.html&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;hdd&lt;/span&gt; itself is going to be transplanted on my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;fujitsu&lt;/span&gt; E8410 (otherwise known as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;FCS&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;lifebook&lt;/span&gt; E8410 on non &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;asia&lt;/span&gt; pacific market). The E8410 is 2 years old, 160GB &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;hdd&lt;/span&gt;, 4GB &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;DDR&lt;/span&gt;2 ram and sports a CPU that support &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;virtualization&lt;/span&gt; technique. It is the perfect candidate to upgrade it to an OS that uses 64bit architecture!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/_xcMOgL0aFSs/SrG81fQuJMI/AAAAAAAAAIE/cqQcOkSJRTw/s400/P1509090000.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5382290656795174082" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;This is the back view of the laptop, bottom up. There are 10 screws to be removed, to get access to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;HDD&lt;/span&gt;. The location of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;HDD&lt;/span&gt; is the medium size box at the lower portion of the image above.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;b&gt;Disclaimer: It is your risk financially, liability (void warranty) to open up / disassemble your &lt;/b&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;b&gt;warrez&lt;/b&gt;&lt;/span&gt;&lt;b&gt;!!&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;1. Remove the battery&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;2. Remove the optical drive&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;3. Unscrew the nuts that fasten on the cover&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;4. Lift up the hood!&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;The whole casing have to be lifted up. Check out the video below~!&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;  &lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;a href="http://www.youtube.com/watch?v=x_RF8FKKn2Q"&gt;http://www.youtube.com/watch?v=x_RF8FKKn2Q&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"   style="  white-space: pre-wrap; font-family:-webkit-monospace;font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;[&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;youtube&lt;/span&gt;]x_RF8&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;FKKn&lt;/span&gt;2Q[/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;youtube&lt;/span&gt;]&lt;br /&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/x_RF8FKKn2Q"&gt;  &lt;embed src="http://www.youtube.com/v/x_RF8FKKn2Q" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A peek under the hood of my E8410&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_xcMOgL0aFSs/SrG-wAq71HI/AAAAAAAAAIM/gLcmB3VPcio/s1600-h/P1509090005.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_xcMOgL0aFSs/SrG-wAq71HI/AAAAAAAAAIM/gLcmB3VPcio/s400/P1509090005.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5382292761707533426" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;HDD&lt;/span&gt; is located at the position of the grey box. It is protected by a metal cover, which need to be removed to get access to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;HDD&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_xcMOgL0aFSs/SrG-wy2SJ4I/AAAAAAAAAIU/NjyS0pBUjJI/s1600-h/P1509090006.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_xcMOgL0aFSs/SrG-wy2SJ4I/AAAAAAAAAIU/NjyS0pBUjJI/s400/P1509090006.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5382292775176906626" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Close up shot on the CPU, a T7300&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://1.bp.blogspot.com/_xcMOgL0aFSs/SrG-xqib8ZI/AAAAAAAAAIc/K1BcidRmupQ/s400/P1509090007.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5382292790126047634" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=""&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=""&gt;&lt;span class="Apple-style-span"  style="color:#0000EE;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;Close up shot on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;HDD&lt;/span&gt;, A &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;fujitsu&lt;/span&gt; 160GB beneath the metal cover.&lt;/span&
