<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>resources</title>
	<atom:link href="http://www.thinklabs.in/resources/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.thinklabs.in/resources</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 22 May 2010 10:08:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Article to Develop AVR programs on Eclipse IDE</title>
		<link>http://www.thinklabs.in/resources/?p=186</link>
		<comments>http://www.thinklabs.in/resources/?p=186#comments</comments>
		<pubDate>Thu, 20 May 2010 13:16:18 +0000</pubDate>
		<dc:creator>Hardik Shah</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=186</guid>
		<description><![CDATA[Article to Develop AVR programs on Eclipse IDE
Steps to install Eclipse IDE:
1.Download Eclipse from for C/C++ developers as shown below:

2.Now Extract the package:
Right click the package and open with Archive Manager and extract it to home directory as shown below:

3.Open the eclipse executable to the folder that you have extracted ~/eclipse/ as shown below:

If it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Article to Develop AVR programs on Eclipse IDE</strong></p>
<p><strong>Steps to install Eclipse IDE:</strong></p>
<p>1.Download Eclipse from for C/C++ developers as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/1.png"><img class="alignnone size-full wp-image-189" title="1" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/1.png" alt="" width="574" height="362" /></a></p>
<p>2.Now Extract the package:<br />
Right click the package and open with Archive Manager and extract it to home directory as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/2.png"><img class="alignnone size-full wp-image-193" title="2" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/2.png" alt="" width="565" height="352" /></a></p>
<p>3.Open the eclipse executable to the folder that you have extracted ~/eclipse/ as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/3.png"><img class="alignnone size-full wp-image-194" title="3" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/3.png" alt="" width="566" height="353" /></a><br />
If it displays the error than there is no JRE in your system, you will need to install it. Follow the steps given to install JRE or else skip the step.<br />
4.Run the following command on the prompt to install JRE as shown below:<br />
1.Open Applications &gt; Accessories &gt; Terminal<br />
2.Execute the command given below:<br />
thinklabs@thinklabs:~$ sudo aptitude install default-jre</p>
<p>This will take some time to install.</p>
<p>Now start eclipse again an Eclipse IDE will start as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/4.png"><img class="alignnone size-full wp-image-195" title="4" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/4.png" alt="" width="570" height="355" /></a></p>
<p><strong>Steps to install AVR Eclipse plugin:</strong></p>
<p>Now close the Eclipse IDE and download the AVR Eclipse plugin from the link given below:</p>
<p>http://avr-eclipse.sourceforge.net/</p>
<p>Now go to download section and select direct download as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/5.png"><img class="alignnone size-full wp-image-196" title="5" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/5.png" alt="" width="566" height="452" /></a></p>
<p>Once you have selected Direct download it will go to the sourceforge where plugin can be downloaded as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/6.png"><img class="alignnone size-full wp-image-197" title="6" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/6.png" alt="" width="585" height="334" /></a></p>
<p>Be careful while extracting the zip files to the ~/eclispe folder.</p>
<p>1.Open with the Archive manager and drag features folder and plugins to the eclipse folder individually as given below:</p>
<p>1.1.Inside the Archive Manager you will see “.” folder, double click it and go to the features folder and select the folders as shown below and drag it to eclispe/features folder:<a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/7.png"><img class="alignnone size-full wp-image-198" title="7" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/7.png" alt="" width="594" height="380" /></a></p>
<p>1.2.Similarly inside the Archive Manager, go for the plugins folder and select the folders/files as displayed  below and drag it to eclispe/plugins folder:<a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/8.png"><img class="alignnone size-full wp-image-199" title="8" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/8.png" alt="" width="596" height="381" /></a></p>
<p><strong>Steps to write down AVR programs on Eclipse IDE.</strong></p>
<p>1.Open the eclipse executable as a root user, issue the command on the prompt as shown below:<br />
1.Open Applications &gt; Accessories &gt; Terminal<br />
2.Execute the command given below:<br />
thinklabs@thinklabs:~$ sudo ~/eclipse/eclipse</p>
<p>3.It will popup the page as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/9.png"><img class="alignnone size-full wp-image-200" title="9" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/9.png" alt="" width="553" height="345" /></a></p>
<p>2.Create a new project go to file menu &gt; New &gt; C Project</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/10.png"><img class="alignnone size-full wp-image-202" title="10" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/10.png" alt="" width="553" height="345" /></a></p>
<p>NOTE: If it doesnot display this &#8220;AVR GCC Toolchain plugins&#8221; than there AVR Eclipse plugin is missing, try to install it as given in the above section steps to install AVR Eclipse plugin.</p>
<p>3.Write a new project name and click on next<br />
4.It will ask for selection of CPU name and its frequency and click on finish.</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/111.png"><img class="alignnone size-full wp-image-203" title="11" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/111.png" alt="" width="559" height="529" /></a></p>
<p>4.Goto file menu &gt; new &gt; c source file and save it<br />
5.write down the code given below</p>
<p>6.select the active build configuration as Release<br />
Project menu &gt; Build configurations &gt; set active &gt; 2 Release</p>
<p>7.Now goto the project menu &gt; Build All<br />
You can see that inside release folder executable binary is generated as shown below:</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/12.png"><img class="alignnone size-full wp-image-204" title="12" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/12.png" alt="" width="567" height="324" /></a></p>
<p><strong>Steps to burn your program on uNiBoard v 1.1</strong></p>
<p>Now if you want  to load the executable on uNiBoard v 1.1, you will need to setup the avrdude programmer.<br />
1.Goto the properties window of the project by right click on project and properties.</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/13.png"><img class="alignnone size-full wp-image-205" title="13" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/13.png" alt="" width="580" height="363" /></a></p>
<p>2.Select AVR&gt;Avrdude tab it will display window as shown below:</p>
<p>3.Click on Edit and follow the steps given below:<br />
1.Configuration name as uNiBoard<br />
2.In programmer Harware select USBasp.<br />
3.In override default port -P   USB.<br />
4.Click on OK button to save the configuration.</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/14.png"><img class="alignnone size-full wp-image-206" title="14" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/14.png" alt="" width="581" height="415" /></a></p>
<p>4.Select programmer configuration as uNiBoard and click on Apply  button and OK button.</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/15.png"><img class="alignnone size-full wp-image-207" title="15" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/15.png" alt="" width="580" height="363" /></a></p>
<p>5.Now you can burn the program by selecting AVR menu &gt; Upload project to Target Device.</p>
<p><a href="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/16.png"><img class="alignnone size-full wp-image-212" title="16" src="http://www.thinklabs.in/resources/wp-content/uploads/2010/05/16.png" alt="" width="577" height="330" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=186</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TRI ISP (Beta)</title>
		<link>http://www.thinklabs.in/resources/?p=118</link>
		<comments>http://www.thinklabs.in/resources/?p=118#comments</comments>
		<pubDate>Sat, 26 Dec 2009 08:02:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Robotics Software]]></category>
		<category><![CDATA[iBOT, iTRIx and the 8051]]></category>
		<category><![CDATA[abc]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=118</guid>
		<description><![CDATA[The 4 step guide to program your P89v51RD2 controller using TRI ISP
Step 1: Port Settings
Port Number: Select the serial communication port of your PC to which the target device is connected. Most present day IBM compatible PCs have a single serial communication port with an address of COM1.

Speed: Select the burning speed. (Preferably 9600)

Step 2: [...]]]></description>
			<content:encoded><![CDATA[<p><strong><u>The 4 step guide to program your P89v51RD2 controller using <b style="color: black; background-color: rgb(160, 255, 255);">TRI</b> <b style="color: black; background-color: rgb(153, 255, 153);">ISP</b></u></strong></p>
<p><strong><u></u></strong><strong>Step 1: Port Settings</strong></p>
<p><u>Port Number</u>: Select the serial communication port of your PC to which the target device is connected. Most present day IBM compatible PCs have a single serial communication port with an address of COM1.</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled1.JPG" title="untitled1.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled1.JPG" alt="untitled1.JPG"></a></p>
<p><span id="more-88"></span><u>Speed:</u> Select the burning speed. (Preferably 9600)</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled.JPG" title="untitled.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled.JPG" alt="untitled.JPG"></a></p>
<p><strong>Step 2: Device Settings</strong></p>
<p><strong>            </strong>Select the target device. (The <b style="color: black; background-color: rgb(160, 255, 255);">TRI</b> <b style="color: black; background-color: rgb(153, 255, 153);">ISP</b> – <b style="color: black; background-color: rgb(255, 153, 153);">Beta</b> version supports only P89v51RD2.)</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled2.JPG" title="untitled2.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled2.JPG" alt="untitled2.JPG"></a></p>
<p><strong>Step 3: Load Hex File</strong></p>
<p><strong>            </strong>The Hex File can be loaded either by clicking the ‘Browse’ button and selecting the Hex File or directly typing its path.</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled3.JPG" title="untitled3.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled3.JPG" alt="untitled3.JPG"></a></p>
<p align="left">                                            Or</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled4.JPG" title="untitled4.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled4.JPG" alt="untitled4.JPG"></a></p>
<p><strong>Step 3: Burn</strong></p>
<p><strong>            </strong>Once the Hex File is loaded, click the ‘Burn’ button and reset your target device. The burn status will be displayed on the progress bar and once the progress bar indicates that the process is completed, reset the target device.</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled5.JPG" title="untitled5.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2007/10/untitled5.JPG" alt="untitled5.JPG"></a></p>
<p><strong>To Download <b style="color: black; background-color: rgb(160, 255, 255);">TRI</b> <b style="color: black; background-color: rgb(153, 255, 153);">ISP</b> Click Here : <a title="TRI ISP DOWNLOAD" href="http://www.triindia.co.in/download/TRI%20ISP.MSI">http://www.triindia.co.in/download/<b style="color: black; background-color: rgb(160, 255, 255);">TRI</b> <b style="color: black; background-color: rgb(153, 255, 153);">ISP</b>.MSI </a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Conductivity sensor to detect metals</title>
		<link>http://www.thinklabs.in/resources/?p=113</link>
		<comments>http://www.thinklabs.in/resources/?p=113#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:58:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[TRICKS Fundaes]]></category>
		<category><![CDATA[robo.in]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=113</guid>
		<description><![CDATA[  

Conductivity Test
In order to detect the presence of conductors,the simplest test is the Conductivity Test. Conductivity of a substance is defined as ‘the ability or power to conduct or transmit heat, electricity or sound’. Here what we use is the ability to transmit electricity. When an electrical potential difference is placed across a [...]]]></description>
			<content:encoded><![CDATA[<p align="right"> <script src="http://cdn.socialtwist.com/2009040614570/script.js" type="text/javascript"> </script><a href="http://tellafriend.socialtwist.com:80" onclick="return false;" class="st-taf" style="border: 0pt none ; margin: 0pt; padding: 0pt;"><br />
<img src="http://images.socialtwist.com/2009040614570/button.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '2009040614570', window.location, document.title)" onclick="cw(this, {id:'2009040614570', link: window.location, title: document.title });" alt="SocialTwist Tell-a-Friend" style="border: 0pt none ; margin: 0pt; padding: 0pt;"></a></p>
<p><strong>Conductivity Test</strong></p>
<p><!--[if gte vml 1]&amp;gt;                                                  --><!--[if !vml]--><!--[endif]-->In order to detect the presence of conductors,the simplest test is the <strong>Conductivity Test</strong>. Conductivity of a substance is defined as ‘<em>the ability or power to conduct or transmit heat, electricity or sound</em>’. Here what we use is the ability to transmit electricity. When an electrical potential difference is placed across a conductor, its movable charges  flow, giving rise to electric current. We would be using this property of conductors to complete the circuit connections as shown below. The material being a conductor completes the circuit and the LED glows.If the material is an insulator, the circuit will not be completed and the LED would remain off thereby indicating presence of an insulator.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=113</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bull in the Ring</title>
		<link>http://www.thinklabs.in/resources/?p=112</link>
		<comments>http://www.thinklabs.in/resources/?p=112#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:57:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[TRICKS Fundaes]]></category>
		<category><![CDATA[robo.in]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=112</guid>
		<description><![CDATA[Work D
Work Done By- Pranav Ramkrishnan, Std.12th
Objective:
This is an extremely simplistic, yet interesting application using the i-Mach kit to make something that can do real and useful work. The basic aim of this task is to build and program an autonomous robot that can detect objects within its surrounding environment and having detected the object, [...]]]></description>
			<content:encoded><![CDATA[<p>Work D</p>
<p>Work Done By- <strong>Pranav Ramkrishnan, Std.12th</strong></p>
<p><strong>Objective</strong>:</p>
<p>This is an extremely simplistic, yet interesting application using the i-Mach kit to make something that can do real and useful work. The basic aim of this task is to build and program an autonomous robot that can detect objects within its surrounding environment and having detected the object, the robot must push the object out of the arena.<span id="more-230"></span> However the robot must at all times remain within the arena, just as a bull must remain within the bull fighting arena. Imagine if the bull left the ring, it would result in chaos!</p>
<p>This problem statement adapted in this task is one that has been used in several international robotic competitions and events at high school and college levels , however it has never been attempted with the i-Mach kit, hence giving us opportunity to explore the boundaries of this kit.</p>
<p>To make a robotic application, we shall be using metal cans, as objects and design an arena which is black and has a white boundary around it.</p>
<p><strong>Description of the Robot:</strong></p>
<p>The structure of this robot was made using the mechano parts provided in the i-Mach kit. It was important to design a framework which is both sturdy and compact. Before going into the explanation of the physical structure, here is a list of sensors used to make this particular version of the “Bull”:</p>
<p><!--[if !supportLists]-->·        <!--[endif]-->3 Obstacle Sensor – used to detect the metal can (object), the arrangement of these sensors has been discussed below.</p>
<p><!--[if !supportLists]-->·        <!--[endif]-->2 Line sensors – used to sense the edge of the arena (white) so that the robot does not go out of the arena.</p>
<p>Here is a picture of “Bull” and the design as been explained below:</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/7.JPG" title="7.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/7.JPG" alt="7.JPG" width="488" height="326"></a></p>
<p><em>Figure 1. “The Bull”</em></p>
<p><strong><em>Explanation: </em></strong></p>
<p>Obstacle Sensors:</p>
<p>Sensor2, Sensor3 and Sensor4 are all obstacle sensors, that are used to detect the presence of the object, in close proximity to the robot. In order to make sure that the robot is able to read an object from all angles, the sensors are placed, one facing forward – so that if an object(metal can) is in front, the robot will charge towards it and then push it out. Two more obstacle sensors were placed on the two sides of the robot (left and right) so that if the robot as no object in front of it, but one on either sides, it must be able to detect it, turn to the respective side and then charge forwards to push the can out of the arena.</p>
<p>Line Sensors:</p>
<p>Sensor6 and Sensor6 are line sensors.The placement of line sensors is fairly obvious. The sole purpose of the line sensors is to give a feedback (HIGH) when the sensor is over a white surface and a LOW feedback when the sensor is over a black surface. It is interesting to consider why only two line sensors were placed, one front and back and why no more line sensors were place on either sides of the robot. Well, the answer to this is that the robot will be only pushing the metal can from the front. So Sensor6 is the main line sensor that will be detecting the edge. Sensor5 is an extra sensor, which is used so that in case the robot reversing and moves towards the line, it detects the line so that the robot can move forward. So since the robot will not be moving sideways, there is no need to place anymore line sensors on the side, like we placed obstacle sensors on the side as well.</p>
<p><!--[if gte vml 1]&amp;gt;                                                  --><!--[if !vml]--><!--[endif]-->Now coming to the <strong><em>Physical design</em>:</strong></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/51.JPG" title="51.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/51.JPG" alt="51.JPG" width="424" height="407"></a></p>
<p><em>Figure 2: </em></p>
<p>In order to build a stable robot, one must keep the robot as low as possible, also since this has a specific function to push an object, the robot must have a grabbing mechanism. Shown in <em>Figure 2</em>, this particular robot can only hold a specific size of obstacle, although is the object is bigger then the robot could still push it forward (of course, provided the motors used can support the load!).  While building this grabbing mechanism, one must also remember to protect the sensors from impact with the object. One can make the grabbing mechanism longer and wider, but if that is done, the robot is going to start leaning forward, and may not be as stable as before (centre of gravity will shift forward). Further, the robot will become a lot slower, and generally speaking bulls are fast animals!!</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/42.JPG" title="42.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/06/42.JPG" alt="42.JPG" width="455" height="274"></a></p>
<p><em>Figure 3: “The Bull” at work</em></p>
<p><strong> </strong></p>
<p><strong>Algorithm:</strong></p>
<p>The algorithm logic used to program this robot is fairly easy to comprehend.</p>
<p>Points to keep in mind while reading this algorithm:</p>
<p><!--[if !supportLists]-->Ø <!--[endif]-->  Line sensor is ON over a white surface and OFF over a black surface</p>
<p><!--[if !supportLists]-->Ø <!--[endif]-->  Obstacle sensor is OFF when an object is in front of it and ON when there is no object in front of it.</p>
<p>So the algorithm logic is as follows:</p>
<p><!--[if !supportLists]-->1.     <!--[endif]-->Move forward.</p>
<p><!--[if !supportLists]-->2.     <!--[endif]-->If Sensor6 is ON, then go back, turn around and move forward (this is detecting a white line and then moving away from it)</p>
<p><!--[if !supportLists]-->3.     <!--[endif]-->While moving forward check if Sensor2 is OFF, if Sensor2 is OFF continue going forward, until line.</p>
<p><!--[if !supportLists]-->4.     <!--[endif]-->While moving forward check if Sensor3 is OFF, if Sensor3 is OFF, then stop and keep turning to the right until Sensor2 is OFF (this means the object is now in front of the robot). Then move forward with the metal can to the edge.</p>
<p><!--[if !supportLists]-->5.     <!--[endif]-->While moving forward check if Sensor4 is OFF, if Sensor4 is OFF, then stop and keep turning to the left until Sensor2 is OFF, then move forward.</p>
<p><!--[if !supportLists]-->6.     <!--[endif]-->If Sensor5 is ON, then move forward (white edge is behind the robot and it has to move forward).</p>
<p><strong>PROGRAM:</strong></p>
<p>BEGIN</p>
<p>{</p>
<p>FOREVER</p>
<p>{</p>
<p>IF(SENSOR6 IS ON) // Forward Line Sensor detecting a white edge.</p>
<p>{</p>
<p>RIGHTMOTOR(FORWARD,100); // Inspite of detecting the white edge the robot</p>
<p>continues forward for 250 milliseconds to ensure</p>
<p>LEFTMOTOR(FORWARD,100); // that the object has been completely pushed</p>
<p>out of the arena.</p>
<p>WAIT(250);</p>
<p>RIGHTMOTOR(0,0); // Stops for 500 milliseconds</p>
<p>LEFTMOTOR(0,0);</p>
<p>WAIT(500);</p>
<p>RIGHTMOTOR(BACKWARD,100); // then comes backward for 1 sec, to avoid</p>
<p>the line</p>
<p>LEFTMOTOR(BACKWARD,100);</p>
<p>WAIT(1000);</p>
<p>RIGHTMOTOR(FORWARD,100);  // takes a differential right turn (turning on the</p>
<p>spot) for 1.5 seconds,</p>
<p>LEFTMOTOR(BACKWARD,100); // this is approximately 180 degree on full</p>
<p>batteries.</p>
<p>WAIT(1500);</p>
<p>}</p>
<p>IF(SENSOR6 IS OFF) // Case when the robot is in the arena, that is on a black</p>
<p>surface, the robot moves forward.</p>
<p>{</p>
<p>RIGHTMOTOR(FORWARD,100);</p>
<p>LEFTMOTOR(FORWARD,100);</p>
<p>IF(SENSOR2 IS OFF) // Conditions while moving forward</p>
<p>{</p>
<p>RIGHTMOTOR(FORWARD,100);     // Case 1 &#8211; Object in front of the robot, the</p>
<p>robot continues forward, until the white</p>
<p>edge.</p>
<p>LEFTMOTOR(FORWARD,100);</p>
<p>}</p>
<p>IF(SENSOR4 IS OFF)</p>
<p>{                                           // Case 2 &#8211; Object on the left side.</p>
<p>RIGHTMOTOR(0,0);</p>
<p>LEFTMOTOR(0,0);</p>
<p>WAIT(500);</p>
<p>WHILE(SENSOR2 IS ON)</p>
<p>{</p>
<p>RIGHTMOTOR(FORWARD,100); // Turning differentially to the left while</p>
<p>Senso2 reads the object</p>
<p>LEFTMOTOR(BACKWARD,100);</p>
<p>}</p>
<p>RIGHTMOTOR(FORWARD,100); // Pushing the object out after turning.</p>
<p>LEFTMOTOR(FORWARD,100);</p>
<p>}</p>
<p>IF(SENSOR3 IS OFF)</p>
<p>{</p>
<p>RIGHTMOTOR(0,0);            // Case 3 &#8211; Object on right side</p>
<p>LEFTMOTOR(0,0);</p>
<p>WAIT(500);</p>
<p>WHILE(SENSOR2 IS ON)</p>
<p>{</p>
<p>LEFTMOTOR(FORWARD,100); // Once again turning differentially until</p>
<p>Sensor2  reads the object</p>
<p>RIGHTMOTOR(BACKWARD,100);</p>
<p>}</p>
<p>RIGHTMOTOR(FORWARD,100); // Pushing the object out of the arena.</p>
<p>LEFTMOTOR(FORWARD,100);</p>
<p>}</p>
<p>}</p>
<p>IF(SENSOR5 IS ON)  // Behind line sensor detects the white edge. The robot</p>
<p>moves forward to avoid edge. No pushing from the back.</p>
<p>{</p>
<p>RIGHTMOTOR(FORWARD,100);</p>
<p>LEFTMOTOR(FORWARD,100);</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>END</p>
<p>Here is the Video link to have a glimpse of what the bull in the ring is exactly upto:</p>
<p><a href="http://www.youtube.com/watch?v=wQVAB_a8Mtg">http://www.youtube.com/watch?v=SSl5xa6xDNM<br />
</a></p>
<p><strong>Further Development (Food for Thought):</strong></p>
<p>Although this robot is successful in accomplishing its task, that is to push away the metal cans from the arena without leaving the arena, there are possibilities for development and enhancement:</p>
<p>Physical/ Structural:</p>
<p><!--[if !supportLists]-->1.     <!--[endif]-->One can think about making a lifting mechanism instead of a gripping mechanism, something like a crane or a forklift.</p>
<p><!--[if !supportLists]-->2.     <!--[endif]-->The Robot can be used as a arena cleaner if can be made faster and stronger, so that it can even clean bigger areas.</p>
<p><!--[if !supportLists]-->3.     <!--[endif]-->Design an arm such that the robot can lift objects of different dimensions.</p>
<p>Abilities:</p>
<p><!--[if !supportLists]-->1.     <!--[endif]-->One could program the robot to pick up an object, come to a particular spot and drop it.</p>
<p><!--[if !supportLists]-->2.     <!--[endif]-->Instead of picking up every single object from the arena, the robot can be programmed in such a way that it only selects a particular type of object.</p>
<p><!--[if !supportLists]-->3.     <!--[endif]-->This can be further expanded into thinking about sorting out random objects in an enclosed arena into sorted groups.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=112</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Education means…</title>
		<link>http://www.thinklabs.in/resources/?p=111</link>
		<comments>http://www.thinklabs.in/resources/?p=111#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:55:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=111</guid>
		<description><![CDATA[  
More over robotics and embedded systems, an aspect that obviously concerns all of us as citizens of a developing nation is the purpose of education. Do we as knowledge donors or seekers comprehend what education has to offer? More than an article, this is meant to be an open discussion to reaffirm the [...]]]></description>
			<content:encoded><![CDATA[<p align="right"> <script src="http://cdn.socialtwist.com/2009040614570/script.js" type="text/javascript"> </script><a href="http://tellafriend.socialtwist.com:80" onclick="return false;" class="st-taf" style="border: 0pt none ; margin: 0pt; padding: 0pt;"><img src="http://images.socialtwist.com/2009040614570/button.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '2009040614570', window.location, document.title)" onclick="cw(this, {id:'2009040614570', link: window.location, title: document.title });" alt="SocialTwist Tell-a-Friend" style="border: 0pt none ; margin: 0pt; padding: 0pt;"></a></p>
<p><font size="2">More over robotics and embedded systems, an aspect that obviously concerns all of us as citizens of a developing nation is the purpose of education. Do we as knowledge donors or seekers comprehend what education has to offer? More than an article, this is meant to be an open discussion to reaffirm the fact that we understand simple but long forgotten goals of the education system and in the process also discover a few which need to be addressed given the current situation. The views presented in this article are not personal and have been influenced by varied personalities and scenarios.</font><span id="more-353"></span></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Being unbiased: </strong></font><font size="2">Mr. Yashwant Kanetkar, the author of many popular C programming books, was once asked in a seminar, “What made your programing skills so strong?” to which he replied, “My mechanical engineering background”. Yes, unlike what you might presume, intellects are not a result of their academic background, but a consequence of pursuit of what they felt might be appropriate for them. Mr. Kanetkar further justified his words by saying that, him being from a mechanical background gave him an edge over all his fellow colleagues (from an IT background) who would fear asking certain questions which they felt would make the audience doubt their past learnings. It is truly the presence of such an educational system which allows choice and provides exposure to experiences that helps the students realize a life-long career path for themselves.</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Being enterprising: </strong></font><font size="2">Being enterprising is more about being responsible, questioning the obvious, challenging long-established practices, existent processes and tools rather than floating a business. I have heard many students saying, “After I graduate, I would like to pursue research….”, whereas the truth is that once you are an employee you cannot afford to research amidst busy work schedules and prolonged delivery deadlines. Your formative years of education are also the most conducive years for innovation which can be exemplified from the fact that the Linux operating system or the Google search engine were all academic projects once upon a time.</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Being the change: </strong></font><font size="2">The country at this point needs technocrats but we seem to encounter bureaucrats more often. Bureaucracy is a complex beast to deal with, since most of the times it is introduced in the process of being systematic, consciously or unconsciously. It is these challenging issues that education teaches us to counter by inculcating values like patience and analysis. Enabling you to view things in a broader perspective is also something that education strives to achieve. As a matter of fact, understanding the way an OS kernel manages hardware resources may help you manage resources in your company though it doesn’t sound that obvious. At the same time applying management practices like six sigma to your software project can help make your software defect free.</font></p>
<p style="margin-bottom: 0in;"><font size="2">Linus Torvalds (needless to say, author of Linux OS), in his book “Just for fun” has put forth a three point philosophy for the purpose of life (which I feel applies cut-copy-paste to education as well), which constitutes,</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Survival: </strong></font><font size="2">Education, directly (formal education) or indirectly (by means of exposure and experience) empowers us to survive in this world with cut-throat competition. All other goals can be addressed only after this primary goal is met, since without survival everything else would be null and void. In a way, it would be correct to say that education means enabling yourselves to live in a world that works on the Darwin’s theory of “Survival of the fittest”.</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Social order: </strong></font><font size="2">Very few of us would deny the fact that the best of friends that we have made during our lifetime are within our academic years, who also become an integral part of our social circle. We seldom realize that things that bind us together are too trivial. At times, these might also be negative things like hatred towards a common subject. Whether it be these negative things or positive things (like the GNU project, which happens to be the largest collaborative project ever), the social bonds that result have to be attributed to education.</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>Entertainment: </strong></font><font size="2">This one might raise many an eye-brows but education does bring in entertainment and vice-versa. As an organization with the philosophy, “excite-entertain-educate” we have observed that it is very much possible for education and entertainment to go hand in hand (a trend which can be marked in our workshops); its just that at times education becomes the cause while entertainment becomes the effect and vice versa.</font></p>
<p style="margin-bottom: 0in;"><font size="2">At this point you might wonder what we are trying to arrive at, but the fact is that the purpose was never to conclude; it was to make you “think”.&nbsp; So, if you have&nbsp; started thinking already, we would love to hear your viewpoint.</font></p>
<p style="margin-bottom: 0in;"><font size="2"><strong>References:<a href="http://ideaforge.blogspot.com" title="link" target="_blank"> </a></strong></font><a href="http://ideaforge.blogspot.com" title="link" target="_blank"><font size="2">http://ideaforge.blogspot.com/</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=111</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pune (COEP) iTRIx Workshop Photogallery</title>
		<link>http://www.thinklabs.in/resources/?p=110</link>
		<comments>http://www.thinklabs.in/resources/?p=110#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:53:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Photogallery]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=110</guid>
		<description><![CDATA[

























































]]></description>
			<content:encoded><![CDATA[</p>
<table align="center" border="0" cellspacing="10">
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3111_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3111_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3059_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3059_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3061_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3061_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3066_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3066_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3067_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3067_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3068_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3068_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3069_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3069_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3070_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3070_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3072_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3072_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3073_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3073_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3079_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3079_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3080_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3080_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3081_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3081_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3082_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3082_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3083_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3083_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3091_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3091_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3092_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3092_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3096_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3096_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3097_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3097_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3098_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3098_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3099_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3099_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3100_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3100_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3101_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3101_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3102_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3102_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3104_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3104_JPG.jpg" width="100" height="75" border="0"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3105_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3105_JPG.jpg" width="100" height="75" border="0"></a></td>
<td align="center"><a href="/resources_images/Galleries/Pune/images/DSCN3110_JPG.jpg"><img src="/resources_images/Galleries/Pune/thumbnails/DSCN3110_JPG.jpg" width="100" height="75" border="0"></a></td>
</tr>
</table>
<p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=110</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagpur (YCCE) iTRIx Workshop Photogallery</title>
		<link>http://www.thinklabs.in/resources/?p=109</link>
		<comments>http://www.thinklabs.in/resources/?p=109#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:51:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Photogallery]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=109</guid>
		<description><![CDATA[








































]]></description>
			<content:encoded><![CDATA[</p>
<table align="center" border="0" cellspacing="10">
<tbody>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3135_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3135_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3164_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3164_JPG.jpg" width="75" border="0" height="100"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3165_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3165_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3167_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3167_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3168_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3168_JPG.jpg" width="100" border="0" height="75"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3170_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3170_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3171_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3171_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3172_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3172_JPG.jpg" width="100" border="0" height="75"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3173_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3173_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3174_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3174_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3175_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3175_JPG.jpg" width="100" border="0" height="75"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3176_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3176_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3177_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3177_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3178_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3178_JPG.jpg" width="100" border="0" height="75"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3184_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3184_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
<tr valign="bottom">
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3188_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3188_JPG.jpg" width="100" border="0" height="75"></a>
</td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3197_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3197_JPG.jpg" width="100" border="0" height="75"></a></td>
<td align="center"><a href="/resources_images/Galleries/Nagpur/images/DSCN3198_JPG.jpg"><img src="/resources_images/Galleries/Nagpur/thumbnails/DSCN3198_JPG.jpg" width="100" border="0" height="75"></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=109</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Modified Flood Fill Simulator</title>
		<link>http://www.thinklabs.in/resources/?p=101</link>
		<comments>http://www.thinklabs.in/resources/?p=101#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:47:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Circuits Pool & Hardware]]></category>
		<category><![CDATA[Roboliga '10]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=101</guid>
		<description><![CDATA[  
 	
Abstract =&#62;
This article will first discuss the Flood Fill algorithm, modified flood fill’s d

 	
Abstract =&#62;
This article will first discuss the Flood Fill algorithm, modified flood fill’s description and implementation will be built on that. After the boring theory session, the actual C implementation of the algorithm will be discussed and a [...]]]></description>
			<content:encoded><![CDATA[<p align="right"> <script src="http://cdn.socialtwist.com/2009040614570/script.js" type="text/javascript"> </script><a href="http://tellafriend.socialtwist.com:80" onclick="return false;" class="st-taf" style="border: 0pt none ; margin: 0pt; padding: 0pt;"><img src="http://images.socialtwist.com/2009040614570/button.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '2009040614570', window.location, document.title)" onclick="cw(this, {id:'2009040614570', link: window.location, title: document.title });" alt="SocialTwist Tell-a-Friend" style="border: 0pt none ; margin: 0pt; padding: 0pt;"></a></p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		H3 { margin-bottom: 0.04in } 		H3.western { font-family: "Arial", sans-serif; font-size: 13pt } 		H3.cjk { font-family: "Arial Unicode MS"; font-size: 13pt } 		H3.ctl { font-family: "Arial", sans-serif; font-size: 13pt } 		P { margin-bottom: 0.08in } 		A:link { color: #0000ff } 	--></p>
<h3>Abstract <font face="Wingdings">=&gt;</font></h3>
<p>This article will first discuss the Flood Fill algorithm, modified flood fill’s d</p>
<p><img src="http://images.socialtwist.com/2009040614570/button.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '2009040614570', window.location, document.title)" onclick="cw(this, {id:'2009040614570', link: window.location, title: document.title });" alt="SocialTwist Tell-a-Friend" style="border: 0pt none ; margin: 0pt; padding: 0pt;"></a></p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		H3 { margin-bottom: 0.04in } 		H3.western { font-family: "Arial", sans-serif; font-size: 13pt } 		H3.cjk { font-family: "Arial Unicode MS"; font-size: 13pt } 		H3.ctl { font-family: "Arial", sans-serif; font-size: 13pt } 		P { margin-bottom: 0.08in } 		A:link { color: #0000ff } 	--></p>
<h3>Abstract <font face="Wingdings">=&gt;</font></h3>
<p>This article will first discuss the Flood Fill algorithm, modified flood fill’s description and implementation will be built on that. After the boring theory session, the actual C implementation of the algorithm will be discussed and a sample simulator program is provided at the end of this article.</p>
<p>It should be noted that the algorithm and some of the pictures used in this article have been taken from ‘micromouseinfo’ website,</p>
<p><font color="#0000ff"><u><a href="http://www.micromouseinfo.com/introduction/floodfill.html">http://www.micromouseinfo.com/introduction/floodfill.html</a></u></font></p>
<p><font color="#0000ff"><u><a href="http://www.micromouseinfo.com/introduction/mfloodfill.html">http://www.micromouseinfo.com/introduction/mfloodfill.html</a></u></font></p>
<p><span id="more-256"></span></p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		H3 { margin-bottom: 0.04in } 		H3.western { font-family: "Arial", sans-serif; font-size: 13pt } 		H3.cjk { font-family: "Arial Unicode MS"; font-size: 13pt } 		H3.ctl { font-family: "Arial", sans-serif; font-size: 13pt } 		P { margin-bottom: 0.08in } 	--></p>
<h3>Prerequisites <font face="Wingdings">=&gt;</font></h3>
<p>This article requires the reader to have some basic knowledge and understanding about the following topics</p>
<ol>
<li>Basic logical constructs of C like 	if-then-else, while, for etc.</li>
<li>Understanding of bitwise operators 	in C.</li>
<li>Implementation of Stack using 	arrays.</li>
<li>Simple 1D array manipulations.</li>
<li>Writing subroutines in C and 	macros.</li>
</ol>
<p>It is advised that before putting up any question on the forum regarding doubts about the software implementation of the Modified Flood fill algorithm, the reader goes through some C-language tutorial like the one given here,</p>
<p><font color="#0000ff"><u><a href="http://www.lysator.liu.se/c/bwk-tutor.html">http://www.lysator.liu.se/c/bwk-tutor.html</a></u></font></p>
<h3>The Flood Fill Algorithm <font face="Wingdings">=&gt;</font></h3>
<p>The best way to understand the flood fill algorithm is the water-in-the-maze analogy. This is how it goes,</p>
<p>Suppose you start pouring water in the center square of the maze (I would love to know who actually tried it first). The water will ‘flood’ the center of the maze and then will start flowing in all the adjacent squares which are ‘not separated by a wall’. If I mark the first square, that is the center, as 0 and mark the next square(s) where the water goes as 1 and keep on increasing the number as the water ‘floods’ the maze, I’ll get something like this</p>
<p><a href="http://www.thinklabs.in/resources/?attachment_id=258" rel="attachment wp-att-258" title="Starting for the center square"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/pic1.JPG" alt="Starting from the center square"></a></p>
<p>The water is now flooding the maze, and I am numbering the squares in ascending order. That is, water reached the square numbered 4 before reaching the square numbered 5 or 6 or 7.</p>
<p><a href="http://www.thinklabs.in/resources/?attachment_id=259" rel="attachment wp-att-259" title="Floods in the Maze!!!"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/pic2.JPG" alt="Floods in the Maze!!!"></a></p>
<p><a href="http://www.thinklabs.in/resources/?attachment_id=260" rel="attachment wp-att-260" title="Completely flooded!"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/pic3.JPG" alt="Completely flooded!"></a></p>
<p>Done flooding, with water! (You got a dryer or something?)</p>
<p>Now taking the bottom left square as the starting point, if I follow the numbers in descending order, you can see that I will reach the center through the shortest path! Amazing….yes….hard to digest….YES!</p>
<p>This was my reaction when I first got the hang of flood fill.</p>
<p>Flood Fill can be understood in another manner, something that I call the ‘potential difference’ analogy. Water is still used here [:-)] !</p>
<p>Suppose there are two squares A and B. I put A at a higher potential than B and pour a glass of water in A. It is obvious that the water will reach the square B taking the shortest path, given there exists a path (i.e. no wall present) between A and B.</p>
<p>Above point is shown at a larger scale in the following picture and this should clear any doubts in your mind regarding this algorithm (hopefully).</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/floodd-fill-potentials.JPG" title="Flood Fill Potential Difference Analogy"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/floodd-fill-potentials.thumbnail.JPG" alt="Flood Fill Potential Difference Analogy"></a></p>
<p>It should be noted here that this illustration has no connection with the ones shown before. Here also, it is easy to see if squares are chosen in ascending order of their potential from the starting square, the center can be reached by the shortest path.</p>
<p>This algorithm has a relatively simple implementation in the software. Two arrays should be maintained in the memory, one for keeping the flood fill numbers and the other for keeping the wall information of the maze. Every time the mouse enters a new square, it stops and checks for the walls, runs the flood fill algorithm, decides where to go depending upon the information given by the flood fill and moves on till it finds the center. Needless to say, this is not a great approach, firstly because your mouse is stopping at every square and secondly, you are flooding the maze from the center every time. This is where the modified flood fill kicks in.</p>
<h3>The Modified Flood Fill Algorithm <font face="Wingdings">=&gt;</font></h3>
<p>The modified form of flood fill is nothing different from the original one, just that we don’t flood the whole maze every time. It changes only those flood values which need to be changed. Have a look at the link given below,</p>
<p><font color="#0000ff"><u><a href="http://www.micromouseinfo.com/introduction/algorithm.html">http://www.micromouseinfo.com/introduction/algorithm.html</a></u></font></p>
<p>This is a very good demonstration of modified flood fill for maze solving.</p>
<h3>Algorithm Formulation <font face="Wingdings">=&gt;</font></h3>
<p>Before I start describing the various parts of my modified flood fill simulator, we need to formulate the various parts of our algorithm in simple English language.</p>
<p>This part has been taken from micromouseinfo.com.</p>
<p>Whenever we enter a cell, we check for the walls and update the wall map accordingly.</p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p><font size="3"><font color="#000000"><font face="Arial, sans-serif"><em><strong>Update the wall map</strong></em></font></font><font color="#000000"><font face="Arial, sans-serif"><em>:</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the North separated by a wall?<br />
Yes -&gt; Turn on the “North” bit for the cell we are standing on and<br />
No -&gt; Do nothing</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the East separated by a wall?<br />
Yes -&gt; Turn on the “East” bit for the cell we are standing on and<br />
No -&gt; Do nothing</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the South separated by a wall?<br />
Yes -&gt; Turn on the “South” bit for the cell we are standing on and<br />
No -&gt; Do nothing</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the West separated by a wall?<br />
Yes -&gt; Turn on the “West” bit for the cell we are standing on and<br />
No -&gt; Do nothing</em></font></font></font></p>
<p>Now we need to call the modified flood fill to flood only that part of the maze which is required. The cell values are updated according to the following rule,</p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>If a cell is not the destination cell, its value should be<br />
one plus the minimum value of its open neighbors</em></font></font></font><font color="#000000"><font face="Arial, sans-serif"><font size="3">.</font></font></font></p>
<p>When the cell values violate the above rule, they need to be updated.</p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p><strong><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Update the distance values (if necessary)</em></font></font></font></strong></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Make sure the stack is empty</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Push the current cell (the one the robot is standing on) onto the stack</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>Repeat the following set of instructions until the stack is empty:</em></font></font></font></p>
<p><font color="#000000"><font face="Arial, sans-serif"><font size="3"><em>{<br />
Pull a cell from the stack<br />
Is the distance value of this cell = 1 + the minimum value of its open neighbors?</p>
<p>No -&gt; Change the cell to 1 + the minimum value of its open neighbors and<br />
push all of the cell’s open neighbors onto the stack to be checked<br />
Yes -&gt; Do nothing<br />
} </em></font></font></font></p>
<p>The stack empty check is not required in the program presented in this article.</p>
<p>The wall map is updated, required part of the maze is also flooded now what? Guess we need to make the right move.</p>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p><font face="Arial, sans-serif"><font size="3"><em><strong>Decide which neighboring cell has the lowest distance value:</strong></em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the North separated by a wall?<br />
Yes -&gt; Ignore the North cell<br />
No -&gt; Push the North cell onto the stack to be examined</em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the East separated by a wall?<br />
Yes -&gt; Ignore the East cell</p>
<p>No -&gt; Push the East cell onto the stack to be examined</em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the South separated by a wall?<br />
Yes -&gt; Ignore the South cell<br />
No -&gt; Push the South cell onto the stack to be examined</em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em>Is the cell to the West separated by a wall?<br />
Yes -&gt; Ignore the West cell</p>
<p>No -&gt; Push the West cell onto the stack to be examined</em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em>Pull all of the cells from the stack (The stack is now empty)<br />
Sort the cells to determine which has the lowest distance value</em></font></font></p>
<p><font face="Arial, sans-serif"><font size="3"><em><strong>Move to the neighboring cell with the lowest distance value.</strong></em></font></font></p>
<p>After making the move, the above process is repeated again and again till the mouse reaches the center/runs out of gas/stops to say ‘Hi!’ to you/stops for a photograph/bangs into the wall!</p>
<h3>The Modified Flood Fill Simulator <font face="Wingdings">=&gt;</font></h3>
<p>I know you were waiting for this, the ‘real thing’!</p>
<p>The simulator is divided into two parts, the ‘.c’ file which implements the algorithm and the header ‘.h’ file which provides the graphics and basic front, left and right movements. At this point you might think that the main program is the most important thing, but you must understand that the header file is a general purpose file which can be used to implement any higher level maze solving algorithms.</p>
<p>The main program file, ‘Modified Floodfill_TRI.c’ has three routines,</p>
<ol>
<li>The ‘main’ routine</li>
<li>The ‘step’ routine</li>
<li>The ‘floodfill’ routine</li>
</ol>
<ol>
<li>The ‘main’ routine</li>
</ol>
<p>This is where the action takes place. ‘main’ is responsible for maze mapping, calling the floodfill routine to flood the maze and then calling the step routine to make a move.</p>
<p>The maze is mapped according to the algorithm given above.</p>
<ol>
<li>The ‘step’ routine</li>
</ol>
<p>This function is the implementation of the above ‘Decide which neighboring cell has the lowest distance value’ algorithm.</p>
<ol>
<li>The ‘floodfill’ routine</li>
</ol>
<p>This is where modified flood fill takes place. It takes the maze’s cell number as an argument and floods the maze assuming that the given cell number is the destination.</p>
<p>The ‘MAZE.h’ header file deals only with the graphics and I must clearly state here that it has not been written by me. It has the following functions that you are supposed to know,</p>
<ol>
<li><em>void movestraight(int)</em></li>
</ol>
<p>This function makes the mouse on screen go straight the number of squares mentioned in the argument when calling.</p>
<ol>
<li><em>void turnleft()</em></li>
</ol>
<p>This makes the mouse point to its left direction. If you call the <em>movestraight(1)</em> function after calling <em>turnleft()</em>, the mouse will move into the square in its left.</p>
<ol>
<li><em>void turnright()</em></li>
</ol>
<p>This makes the mouse point to its right direction. If you call the <em>movestraight(1)</em> function after calling <em>turnright()</em>, the mouse will move into the square in its right.</p>
<p>You should note that the left and right directions are relative to mouse and not yours’ left and right, don’t get confused.</p>
<ol>
<li><em>void show_maze()</em></li>
</ol>
<p>Calling this function would display the maze on the screen. This should be done in the start of the <em>main()</em>.</p>
<ol>
<li><em>int sense(int)</em></li>
</ol>
<p>This function has three arguments, <em>FRONT</em>, <em>LEFT</em> and <em>RIGHT</em>. It returns a high(i.e. ‘1’) if there is a wall in the given direction. Basically this is the sensor of your virtual mouse on screen.</p>
<ol>
<li><em>int 	hori_walls[sizemaze+1][sizemaze]</em> and <em>int 	vert_walls[sizemaze][sizemaze+1]</em></li>
</ol>
<p>These two variables contain the maze’s wall information. Putting a ‘1’ builds a wall, ‘0’ removes it. I have provided two actual competition mazes for you. One was used in a competition in the USA in 1982 and the other was used in Japan in 1991 (yes, we are far behind them). The design has been taken from Peter Harrison’s micromouse site,</p>
<p><font color="#0000ff"><u><a href="http://micromouse.cannock.ac.uk/maze/samples.htm">http://micromouse.cannock.ac.uk/maze/samples.htm</a></u></font></p>
<p>Watch out for that Japanese maze, it is the best I have ever seen. Also, you can build your own test maze.</p>
<p>Before going through the simulator program, you need to understand a few things about this implementation,</p>
<ol>
<li>I have tried to make things as simple 	as possible(with few exceptions of course!), thus the implementation 	is not very efficient in terms of memory consumption and execution 	speed, mainly because of my 2.4Ghz machine with 1Gb RAM. You are 	probably going to implement this on a 16MHz 2Kb thingy (ATMega32), 	so take this program as a reference only. 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></li>
<li>The maze has been mapped as a 	1-dimensional array to maintain simplicity and has been visualized 	as shown below</li>
</ol>
<p><a href="http://www.thinklabs.in/resources/?attachment_id=262" rel="attachment wp-att-262" title="The Maze, as perceived by my virtual mouse"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/pic5.JPG" alt="The Maze, as perceived by my virtual mouse"></a></p>
<p>In the implementation, cell number 119 has been taken as the destination cell. This happens to be the bottom left cell of the maze’s center.</p>
<ol>
<li>The directions have been taken 	like this</li>
</ol>
<p><a href="http://www.thinklabs.in/resources/?attachment_id=263" rel="attachment wp-att-263" title="Directions with respect to maze"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/pic6.JPG" alt="Directions with respect to maze"></a></p>
<p>It is pretty evident that if the mouse is facing north in the cell number ‘x’ and it moves straight one cell, it will find itself in the cell number ‘x+16’.</p>
<p>If the mouse is facing west in the cell number ‘x’ and it moves one cell to its left, it will find itself in the cell number ‘x-16’. You can work out for other directions and movements in a similar way.</p>
<ol>
<li>The maze’s wall information is 	stored in the variable ‘<em>wallmap[256]</em>’. The maze’s 	dimensions is 16×16, representing it by a one dimensional array 	would require 256 memory locations.</li>
<li>A single wall is represented in 	the following manner</li>
</ol>
<p> 	<!-- 		@page { size: 8.5in 11in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	--></p>
<p>[BIT7] |V| [BIT6] |0| [BIT5] |0| [BIT4] |0| [BIT3] |W| [BIT2] |S| [BIT1] |E| [BIT0] |N|</p>
<p>Here, V stands for visited. ‘1’, cell is visited, unvisited otherwise. W stands for the wall in cell’s west direction. Here, the west is the maze’s west not the mouse’s west. S, E and N have similar meanings.</p>
<ol>
<li>The current direction of the mouse 	is represented as follows</li>
</ol>
<p>[BIT7] |0|  [BIT6] |W|  [BIT5] |0|  [BIT4] |S|  [BIT3] |0|  [BIT2] |E|  [BIT1] |0|  [BIT0] |N|</p>
<p>These directions refer to the absolute maze’s directions. For example, if the mouse is facing east, i.e. the 2<sup>nd</sup> bit current direction is ‘1’, then the mouse’s left is maze’s north and its right is maze’s south.</p>
<p>You need to go through this direction part again and again until you get the hang of it otherwise you won’t be able to understand a major part of the program.</p>
<p>In this format when I change the direction of my mouse, I simply rotate the direction bit left or right. This is done every time after I make a move in the maze. See the program to get what I am trying to say.</p>
<p>7. 	The <em>unsigned char wallflood[256] </em>variable holds the flood fill numbers (or the potential values) of the squares. This variable is initialized with values assuming that there are no walls in the maze.</p>
<p>8.	There is a variable in the program called <em>cell_count, </em>this variable was declared solely for debugging purposes and has no use in the current program. You can surely put it to some good use.</p>
<p>9. 	Rest of the code is very heavily commented (that’s my habit, a good one) and is pretty much self explanatory given you have gone through the theory part and you have a good command in C.</p>
<p>10.	Please go through ‘Read Me.txt’ before running the simulator on your PC.</p>
<h3>Final Remarks <font face="Wingdings">=&gt;</font></h3>
<p>First things first, flood fill algorithm of any kind is pretty inefficient. Your mouse will take a long time to reach the center and come back for a speed run. But yes, you will reach the center and complete the problem statement which might be enough for you to be the champion!</p>
<p>There is a reason why I like that Japan competition maze, the shortest path in it is not the fastest one! Yup, this is possible! Here, you will see, flood fill’s performance is horrible. Here, something you need to know about the pedigree of flood fill. Flood Fill Algorithm has been derived from Kruskal’s Algorithm which happens to be a kind of greedy algorithm. Kruskal’s Algorithm finds a minimum spanning tree (i.e. the shortest path in the maze) for a connected weighted graph (which is The Maze). I know I am speaking too much! It does not assigns costs to the paths, that is, a turn takes more time than a straight and hence, ‘costs’ more. Kruskal’s Algorithm doesn’t cares about this.</p>
<p>A simple idea to work around this problem could be like this,</p>
<p>1. After coming back to the start for a speed run, the mouse stops and calculates the fastest path.</p>
<p>2. Check all the cells that the mouse has visited.</p>
<p>3. Out of those cells, figure out how many paths lead to the center.</p>
<p>4. The path involving minimum turns will be the fastest path.</p>
<p>Here I have a made the important assumption that your mouse does not makes diagonal runs. If it does, then the problem is much more complex than you think and you better opt for A* (pronounce A star) or Dijkstra’s Algortihm (pronounce diaofoasdfsdfet [:-)]&nbsp; ).</p>
<p>All the Best for the Techfest 20xx…….and Happy microMousing!</p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/read-me-first.txt" title="Read Me">Read Me</a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/maze.H" title="Maze.h">Maze.h</a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/07/modified-floodfill.c" title="Modified Floodfill.c">Modified Floodfill.c</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=101</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use an LCD module?</title>
		<link>http://www.thinklabs.in/resources/?p=100</link>
		<comments>http://www.thinklabs.in/resources/?p=100#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:46:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iBOT, iTRIx and the 8051]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=100</guid>
		<description><![CDATA[LCD or Liquid Crystal Display is nowadays fast becoming a preferred choice for an interface device due to its ease of use,cheap rates and value for money performance.
They are available in various specs 16X1 16
LCD or Liquid Crystal Display is nowadays fast becoming a preferred choice for an interface device due to its ease of [...]]]></description>
			<content:encoded><![CDATA[<p>LCD or Liquid Crystal Display is nowadays fast becoming a preferred choice for an interface device due to its ease of use,cheap rates and value for money performance.<br />
They are available in various specs 16X1 16</p>
<p>LCD or Liquid Crystal Display is nowadays fast becoming a preferred choice for an interface device due to its ease of use,cheap rates and value for money performance.<br />
They are available in various specs 16X1 16X2 20X2 etcï¿½<br />
The first number denotes the number of characters/line and second denotes the number of lines.<br />
<span id="more-32"></span><br />
The most widely used LCDs are based on the HITACHI HD44780 controller.<br />
It has 16 pins arranged in the following configuration:<br />
1 ï¿½ Vss<br />
2 ï¿½ Vcc</p>
<p>3 ï¿½ Vee<br />
4 ï¿½ RS<br />
5 ï¿½ R/W<br />
6 ï¿½ EN<br />
7 ï¿½ DB0<br />
8 ï¿½ DB1<br />
9 ï¿½ DB2<br />
10- DB3<br />
11 ï¿½ DB4</p>
<p>12 ï¿½ DB5<br />
13 ï¿½ DB6<br />
14 ï¿½ DB7<br />
15 ï¿½ LED+<br />
16 ï¿½ LED-</p>
<p>* DB0-DB7: Data Pins<br />
* RS: 1 ï¿½ Data 0 ï¿½ Command<br />
* R/W: 1 ï¿½ Read 0 &#8211; Write<br />
* EN: To be Pulsed when to execute any operation</p>
<p>* Vee: Contrast Adjust Pin</p>
<p>We will be using the LCD in 4 bit mode. This amounts to using 7(3 control signals and 4 for data) bits for controlling the</p>
<p>LCD instead of the normal 11.<br />
In 4 bit mode the DB4-DB7 data lines are used for writing data. The upper nibble of data is sent first and then the lower</p>
<p>nibble of data is sent. In 8 bit mode the whole byte is sent at once.</p>
<p>LCD command library (Courtesy Team TRI):</p>
<p>LCD_INIT()<br />
Initializes the LCD in 2 line 4 bit mode with blinking cursor.</p>
<p>LCD_WRITE(ï¿½Xï¿½)</p>
<p>Used to write any character X to the LCD.</p>
<p>LCD_STRING(ï¿½Xplore Roboticsï¿½)<br />
Used to write a string on the LCD (max 16 characters in length)</p>
<p>LCD_CMD(X)<br />
To give commands to the LCD. X can be as follows<br />
PUTLINE1 ï¿½ Places cursor on line1<br />
PUTLINE2 &#8211; Places cursor on line2<br />
DISPON ï¿½ Turns display on</p>
<p>To place the cursor on a particular character box it is addressed as follows:</p>
<p>Command = LCD_CMD(0b1XXX XXXX);<br />
where xxx xxxx is the address of character in binary.</p>
<p>Note: LCD row 1 address starts at 0×00 and row 2 starts at 0×40</p>
<p>Eg: To put cursor on 3 character line 1<br />
LCD_CMD(0×83);<br />
To put cursor on 5 character line 2<br />
LCD_CMD(0xC5);</p>
<p>LCD_CLEAR()<br />
Clears LCD screen.</p>
<p>Sample Program:<br />
#include”REG52MOD.h”<br />
#includeï¿½LCD.hï¿½</p>
<p>void main (void)<br />
{<br />
LCD_INIT();<br />
LCD_STRING(ï¿½Hello Worldï¿½);<br />
while(1){}<br />
}</p>
<p>No prizes for guessing what THIS program is supposed to do!!!!</p>
<p>Letï¿½s move onto something higher</p>
<p>#include”REG52MOD.h”<br />
#includeï¿½LCD.hï¿½</p>
<p>void main (void)<br />
{<br />
LCD_INIT();<br />
LCD_STRING(ï¿½USINGï¿½);<br />
LCD_CMD(PUTLINE2);</p>
<p>LCD_STRING(”LCD”);<br />
delay(100);<br />
LCD_CLEAR();<br />
LCD_CMD(0×83);<br />
LCD_STRING(”IS”);<br />
LCD_CMD(0xC5);<br />
LCD_STRING(”COOL”);<br />
while(1){}<br />
}</p>
<p>Having fun arenï¿½t we???</p>
<p>I think I should end this tutorial here and leave you with things to experiment .Some good pages to visit for inside</p>
<p>information about the working of an LCD are</p>
<p><a href="http://www.myke.com/lcd.htm">http://www.myke.com/lcd.htm</a><br />
<a href="http://www.geocities.com/dinceraydin/lcd/index.html"> http://www.geocities.com/dinceraydin/lcd/index.html </a>(youï¿½ll find a nice cool LCD simulator on this page)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SOLAR ROLLER out of basic Electronic Components</title>
		<link>http://www.thinklabs.in/resources/?p=95</link>
		<comments>http://www.thinklabs.in/resources/?p=95#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:41:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.thinklabs.in/resources/?p=95</guid>
		<description><![CDATA[  
 




Work Done By-SANDEEP GILL
Wanna build your first simple solar roller using discrete and easily available electronic components(R,C,diodes etc.). Here is where you begin. Solar Roller is a beam-dragster robot that utilizes sunlight as a source of energy. Mostly in all solar competitions this being quite a popular event, wherein two solar bots [...]]]></description>
			<content:encoded><![CDATA[<p align="right"> <script src="http://cdn.socialtwist.com/2009040614570/script.js" type="text/javascript"> </script><a href="http://tellafriend.socialtwist.com:80" onclick="return false;" class="st-taf" style="border: 0pt none ; margin: 0pt; padding: 0pt;"><img src="http://images.socialtwist.com/2009040614570/button.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '2009040614570', window.location, document.title)" onclick="cw(this, {id:'2009040614570', link: window.location, title: document.title });" alt="SocialTwist Tell-a-Friend" style="border: 0pt none ; margin: 0pt; padding: 0pt;"></a></p>
<p> <!--[if !mso]&amp;gt;  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);}  --></p>
<p align="right"><strong><!--[endif]--></strong><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/1.JPG" title="1.JPG"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/11.JPG" title="11.JPG"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/11.JPG" title="11.JPG"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/11.JPG" title="11.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/11.JPG" alt="Solar Roller" align="middle"></a></p>
<p><strong>Work Done By</strong>-SANDEEP GILL</p>
<p>Wanna build your first simple solar roller using discrete and easily available electronic components(R,C,diodes etc.). Here is where you begin.<span id="more-280"></span> Solar Roller is a beam-dragster robot that utilizes sunlight as a source of energy. Mostly in all solar competitions this being quite a popular event, wherein two solar bots are placed side by side on a track and they have to travel a distance of 1 meter in shortest time using light source coming from overhead high watt bulbs. So, let’s try and build a simple solar roller.</p>
<p>Check out these links for problem statements of the solar roller competitions <a href="http://techfest.org/nexus/photoroller/"></a></p>
<p><a href="http://techfest.org/nexus/photoroller/">http://techfest.org/nexus/photoroller/</a>         <a href="http://www.robotgames.net/robotgames/pdf/2002%20solar%20roller.pdf"></a></p>
<p><a href="http://www.robotgames.net/robotgames/pdf/2002%20solar%20roller.pdf">http://www.robotgames.net/robotgames/pdf/2002%20solar%20roller.pdf              </a></p>
<p align="left"><strong>Component List: </strong></p>
<p align="left">1 Solar Panel- 4 V, 90 mA</p>
<p align="left">1 Storage Capacitor 0.047F, 5.5V</p>
<p align="left">1 3V3 Zener diode</p>
<p align="left">1 mini DC motor with sleeves</p>
<p align="left">Two Transistors –2N2222A &amp; 2N2907A</p>
<p align="left">1 Resistor- 50 K</p>
<p>Two small wheels (taken from mechano parts) without rims</p>
<p>A foam board body design</p>
<p><strong>Construction Details:</strong></p>
<p><strong>1. Body design: </strong>Cut a piece of foam board in a rectangular shape and attach two small wheels at the front side. The wheels are screwed to the foam board via 90degree clamps with an axle passing through them.<strong>         </strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/3.JPG" title="Body Design"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/3.JPG" title="Body Design"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled2.JPG" title="untitled2.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled2.JPG" alt="untitled2.JPG"></a></p>
<p><strong><!--[if gte vml 1]&amp;gt;   --><!--[if !vml]--><!--[endif]-->2. Attaching the Motor </strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/4.JPG" title="Mini DC Motor"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/4.JPG" title="Mini DC Motor"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/4.JPG" title="Mini DC Motor"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/4.JPG" alt="Mini DC Motor"></a><strong>   Mini DC motor</strong><strong> </strong></p>
<p>Put on a sleeve onto the motor and attach it to the rear side of the foam body with the help of a mechano strip bended at an angle of 45-60 degree to touch the ground so that it is as close as possible to centre of body.</p>
<p align="center"><!--[if gte vml 1]&amp;gt;   --><!--[if !vml]--><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/5.JPG" title="Attaching the motor"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/5.JPG" title="Attaching the motor"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled3.JPG" title="untitled3.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled3.JPG" alt="untitled3.JPG"></a></p>
<p><!--[endif]--></p>
<p>This is how the whole body will look:<strong>                                </strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/6.JPG" title="6.JPG"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/6.JPG" title="6.JPG"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled.JPG" title="untitled.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/untitled.JPG" alt="untitled.JPG"></a></p>
<p><strong>3. Solar Engine:</strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/7.JPG" title="Solar Engine"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/7.JPG" title="Solar Engine"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/solar-cel_zd.JPG" title="solar-cel_zd.JPG"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/solar-cel_zd.JPG" alt="solar-cel_zd.JPG"></a></p>
<p><strong>Working:</strong><strong> </strong>This is a Zener based SE. This design uses a Zener diode as means of determining the trigger voltage. The reverse bias operating voltage of the Zener is used as means of triggering point in the circuit. You can also use LED’s or diodes in series to accomplish the same trigger voltage. For further readings:</p>
<p><a href="http://www.beam-wiki.org/wiki/index.php?title=Zener-based_Solar_Engines">http://www.beam-wiki.org/wiki/index.php?title=Zener-based_Solar_Engines</a></p>
<p><a href="http://faq.solarbotics.net/oscillate.html">http://faq.solarbotics.net/oscillate.html</a>.</p>
<p>You could veroboard the circuit like this:</p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/81.JPG" title="veroboard the circuit"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/81.JPG" title="veroboard the circuit"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/81.JPG" alt="veroboard the circuit"></a></p>
<p align="left">Attach the solar engine to the centre of foam body with help of a double sided tape and connect the motor to the berg terminals.<strong>              </strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/9.JPG" title="Solar Engine"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/9.JPG" title="Solar Engine"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/9.JPG" title="Solar Engine"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/9.JPG" alt="Solar Engine"></a></p>
<p><strong><!--[if gte vml 1]&amp;gt;   --><!--[if !vml]--> 4. Attaching the Solar panel </strong></p>
<p>Take out two wires from the solar panel for giving the supply to the solar engine.</p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/10.JPG" title="Attaching the solar panel"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/10.JPG" title="Attaching the solar panel"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/10.JPG" title="Attaching the solar panel"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/10.JPG" alt="Attaching the solar panel"></a></p>
<p>Just place the solar panel at the rear side of the foam body with help of a rubber band or a double sided tape.</p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/2.JPG" title="Attaching the solar panel"></a></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/2.JPG" title="Attaching the solar panel"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/2.JPG" title="Attaching the solar panel"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/2.JPG" alt="Attaching the solar panel"></a></p>
<p><strong>5.</strong> <strong>Complete Solar Bot:      </strong></p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/12.JPG" title="Complete solar bot"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/12.JPG" title="Complete solar bot"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/12.JPG" alt="Complete solar bot"></a></p>
<p align="center">&nbsp;</p>
<p align="center"><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/113.JPG" title="Complete solar bot"></a></p>
<p><a href="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/113.JPG" title="Complete solar bot"><img src="http://www.triindia.co.in/resources/wp-content/uploads/2008/09/113.JPG" alt="Complete solar bot"></a></p>
<p><strong>Results: </strong>Testing our newly built solar roller under light gave us quite good results. The solar roller was working in longer bursts &#8211; less frequent rate mode i.e. travelling a distance around 25-30 cm during his burst cycles of 3-4 sec occurring every 15-20 seconds. The solar bot was placed on a table and driven by a source of 100W light bulb from a distance of 20-30 cm from the table. We took 3-4 readings holding the light bulb at varied distances from the table and the approximate time to travel a distance of 1meter varied from 47 seconds to a little more than a minute.</p>
<p><strong>Further Modifications:  </strong></p>
<p><strong>Mechanical design modifications:</strong> Though this design is quite light weight, there is a little problem with the roller it slightly keeps deviating from the straight track i.e. because of the front wheels are not properly locked and also the motor shaft is little offset from the centre (motor tilt angle is changed). So you could try building a design where in the motor is attached to an axle driving two idler wheels and you attach a third pint of contact via a skid or and idler wheel. Also try using even smaller wheels to cut down the torque even further.</p>
<p><strong>Circuit modifications:                                                                                                                            </strong>1. Try varying the trigger voltage by using a Zener of higher or lower value which will decide duration of bursts as well as their rate of occurring.</p>
<p>2. Try varying the storage capacitor value. Since we have already used a large capacitor you could test the circuit a smaller cap around 4700-10000 microfarad and work with shorter bursts – more frequent rates.</p>
<p>3. Try varying the feedback resistor will help in making the bot tolerant to motor variants &amp; inefficiency, it also helps in decreasing the charge time of capacitor little bit.</p>
<p>4. Try varying the size or current ratings of solar panel. Higher current ratings will help in giving in more current for motor runs but the solar panel size is going to increase.</p>
<p><strong>Further readings:</strong></p>
<p><strong><a href="http://www.solarbotics.com/assets/documentation/solarbotics_solarspeeder2_kit_may022007.pdf">http://www.solarbotics.com/assets/documentation/solarbotics_solarspeeder2_kit_may022007.pdf</a></strong></p>
<p><strong><a href="http://library.solarbotics.net/apocrypha/pix/solaroller_mechanics.gif">http://library.solarbotics.net/apocrypha/pix/solaroller_mechanics.gif</a></strong></p>
<p><strong><a href="http://library.solarbotics.net/apocrypha/pix/solaroller_circuits.gif">http://library.solarbotics.net/apocrypha/pix/solaroller_circuits.gif</a></strong></p>
<p><strong><a href="http://www.robotgames.net/RobotGames/Event_Rules/2002-BEAM-solaroller.htm">http://www.robotgames.net/RobotGames/Event_Rules/2002-BEAM-solaroller.html</a></strong></p>
<p><strong><a href="http://www.beam-online.com/Robots/Galleria_other/solarollers.html">http://www.beam-online.com/Robots/Galleria_other/solarollers.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinklabs.in/resources/?feed=rss2&amp;p=95</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
