{"id":881,"date":"2012-10-23T02:41:10","date_gmt":"2012-10-22T15:41:10","guid":{"rendered":"http:\/\/usabledevices.com\/ud\/?p=881"},"modified":"2016-09-09T09:27:55","modified_gmt":"2016-09-09T09:27:55","slug":"swarmrobot-infrared-remote-control","status":"publish","type":"post","link":"http:\/\/usabledevices.com\/ud\/2012\/10\/swarmrobot-infrared-remote-control\/","title":{"rendered":"SwarmRobot InfraRed remote control"},"content":{"rendered":"<p><object width=\"480\" height=\"400\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\" align=\"middle\"><param name=\"src\" value=\"http:\/\/player.youku.com\/player.php\/sid\/XNDY1MzAyOTgw\/v.swf\" \/><param name=\"allowfullscreen\" value=\"true\" \/><param name=\"quality\" value=\"high\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><embed width=\"480\" height=\"400\" type=\"application\/x-shockwave-flash\" src=\"http:\/\/player.youku.com\/player.php\/sid\/XNDY1MzAyOTgw\/v.swf\" allowfullscreen=\"true\" quality=\"high\" allowscriptaccess=\"always\" align=\"middle\" \/><\/object><\/p>\n<p>The video shows three SwarmRobots being controlled by one InfraRed signal &#8211; sorry for the poor video quality.<\/p>\n<p>Looking at ways to have some sort of SwarmRobot display for MakerCarnival in Shanghai in early November, found <a title=\"AtTiny2313 RC5 IR decoder\" href=\"https:\/\/github.com\/lucsmall\/Philips-RC5-Infrared-Remote-Control-Receiver-for-the-AVR\">this AtTiny 2313 code<\/a> which can decode RC5 IR. It compiled, loaded and ran (verified looking at serial data output), but it did not detect IR from several different remote controls tried.<\/p>\n<p>Using <a title=\"Arduino multi protocol Infrared Remote Control\" href=\"http:\/\/www.arcfn.com\/2009\/08\/multi-protocol-infrared-remote-library.html\">this Arduino code<\/a>, (which uses some really nice multi-protocol IR receive and transmit libraries) it was discovered that all the remote controls used where NEC protocol, not RC5! Research indicates the NEC protocol is very common in Asia!<\/p>\n<p>Rather than find NEC code for the AtTiny, or write code decode NEC, I used the above library to send RC5 and now a SwarmRobot can receive commands and as the shows, several SwarmRobots can be controlled at the same time! Kept using RC5 because it actually sends two sets of information an ID and a command, so this really fits controlling robot X to do command Y, or group z of robots to all do same command.<\/p>\n<p>The code is on GitHub:\u00a0<a title=\"SwarmRobot InfraRed Remote Control code\" href=\"https:\/\/github.com\/xinchejian\/SwarmRobots\/tree\/master\/AtTiny2313\/software\/SwarmIRControl\">SwarmRobot AtTiny2313<\/a> and the <a title=\"Arduino InfraRed RC5 transmitter\" href=\"https:\/\/github.com\/xinchejian\/SwarmRobots\/tree\/master\/AtTiny2313\/software\/SwarmIRControllerArduino\">Arduino transmitter<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The video shows three SwarmRobots being controlled by one InfraRed signal &#8211; sorry for the poor video quality. Looking at ways to have some sort of SwarmRobot display for MakerCarnival in Shanghai in early November, found this AtTiny 2313 code which can decode RC5 IR. It compiled, loaded and ran (verified looking at serial data &hellip; <a href=\"http:\/\/usabledevices.com\/ud\/2012\/10\/swarmrobot-infrared-remote-control\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SwarmRobot InfraRed remote control&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,11,13,17],"tags":[63,66,69],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-hardware","category-making","category-open-source","category-project-or-device","tag-robot","tag-sensor","tag-swarm"],"_links":{"self":[{"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/comments?post=881"}],"version-history":[{"count":1,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":1342,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/posts\/881\/revisions\/1342"}],"wp:attachment":[{"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/media?parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/categories?post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/usabledevices.com\/ud\/wp-json\/wp\/v2\/tags?post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}