<?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>Silveira Neto &#187; robot</title>
	<atom:link href="http://silveiraneto.net/tag/robot/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 04:13:27 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Twitter Bot @rudaufc versão 1</title>
		<link>http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/</link>
		<comments>http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 19:54:18 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[português]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[Comida]]></category>
		<category><![CDATA[CRON]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[culinária]]></category>
		<category><![CDATA[CURL]]></category>
		<category><![CDATA[ia]]></category>
		<category><![CDATA[inteligência artificial]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Restaurante Universitário]]></category>
		<category><![CDATA[robô]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[SH]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[ufc]]></category>
		<category><![CDATA[Universidade Federal do Ceará]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2927</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/" title="Twitter Bot @rudaufc versão 1"></a>Este aqui é um bot bem simples para Twitter. Diariamente, as nove da manhã ele posta qual vai ser o cardápio do RU (Restaurante Universitário) da UFC naquele dia. Assim, quando vai batendo a hora da fome, os alunos podem &#8230;<p class="read-more"><a href="http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/" title="Twitter Bot @rudaufc versão 1"></a><p><center><img src="http://silveiraneto.net/wp-content/uploads/2009/11/robo.jpg" alt="robô" title="robô" width="117" height="227" class="alignnone size-full wp-image-2933" /></center></p>
<p>Este aqui é um bot bem simples para Twitter.</p>
<p>Diariamente, as nove da manhã ele posta qual vai ser o cardápio do RU (<a href="http://www.ufc.br/portal/index.php?option=com_content&#038;task=view&#038;id=6842&#038;Itemid=87">Restaurante Universitário</a>) da <a href="http://www.ufc.br">UFC</a> naquele dia.</p>
<p>Assim, quando vai batendo a hora da fome, os alunos podem entrar no perfil <a href="http://www.twitter.com/rudaufc">@rudaufc</a> e olhar qual vai ser o prato do dia, ou quem está seguindo ele no Twitter pode ter a agradável surpresa de ver todo dia o que vai ser servido hoje.</p>
<p>Aqui está o código fonte do arquivo rudaufc.sh:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># Twitter bot @rudaufc</span>
<span style="color: #007800;">login</span>=<span style="color: #ff0000;">&quot;rudaufc&quot;</span>
<span style="color: #007800;">senha</span>=<span style="color: #ff0000;">&quot;suasenhaaqui&quot;</span>
&nbsp;
<span style="color: #007800;">segunda</span>=<span style="color: #ff0000;">&quot;Picadinho com legumes ou bife na chapa. Salada de macarrão com cenoura. Arroz. Feijão com abóbora e batata doce.&quot;</span>
<span style="color: #007800;">terca</span>=<span style="color: #ff0000;">&quot;Franco guisado ou coxas de frango ao forno . Salada de acelga, cenoura e passas. Arroz. Feijão com abóbora e batata doce.&quot;</span>
<span style="color: #007800;">quarta</span>=<span style="color: #ff0000;">&quot;# Feijoada à moda RU ou bisteca . Salada de repolho branco, cenoura e abacaxi. Arroz. Feijão com abóbora e batata doce&quot;</span>
<span style="color: #007800;">quinta</span>=<span style="color: #ff0000;">&quot;Frango à passarinho ou frango chinês. Salada de Alface, Tomate e Cebola. Arroz. Feijão com abóbora e batata doce.&quot;</span>
<span style="color: #007800;">sexta</span>=<span style="color: #ff0000;">&quot;# Isca ao molho ou maravilha de carne. Salada de acelga com cenoura. Arroz. Feijão com abóbora e batata doce.&quot;</span>
&nbsp;
<span style="color: #007800;">dia</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span><span style="color: #c20cb9; font-weight: bold;">w</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">log</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y-<span style="color: #000000; font-weight: bold;">%</span>m-<span style="color: #000000; font-weight: bold;">%</span>d-<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #ff0000;">&quot;-$$.log&quot;</span>
<span style="color: #007800;">dir</span>=<span style="color: #ff0000;">&quot;/home/silveiraneto/rudaufc&quot;</span>
<span style="color: #007800;">msg</span>=<span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$dia</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
<span style="color: #666666; font-style: italic;">#	&quot;0&quot;) msg=$domingo ;;</span>
	<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">msg</span>=<span style="color: #007800;">$segunda</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #ff0000;">&quot;2&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">msg</span>=<span style="color: #007800;">$terca</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #ff0000;">&quot;3&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">msg</span>=<span style="color: #007800;">$quarta</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">msg</span>=<span style="color: #007800;">$quinta</span> <span style="color: #000000; font-weight: bold;">;;</span>
	<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">msg</span>=<span style="color: #007800;">$sexta</span> <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #666666; font-style: italic;">#	&quot;6&quot;) msg=$sabado ;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
curl <span style="color: #660033;">-u</span> <span style="color: #007800;">$login</span>:<span style="color: #007800;">$senha</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">status</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$msg</span>&quot;</span> http:<span style="color: #000000; font-weight: bold;">//</span>twitter.com<span style="color: #000000; font-weight: bold;">/</span>statuses<span style="color: #000000; font-weight: bold;">/</span>update.xml <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$dir</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$log</span></pre></div></div>

<p>A mágica toda está na capacidade do <a href="http://en.wikipedia.org/wiki/CURL">Curl</a> de acessar facilmente a <a href="http://apiwiki.twitter.com/">API do Twitter</a> para enviar mensagens.</p>
<p>Para que o script execute diariamente as nove da manhã ele está alocado em um servidor com a <a href="http://pt.wikipedia.org/wiki/Crontab">crontab</a> configurada da seguinte maneira:</p>
<pre>
0 5 * * *  . /caminho_para_onde_ele_esta/rudaufc.sh
</pre>
<p><small>ps: leve em conta que o servidor está em um fuso horário diferente do Brasil.</small></p>
<p>Nessa versão o prato de cada dia está hardcoded no script, o que não é o ideal e faz com que semanalmente eu tenha que atualizar o script inserindo os pratos da semana manualmente. Eu espero que a próxima versão seja capaz de descobrir esses pratos e se atualizar sem nenhuma interferência.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/11/09/twitter-bot-rudaufc-versao-1/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Robot Fish</title>
		<link>http://silveiraneto.net/2008/09/21/robot-fish/</link>
		<comments>http://silveiraneto.net/2008/09/21/robot-fish/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 09:57:29 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Essex University]]></category>
		<category><![CDATA[Fish]]></category>
		<category><![CDATA[London Aquarium]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[vídeo]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1297</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2008/09/21/robot-fish/" title="Robot Fish"></a>Description from video: A robotic fish developed by scientists from Essex University is put through its paces in a special tank at the London Aquarium. It works via sensors and has autonomous navigational control. Should be hard creating robotics to &#8230;<p class="read-more"><a href="http://silveiraneto.net/2008/09/21/robot-fish/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2008/09/21/robot-fish/" title="Robot Fish"></a><p style="text-align: center;"><span style="text-align:center; display: block;"><a href="http://silveiraneto.net/2008/09/21/robot-fish/"><img src="http://img.youtube.com/vi/eO9oseiCTdk/2.jpg" alt="" /></a></span></p>
<p>Description from video:</p>
<blockquote><p><span>A robotic fish developed by scientists from <a title="Essex University Page" href="http://www.essex.ac.uk/">Essex University</a> is put through its paces in a special tank at the <a title="London Aquarium Page" href="http://www.londonaquarium.co.uk/">London Aquarium</a>. It works via sensors and has autonomous navigational control.</span></p></blockquote>
<p>Should be hard creating robotics to work underwater&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/09/21/robot-fish/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Walker Sphere</title>
		<link>http://silveiraneto.net/2008/02/23/walker-sphere/</link>
		<comments>http://silveiraneto.net/2008/02/23/walker-sphere/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 03:43:18 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[proposal]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[sphere]]></category>
		<category><![CDATA[Squawk]]></category>
		<category><![CDATA[Sun Spot]]></category>
		<category><![CDATA[walker]]></category>
		<category><![CDATA[walker sphere]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/2008/02/23/walker-sphere/</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2008/02/23/walker-sphere/" title="Walker Sphere"></a>For a while I&#8217;m thinking about this hardware project idea and now I&#8217;m opening here to get some opinions. After that maybe I&#8217;ll submit it for the Sun SPOT Open Grant Program. What is Walker Sphere? Walker Sphere is a &#8230;<p class="read-more"><a href="http://silveiraneto.net/2008/02/23/walker-sphere/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2008/02/23/walker-sphere/" title="Walker Sphere"></a><p>For a while I&#8217;m thinking about this hardware project idea and now I&#8217;m opening here to get some opinions. After that maybe I&#8217;ll submit it for the <a href="http://www.sunspotworld.com/proposals/" title="Sun Spot World">Sun SPOT Open Grant Program</a>.</p>
<p><strong>What is Walker Sphere?</strong> Walker Sphere is a project to made an robot capable with a diferent aproach, without heels, mats, propellers or wings. The main idea is to move only changing its center of gravity.</p>
<p><strong>How change its center of gravity?</strong></p>
<p>It&#8217;s a sphere</p>
<p><img src="http://silveiraneto.net/wp-content/uploads/2008/02/anatomy_12.png" alt="Sphere Walker Anatomy" /></p>
<p>with some compartments</p>
<p><img src="http://silveiraneto.net/wp-content/uploads/2008/02/anatomy_2.png" alt="Sphere Walker Anatomy" /></p>
<p>and a Sun Spot.</p>
<p><img src="http://silveiraneto.net/wp-content/uploads/2008/02/anatomy_3.png" alt="Sphere Walker Anatomy" /></p>
<p>One compartment is filled with a liquid. The liquid is pumped to another compartment and so the compartment got heavier and the sphere moves towards its direction.</p>
<p style="text-align: center"><img src="http://silveiraneto.net/wp-content/uploads/2008/02/how_it_walks.png" alt="How the sphere walks" /></p>
<p><strong>Why a sphere? </strong>We can distribute the mass uniformly in a sphere and it&#8217;s shapes make it easier to roll. A sphere can encapsulates all components and protect them from the outside world and at the same time all sensors can work, especially using some transparent material for the bark.</p>
<p><strong>Why Sun Spot?</strong> The Sun Spot have some advantages that fits perfectly in this project:</p>
<ul>
<li>A broad set of sensors including accelerometers that made possible to know the current state of the sphere.</li>
<li>Radio communication that can make possible two or more spheres collaborate to achieve a common task.</li>
</ul>
<p style="text-align: center"><img src="http://silveiraneto.net/wp-content/uploads/2008/02/spheres_talking1.png" alt="Spheres robots talking" /></p>
<ul>
<li>Programmable using Java.</li>
<li>Open and Free Source JVM, Squawk.</li>
</ul>
<p><strong>It will be free? </strong>Yes. I&#8217;d like to know more about open and free licenses for hardware projects.</p>
<p><strong>How to pump the liquid into the compartments? </strong>I don&#8217;t know. Have you some good idea?</p>
<p>Some random ideas:</p>
<ul>
<li>A pressure device.</li>
<li>Something like an injection.</li>
<li>An <a href="http://en.wikipedia.org/wiki/Archimedes%27_screw" title="Wikipedia, english">Archimedes&#8217; screw</a>.</li>
<li>Not using a liquid, use something else.</li>
</ul>
<p>I&#8217;m open for ideas, critics and suggestions. ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/02/23/walker-sphere/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

