{"id":2220,"date":"2016-03-17T16:25:18","date_gmt":"2016-03-17T08:25:18","guid":{"rendered":"https:\/\/gergely.imreh.net\/blog\/?p=2220"},"modified":"2016-03-17T16:25:20","modified_gmt":"2016-03-17T08:25:20","slug":"scratch-robot-itch","status":"publish","type":"post","link":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/","title":{"rendered":"Scratch Your Robot Itch"},"content":{"rendered":"<p>Recently I&#8217;ve been experimenting with the <a href=\"https:\/\/scratch.mit.edu\/\">Scratch programming language<\/a>, created by the Lifelong Kindergarten Group at MIT. It&#8217;s a fun environment that uses visual programming: drag-and-drop pieces of code blocks, and control objects on a stage, and the stage itself. It has quite a bit more depth to it, than the expression &#8220;visual programming language&#8221; implies, with it&#8217;s internal messaging system, multitasking, and event-driven approach. While it was originally aimed at creating interactive graphics and animations (see <a href=\"http:\/\/ted.com\/talks\/mitch_resnick_let_s_teach_kids_to_code\">this TEDx talk by Prof. Mitch Resnick<\/a>\u00a0on the background), it is now evolving into new territories with the <a href=\"http:\/\/scratchx.org\/\">Scratch Experimental Extensions<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>The Experimental Extensions define <a href=\"https:\/\/github.com\/LLK\/scratchx\/wiki\">a smallish API<\/a>, which can be used to create custom programming blocks to be used in Scratch. All it needs is a Javascript file (currently) hosted on Github with a few pre-defined code blocks to unlock any sort of functionality. This creates a possibility to easily tap into any kind of web API or interface any hardware that can be addressed somehow through Javascript. There are <a href=\"http:\/\/scratchx.org\/#extensions\">a large number of examples<\/a>\u00a0already, and I wanted to see how easy or hard it is to create such an extension for a robot that happened to be around <a href=\"http:\/\/www.viatech.com\">here at VIA<\/a>.<\/p>\n<h2>The Robot<\/h2>\n<p>Some of the engineers at VIA have built a small robot using bits and pieces found in the lab: a dual-core ARM-based engineering sample control board, smart battery from another project, some wheels from a commercial robot (Rovio&#8217;s 3-wheel system a few years back), and I think some office supplies.<\/p>\n<figure id=\"attachment_2226\" aria-describedby=\"caption-attachment-2226\" style=\"width: 604px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/2016-03-17-15-13-06-min\/\" rel=\"attachment wp-att-2226\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2226 size-large\" src=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-15.13.06-min-1024x715.jpg\" alt=\"Hacked-together robot from the lab\" width=\"604\" height=\"422\" srcset=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-15.13.06-min-1024x715.jpg 1024w, https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-15.13.06-min-500x349.jpg 500w, https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-15.13.06-min-768x536.jpg 768w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><figcaption id=\"caption-attachment-2226\" class=\"wp-caption-text\">Hacked-together robot from the lab<\/figcaption><\/figure>\n<p>The robot&#8217;s operating system creates an access point (with the Wi-Fi USB stick on the upper right of the picture), and hosts a webpage that can be used to control the <strong>movements<\/strong> (back\/forth\/left\/right), as well as <strong>streaming video<\/strong> (or more precisely <a href=\"https:\/\/en.wikipedia.org\/wiki\/Motion_JPEG\">Motion JPEG<\/a>) from the camera in the front (lower left, the little black square on top of the white sticky pad).\u00a0Besides the control board, there&#8217;s some voltage converter and battery-control circuits, off-the-shelf pieces by the look of them, with minor modifications (such as an LED to see when the battery is out of power).<\/p>\n<p>It is as hacky as it gets, but all that is needed to have some fun.<\/p>\n<h2>Controlling Through Scratch<\/h2>\n<p>While the built in webpage to control the robot is very handy, and can be used from any device that has a browser (computer, smartphone, I guess could even control it from a <a href=\"https:\/\/gergely.imreh.net\/blog\/2012\/10\/laboratory-2-0-a-monitoring-system\/\">Kindle<\/a>), it has it&#8217;s limitation: I need to click on buttons to get things done, and nothing can be really automated. Still, the underlying API is a good start to do more interesting things.<\/p>\n<p>The API is very hacky too, and that&#8217;s just fine like that. Looking at the built in webpage, I could see that there are a handful of <a href=\"http:\/\/www.w3schools.com\/tags\/ref_httpmethods.asp\">GET requests<\/a>\u00a0to a specific URL to <span class=\"lang:default decode:true crayon-inline \">move_forward<\/span>\u00a0, or <span class=\"lang:default decode:true crayon-inline\">turn_left<\/span>\u00a0 or <span class=\"lang:default decode:true crayon-inline\">stop<\/span>\u00a0. That&#8217;s straightforward enough, and it does not take more than a couple of minutes to cook up a proof of concept Python script using <a href=\"https:\/\/docs.python.org\/2\/library\/urllib2.html\">requests<\/a> to try these endpoints.<\/p>\n<p>Once that worked, I followed the <a href=\"https:\/\/github.com\/LLK\/scratchx\/wiki\">Scratch Extension documentation<\/a>\u00a0and some of the examples linked from the site to creating a Javascript module to implement these movement commands.<\/p>\n<figure id=\"attachment_2221\" aria-describedby=\"caption-attachment-2221\" style=\"width: 604px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2221 size-large\" src=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1-1024x640.png\" alt=\"Scratch script for robot control\" width=\"604\" height=\"378\" srcset=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1-1024x640.png 1024w, https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1-500x313.png 500w, https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1-768x480.png 768w, https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/ScratchRobot1.png 1280w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><figcaption id=\"caption-attachment-2221\" class=\"wp-caption-text\">Example Scratch script to control the robot, samba moves included (click for full size)<\/figcaption><\/figure>\n<p>It didn&#8217;t take too many iterations to add the blocks like &#8220;move forward for X seconds&#8221; and so on for the other movements. I&#8217;ve created a basic project to show how these work, where the robot moves following the directional arrows: forward\/backward, and turning with left\/right. Figured out that 0.5 turning is about 45\u00b0, so the arrow in the screen can sort of follow the direction of the robot in the physical world. For good measure I&#8217;ve also added a complex block of &#8220;samba&#8221; steps (I&#8217;m sorry, haven&#8217;t been doing samba for years, but that&#8217;s what it reminds me of), which is triggered by pressing &#8220;s&#8221; on the keyboard. Here&#8217;s a demo of the robot controlled through Scratch:<\/p>\n<p><iframe loading=\"lazy\" title=\"Robot control with Scratch\" width=\"580\" height=\"326\" src=\"https:\/\/www.youtube.com\/embed\/TrbbcAt2srY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The source code naturally is <a href=\"https:\/\/github.com\/imrehg\/viarobot\">available on Github<\/a>, both the module and an example Scratch project.<\/p>\n<h2>Lessons Learned<\/h2>\n<p>Provided that you have a bit of Javascript knowledge, it&#8217;s super easy to create new scratch extensions. The platform is very quite well thought out and flexible. That code can be so easily included from public sources is very handy. They also make <a href=\"https:\/\/jquery.com\/\">jQuery<\/a>\u00a0available from within the scripts so that helps with simplifying code generally (especially working with web APIs).<\/p>\n<p>The experience also showed me how important is the firmware in the case of hardware control. For example the current firmware on the robot never thought of their API being called outside of the browser, thus I&#8217;ve run into &#8220;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Access_control_CORS\">Access-Control-Allow-Origin<\/a>&#8221; issues. It doesn&#8217;t make things unworkable, but something that needs to be worked around. There are other robots that have extensions available, as well as an extension to control Arduino: that&#8217;s also available only because of a specific firmware, <a href=\"https:\/\/github.com\/firmata\/arduino\">Firmata<\/a>\u00a0to create a proper API for controlling the boards.<\/p>\n<p>Since the Javascript modules need to be committed to git, pushed to Github, and the Scratch page reloaded, it helps a lot to run the module through <a href=\"https:\/\/github.com\/reid\/node-jslint\">jslint<\/a>\u00a0to catch at least the syntax errors (or have an IDE that can do that for you).<\/p>\n<h2>Future Ideas<\/h2>\n<p>I got enough taste of Scratch to come back for more. There are a couple of ideas that I&#8217;d like to figure out in the future, specific to this robot project and otherwise:<\/p>\n<p>I&#8217;m not using some of the <strong>reserved functions<\/strong> of Scratch Extension modules, \u00a0the <span class=\"lang:default decode:true  crayon-inline \">_getStatus()<\/span>\u00a0 function in particular, that could show whether or not the robot is connected. Should add that functionality to this robot module, though it is not yet clear to me how things should work.<\/p>\n<p>Would be great to be able to bring the <strong>video stream<\/strong> into Scratch. I see functionality to enable the webcam on the computer, but the modules can&#8217;t control graphics as far as I can tell yet. This would enable a lot of interesting use cases. Especially if coupled with transparent overlays. I can imagine video streams from the robot as a cockpit image, or adding facial expressions to a &#8220;matchstick person&#8221; using a webcam and image processing&#8230;<\/p>\n<p>Scratch is also very good with internationalization (i18n), as it has <strong>translations<\/strong> in dozens of languages. The current extensions cannot be translated yet, as far as I can tell, so every extension is just single language. It could be interesting, and likely demanding, to add for example <a href=\"https:\/\/en.wikipedia.org\/wiki\/Gettext\">gettext style translations<\/a> to the extensions, one way \u00a0i18n is done in lots of projects these days.<\/p>\n<hr \/>\n<p>Have you used Scratch for any of your projects? Have you made an extension for it or thinking about making one? Would love to hear your experience!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.<\/p>\n","protected":false},"author":1,"featured_media":2224,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[111,8],"tags":[60,189,188],"class_list":["post-2220","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-maker","category-prog","tag-javascript","tag-robot","tag-scratch"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Scratch Your Robot Itch - ClickedyClick<\/title>\n<meta name=\"description\" content=\"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scratch Your Robot Itch - ClickedyClick\" \/>\n<meta property=\"og:description\" content=\"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/\" \/>\n<meta property=\"og:site_name\" content=\"ClickedyClick\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/gergely.imreh\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/gergely.imreh\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-17T08:25:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-03-17T08:25:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"5376\" \/>\n\t<meta property=\"og:image:height\" content=\"3752\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gergely Imreh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@imrehg\" \/>\n<meta name=\"twitter:site\" content=\"@imrehg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gergely Imreh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/\"},\"author\":{\"name\":\"Gergely Imreh\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"headline\":\"Scratch Your Robot Itch\",\"datePublished\":\"2016-03-17T08:25:18+00:00\",\"dateModified\":\"2016-03-17T08:25:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/\"},\"wordCount\":1186,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"image\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/2016-03-17-14.38.22-min.jpg\",\"keywords\":[\"javascript\",\"robot\",\"Scratch\"],\"articleSection\":[\"Maker\",\"Programming\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/\",\"name\":\"Scratch Your Robot Itch - ClickedyClick\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/2016-03-17-14.38.22-min.jpg\",\"datePublished\":\"2016-03-17T08:25:18+00:00\",\"dateModified\":\"2016-03-17T08:25:20+00:00\",\"description\":\"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/2016-03-17-14.38.22-min.jpg\",\"contentUrl\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/03\\\/2016-03-17-14.38.22-min.jpg\",\"width\":5376,\"height\":3752},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/2016\\\/03\\\/scratch-robot-itch\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scratch Your Robot Itch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/\",\"name\":\"ClickedyClick\",\"description\":\"Life in real, complex and digital.\",\"publisher\":{\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/#\\\/schema\\\/person\\\/42391e2ae52c8ed76b37be509a5707b0\",\"name\":\"Gergely Imreh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\",\"caption\":\"Gergely Imreh\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g\"},\"description\":\"Physicist, hacker. Enjoys avant-guarde literature probably a bit too much. Open source advocate and contributor, both for software and hardware. Follow these posts on the Fediverse by @gergely@gergely.imreh.net\",\"sameAs\":[\"https:\\\/\\\/gergely.imreh.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/gergely.imreh\",\"https:\\\/\\\/www.instagram.com\\\/imrehg\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/gergelyimreh\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@GergelyImreh\"],\"url\":\"https:\\\/\\\/gergely.imreh.net\\\/blog\\\/author\\\/gergely\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Scratch Your Robot Itch - ClickedyClick","description":"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/","og_locale":"en_GB","og_type":"article","og_title":"Scratch Your Robot Itch - ClickedyClick","og_description":"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.","og_url":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/","og_site_name":"ClickedyClick","article_publisher":"https:\/\/www.facebook.com\/gergely.imreh","article_author":"https:\/\/www.facebook.com\/gergely.imreh","article_published_time":"2016-03-17T08:25:18+00:00","article_modified_time":"2016-03-17T08:25:20+00:00","og_image":[{"width":5376,"height":3752,"url":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg","type":"image\/jpeg"}],"author":"Gergely Imreh","twitter_card":"summary_large_image","twitter_creator":"@imrehg","twitter_site":"@imrehg","twitter_misc":{"Written by":"Gergely Imreh","Estimated reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#article","isPartOf":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/"},"author":{"name":"Gergely Imreh","@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"headline":"Scratch Your Robot Itch","datePublished":"2016-03-17T08:25:18+00:00","dateModified":"2016-03-17T08:25:20+00:00","mainEntityOfPage":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/"},"wordCount":1186,"commentCount":0,"publisher":{"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"image":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#primaryimage"},"thumbnailUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg","keywords":["javascript","robot","Scratch"],"articleSection":["Maker","Programming"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/","url":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/","name":"Scratch Your Robot Itch - ClickedyClick","isPartOf":{"@id":"https:\/\/gergely.imreh.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#primaryimage"},"image":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#primaryimage"},"thumbnailUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg","datePublished":"2016-03-17T08:25:18+00:00","dateModified":"2016-03-17T08:25:20+00:00","description":"Making a robot prototype dance with Scratch, a visual programming language, through experimental Javascript extensions.","breadcrumb":{"@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#primaryimage","url":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg","contentUrl":"https:\/\/gergely.imreh.net\/blog\/wp-content\/uploads\/2016\/03\/2016-03-17-14.38.22-min.jpg","width":5376,"height":3752},{"@type":"BreadcrumbList","@id":"https:\/\/gergely.imreh.net\/blog\/2016\/03\/scratch-robot-itch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gergely.imreh.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Scratch Your Robot Itch"}]},{"@type":"WebSite","@id":"https:\/\/gergely.imreh.net\/blog\/#website","url":"https:\/\/gergely.imreh.net\/blog\/","name":"ClickedyClick","description":"Life in real, complex and digital.","publisher":{"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gergely.imreh.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/gergely.imreh.net\/blog\/#\/schema\/person\/42391e2ae52c8ed76b37be509a5707b0","name":"Gergely Imreh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g","caption":"Gergely Imreh"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/1d5be311c5d616a3f4c7dfbc6b736ec817d2508b8c420ec29edb950d33fb4946?s=96&d=retro&r=g"},"description":"Physicist, hacker. Enjoys avant-guarde literature probably a bit too much. Open source advocate and contributor, both for software and hardware. Follow these posts on the Fediverse by @gergely@gergely.imreh.net","sameAs":["https:\/\/gergely.imreh.net\/","https:\/\/www.facebook.com\/gergely.imreh","https:\/\/www.instagram.com\/imrehg\/","https:\/\/www.linkedin.com\/in\/gergelyimreh\/","https:\/\/www.youtube.com\/@GergelyImreh"],"url":"https:\/\/gergely.imreh.net\/blog\/author\/gergely\/"}]}},"_links":{"self":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/comments?post=2220"}],"version-history":[{"count":16,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2220\/revisions"}],"predecessor-version":[{"id":2239,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/posts\/2220\/revisions\/2239"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/media\/2224"}],"wp:attachment":[{"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/media?parent=2220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/categories?post=2220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gergely.imreh.net\/blog\/wp-json\/wp\/v2\/tags?post=2220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}