<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6904171798055259108</id><updated>2012-02-16T20:33:14.136-08:00</updated><title type='text'>Robot monkey pimping</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://robotmonkeypimping.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://robotmonkeypimping.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ian Bishrey</name><uri>http://www.blogger.com/profile/17277452375274420902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_yHC2Sm6zvK4/Stis3BZusUI/AAAAAAAACJk/5OAP9lUknIk/avatar-crop.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6904171798055259108.post-1588618096200584644</id><published>2008-08-13T09:54:00.000-07:00</published><updated>2008-11-13T10:17:52.899-08:00</updated><title type='text'>EX-F1 high-speed video</title><content type='html'>&lt;p&gt;The Casio EX-F1. Handy for taking high-speed video of your golf swing or a dripping tap. Boring! Let's see what happens (in the interest of science) when you shoot a flaming butane can with a .22 LR hollow point.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="425" height="344"&gt;&lt;param name="src" value="http://www.youtube.com/v/5KCsj3MHQXA&amp;amp;hl=en"&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.youtube.com/v/5KCsj3MHQXA&amp;amp;hl=en" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6904171798055259108-1588618096200584644?l=robotmonkeypimping.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robotmonkeypimping.blogspot.com/feeds/1588618096200584644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6904171798055259108&amp;postID=1588618096200584644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/1588618096200584644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/1588618096200584644'/><link rel='alternate' type='text/html' href='http://robotmonkeypimping.blogspot.com/2008/08/ex-f1-high-speed-video.html' title='EX-F1 high-speed video'/><author><name>Ian Bishrey</name><uri>http://www.blogger.com/profile/17277452375274420902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_yHC2Sm6zvK4/Stis3BZusUI/AAAAAAAACJk/5OAP9lUknIk/avatar-crop.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6904171798055259108.post-5755409575913554049</id><published>2006-12-13T09:53:00.000-08:00</published><updated>2008-11-13T09:54:10.834-08:00</updated><title type='text'>Lava lamp automation</title><content type='html'>&lt;p&gt;I just found &lt;a href="http://www.pragmaticprogrammer.com/pa/pa.html" mce_href="http://www.pragmaticprogrammer.com/pa/pa.html"&gt;this&lt;/a&gt; article, while looking for a way to add basic authentication to a Groovy soap call. Build failure notification by lava lamp - Sweet. Check out chapter 6 of the &lt;a href="http://www.pragmaticprogrammer.com/sk/auto/" mce_href="http://www.pragmaticprogrammer.com/sk/auto/"&gt;book&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6904171798055259108-5755409575913554049?l=robotmonkeypimping.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robotmonkeypimping.blogspot.com/feeds/5755409575913554049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6904171798055259108&amp;postID=5755409575913554049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/5755409575913554049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/5755409575913554049'/><link rel='alternate' type='text/html' href='http://robotmonkeypimping.blogspot.com/2006/12/lava-lamp-automation.html' title='Lava lamp automation'/><author><name>Ian Bishrey</name><uri>http://www.blogger.com/profile/17277452375274420902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_yHC2Sm6zvK4/Stis3BZusUI/AAAAAAAACJk/5OAP9lUknIk/avatar-crop.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6904171798055259108.post-517233892633219970</id><published>2006-11-13T09:25:00.000-08:00</published><updated>2009-10-16T10:01:51.802-07:00</updated><title type='text'>Zowee</title><content type='html'>&lt;p&gt;&lt;img src="http://lh5.ggpht.com/_yHC2Sm6zvK4/StimxPko7ZI/AAAAAAAACJc/DE_QPi1FM-M/IMG_0022.JPG" mce_src="http://lh5.ggpht.com/_yHC2Sm6zvK4/StimxPko7ZI/AAAAAAAACJc/DE_QPi1FM-M/IMG_0022.JPG" alt="Zowee" /&gt;&lt;/p&gt; &lt;p&gt;Wowwee has a special new friend. See the miracle of monkey gender transformation on &lt;a href="http://www.youtube.com/watch?v=YQjno-j7DwI" mce_href="http://www.youtube.com/watch?v=YQjno-j7DwI"&gt;YouTube&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6904171798055259108-517233892633219970?l=robotmonkeypimping.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robotmonkeypimping.blogspot.com/feeds/517233892633219970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6904171798055259108&amp;postID=517233892633219970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/517233892633219970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/517233892633219970'/><link rel='alternate' type='text/html' href='http://robotmonkeypimping.blogspot.com/2006/11/zowee.html' title='Zowee'/><author><name>Ian Bishrey</name><uri>http://www.blogger.com/profile/17277452375274420902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_yHC2Sm6zvK4/Stis3BZusUI/AAAAAAAACJk/5OAP9lUknIk/avatar-crop.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_yHC2Sm6zvK4/StimxPko7ZI/AAAAAAAACJc/DE_QPi1FM-M/s72-c/IMG_0022.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6904171798055259108.post-2192497530527374534</id><published>2006-07-05T01:52:00.000-07:00</published><updated>2009-10-16T10:15:49.341-07:00</updated><title type='text'></title><content type='html'>Here in the &lt;a href="http://www.ikordo.com/?a=mpb"&gt;ikordo&lt;/a&gt; offices,  we're faced with many of the challenges that face a typical Web 2.0 company. Principal among these is the problem of how to connect your electro-mechanical monkey to the software bus, so he (or she) can let you know when, say, a new customer signs up. You might think that there would be a couple of active &lt;a href="http://sourceforge.net/"&gt;sourceforge&lt;/a&gt; projects and a &lt;a href="http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29"&gt;GOF&lt;/a&gt; pattern for it, but sadly no.  We'll be using &lt;strong&gt;Wowwee&lt;/strong&gt;, our &lt;a href="http://www.wowweealiveonline.com/"&gt;Wowee Alive!&lt;/a&gt;, upgrading him from being just a loveable pet into something much more useful. At this point, I should mention that Wowwee Alive! has never been &lt;em&gt;that&lt;/em&gt; popular with gadget magazine reviewers or anyone really, to the point where the only source (in the UK at least) these days seems to be eBay. Bad news for the &lt;a href="http://www.wowwee.com/"&gt;Wowwee&lt;/a&gt; corporation, good news for monkey fans. It also meant that we were able to buy Wowwee a companion, Zowwee, but that's for another post. Now, on to the chimperface.&lt;br /&gt;&lt;h4&gt;The Wowwee Alive! controller&lt;/h4&gt;&lt;br /&gt;Having decided not to interfere with Wowwee's internals, hacking the remote seemed like a good idea. The controls are pretty straightforward - buttons and microswitches in a 4-way joystick configuration. Typically, the buttons are for vocalisations, the switches for actions. If I'd been more patient, I would probably have taken out all the connections from the controller PCB. As it was, I went for 3 buttons, a couple of switches, V+ and Gnd.&lt;br /&gt;&lt;h4&gt;The Chimp Interface box&lt;/h4&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_yHC2Sm6zvK4/Royyhay6OdI/AAAAAAAAAP0/IZojLIiLsVc/chimperface.jpg" alt="The Chimperface" /&gt;&lt;br /&gt;Like most engineers, I previously bought a microcontroller development kit, wrote a program to flash the LED, then, disgusted at having to use a parallel port, stuck it in a cupboard. As it turned out my &lt;a href="http://www.active-robots.com/products/controllr/mr8-details.shtml"&gt;Atmel MR-8 CPU Board&lt;/a&gt; from &lt;a href="http://www.active-robots.com/"&gt;Active Robots&lt;/a&gt; was just the ticket for the chimperface, with a hardware UART and 20 I/O lines. I stuck the MR-8 in an old breadboard, added a MAX232-based level shifter, an LM7805 regulator to drop the 9v controller supply to 5v and wired up the MR8 PORTC bits to the custom remote connector.&lt;br /&gt;&lt;h4&gt;The custom remote connector&lt;/h4&gt;&lt;br /&gt;With a bit of sawing and drilling (and biting), I managed to stuff the whole thing into an old iPod nano case.&lt;br /&gt;&lt;img src="http://lh3.ggpht.com/_yHC2Sm6zvK4/StipMeptGYI/AAAAAAAACJg/IX_tZB2KKRU/_MG_7197.jpg" alt='remote connector'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;ChimpOS&lt;/h4&gt;&lt;br /&gt;I needed a simple protocol for communicating with the chimp. It goes like this: issue a command "a" to "h". In response, the microcontroller pulls the appropriate PORTC pin high for 100ms and responds with "OO!". If there's an error, it returns "AA!". The whole thing looks like this:&lt;br /&gt;&lt;pre&gt;program monkeyio&lt;br /&gt;&lt;br /&gt;dim key as byte&lt;br /&gt;dim crlf as string[3]&lt;br /&gt;dim msg as string[20]&lt;br /&gt;&lt;br /&gt;sub procedure pulse(dim portId as byte)&lt;br /&gt;PORTC.portId = 1&lt;br /&gt;Delay_ms(100)&lt;br /&gt;PORTC.portId = 0&lt;br /&gt;end sub&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;crlf[0] = chr(13)&lt;br /&gt;crlf[1] = chr(10)&lt;br /&gt;crlf[2] = 0&lt;br /&gt;USart1_Init(9600)&lt;br /&gt;Delay_ms(10)&lt;br /&gt;DDRC  = $FF&lt;br /&gt;PORTC = $00&lt;br /&gt;msg = "Monkey API 1.0"&lt;br /&gt;strcat(msg, crlf)&lt;br /&gt;Usart1_Write_Text(msg)&lt;br /&gt;while true&lt;br /&gt; while USart1_Data_Ready=0&lt;br /&gt; wend&lt;br /&gt; key = USart1_Read&lt;br /&gt; select case ( key )&lt;br /&gt;   case "a","b","c","d","e","f","g","h"&lt;br /&gt;       pulse(key - "a")&lt;br /&gt;       USart1_Write_Text("OO!")&lt;br /&gt;   case "*"&lt;br /&gt;       USart1_Write_Text("OO!")&lt;br /&gt;   case else&lt;br /&gt;       USart1_Write_Text("AA!")&lt;br /&gt; end select&lt;br /&gt;wend&lt;br /&gt;end.&lt;/pre&gt;&lt;br /&gt;I used the demo version of the excellent &lt;a href="http://www.mcselec.com/index.php?option=com_content&amp;amp;task=view&amp;amp;id=14&amp;amp;Itemid=41"&gt;BASCOM-AVR&lt;/a&gt;. Yes it's BASIC. So what?  &lt;strong&gt;Server-side software&lt;/strong&gt; Back in the comfortable world of Java, only the dirty details of connecting to the chimperface's serial port remained. I was somewhat pissed to discover that &lt;a href="http://java.sun.com/products/javacomm/"&gt;javax.comm&lt;/a&gt; only supports Unix boxes these days. Luckily, the fine folks at &lt;a title="RXTX" href="http://users.frii.com/jarvi/rxtx/index.html"&gt;rxtx&lt;/a&gt; stepped in to plug the gap.&lt;br /&gt;&lt;h4&gt;Code&lt;/h4&gt;&lt;br /&gt;The chimperface unit tests look like this:&lt;br /&gt;&lt;pre&gt;package com.volutio.ma.chimp.io.test;&lt;br /&gt;&lt;br /&gt;import org.junit.Assert;&lt;br /&gt;import org.junit.BeforeClass;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;&lt;br /&gt;import com.volutio.ma.chimp.Chimp;&lt;br /&gt;import com.volutio.ma.chimp.ChimpException;&lt;br /&gt;&lt;br /&gt;public class ChimpTest {&lt;br /&gt;&lt;br /&gt; private static Chimp s_chimp = null;&lt;br /&gt;&lt;br /&gt; @BeforeClass&lt;br /&gt; public static void setup() throws ChimpException {&lt;br /&gt;     s_chimp = Chimp.discoverChimp();&lt;br /&gt;     Assert.assertNotNull(s_chimp);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void goNuts() throws ChimpException {&lt;br /&gt;     s_chimp.rollEyes();&lt;br /&gt;     s_chimp.makeBirdSong();&lt;br /&gt;     s_chimp.actFurious();&lt;br /&gt;     s_chimp.actRandy();&lt;br /&gt;     s_chimp.actTerrified();&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Production code looks more like this:&lt;br /&gt;&lt;pre&gt;public ChimpConsole() throws ChimpException {&lt;br /&gt; // Create chimp&lt;br /&gt; _chimp = Chimp.discoverChimp();&lt;br /&gt; if (_chimp == null) {&lt;br /&gt;     throw new ChimpException("No chimp available");&lt;br /&gt; }&lt;br /&gt; // Add sniffers&lt;br /&gt; _sniffers.add(new NewUserActivatedChimpSniffer().register(this).startSniffing());&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;br /&gt;That's it! For the future, I'll do a proper wiring job on the controller for greater monkey expressiveness. If there's even the slightest interest (you never know), I'll provide schematics so you can pimp your own chimp in safety.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6904171798055259108-2192497530527374534?l=robotmonkeypimping.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robotmonkeypimping.blogspot.com/feeds/2192497530527374534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6904171798055259108&amp;postID=2192497530527374534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/2192497530527374534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6904171798055259108/posts/default/2192497530527374534'/><link rel='alternate' type='text/html' href='http://robotmonkeypimping.blogspot.com/2007/07/here-in-ikordo-offices-were-faced-with.html' title=''/><author><name>Ian Bishrey</name><uri>http://www.blogger.com/profile/17277452375274420902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://lh3.ggpht.com/_yHC2Sm6zvK4/Stis3BZusUI/AAAAAAAACJk/5OAP9lUknIk/avatar-crop.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_yHC2Sm6zvK4/Royyhay6OdI/AAAAAAAAAP0/IZojLIiLsVc/s72-c/chimperface.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
