{"id":1179,"date":"2017-09-29T13:56:21","date_gmt":"2017-09-29T12:56:21","guid":{"rendered":"http:\/\/ofalcao.pt\/blog\/?p=1179"},"modified":"2017-09-29T13:56:41","modified_gmt":"2017-09-29T12:56:41","slug":"a-snap-extension-for-wedo-1-0","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2017\/a-snap-extension-for-wedo-1-0","title":{"rendered":"A Snap! extension for WeDo 1.0"},"content":{"rendered":"<p>Yesterday I returned to Snap! to fast write a LEGO WeDo 1.0 extension.<\/p>\n<p>It just requires two files:<\/p>\n<ul>\n<li>A python script that implements a very basic HTTP server that exposes the WeDo 1.0 methods from WeDoMaster library.<\/li>\n<li>A xml file containg 3 Snap! custom blocks (motor, tilt sensor and distance sensor)<\/li>\n<\/ul>\n<p>It works on Raspberry Pi so anyone that wants to use the LEGO WeDo 1.0 just need an RPi and a browser with internet access. I used a Raspberry Pi Zero W so just a USB Hub with microUSB port and a power source is needed.<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"Snap! extension for WeDo 1.0  - quick example\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/KnzAiFDyu7c?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><\/div>\n<p>Source and details at github project <a href=\"https:\/\/github.com\/JorgePe\/SnapWeDo1\">SnapWeDo1<\/a>.<\/p>\n<p>Big thanks to:<\/p>\n<ul>\n<li>Connor Hudson (AKA <a href=\"https:\/\/github.com\/technoboy10\">technoboy10<\/a>) that wrote <a href=\"https:\/\/github.com\/technoboy10\/snap-server\">snap-server<\/a><\/li>\n<li>Ian Daniher (AKA <a href=\"https:\/\/github.com\/itdaniher\">itdaniher<\/a>) that wrote <a href=\"https:\/\/github.com\/itdaniher\/WeDoMore\">WeDoMore<\/a><\/li>\n<li><a class=\"profileLink\" href=\"https:\/\/www.facebook.com\/jetro.dechateau?fref=gs&amp;dti=538804472954163&amp;hc_location=group\" data-hovercard=\"\/ajax\/hovercard\/user.php?id=1287251331&amp;extragetparams=%7B%22fref%22%3A%22gs%22%2C%22directed_target_id%22%3A538804472954163%2C%22dti%22%3A538804472954163%2C%22hc_location%22%3A%22group%22%7D\" data-hovercard-prefer-more-content-show=\"1\">Jetro de Ch\u00e2teau<\/a> and <a class=\"profileLink\" href=\"https:\/\/www.facebook.com\/marina.tarusello?fref=gs&amp;dti=538804472954163&amp;hc_location=group\" data-hovercard=\"\/ajax\/hovercard\/user.php?id=716835984&amp;extragetparams=%7B%22fref%22%3A%22gs%22%2C%22directed_target_id%22%3A538804472954163%2C%22dti%22%3A538804472954163%2C%22hc_location%22%3A%22group%22%7D\" data-hovercard-prefer-more-content-show=\"1\">Marina Tarusello<\/a>\u00a0 who gave me the idea<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I returned to Snap! to fast write a LEGO WeDo 1.0 extension. It just requires two files: A python script that implements a very basic HTTP server that exposes the WeDo 1.0 methods from WeDoMaster library. A xml file containg 3 Snap! custom blocks (motor, tilt sensor and distance sensor) It works on Raspberry &hellip; <a href=\"https:\/\/ofalcao.pt\/blog\/2017\/a-snap-extension-for-wedo-1-0\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;A Snap! extension for WeDo 1.0&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[98,1,25,265],"tags":[213,314],"series":[],"class_list":["post-1179","post","type-post","status-publish","format-standard","hentry","category-python","category-sem-categoria","category-snap","category-wedo","tag-snap","tag-wedo-1-0"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-j1","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/comments?post=1179"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1179\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=1179"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}