{"id":890,"date":"2020-12-13T11:26:59","date_gmt":"2020-12-13T10:26:59","guid":{"rendered":"https:\/\/www.biasedlogic.com\/?p=890"},"modified":"2020-12-13T11:26:59","modified_gmt":"2020-12-13T10:26:59","slug":"lego-classroom-for-ev3-bugs","status":"publish","type":"post","link":"https:\/\/biasedlogic.com\/index.php\/lego-classroom-for-ev3-bugs\/","title":{"rendered":"LEGO Classroom for EV3 bugs (Windows\/Android)"},"content":{"rendered":"\n<p>Lego has released their Classroom app for Windows\/Android. Which is great, as now you can actually do some serious programming on your Android tablet (previously you had to go for a full-fledged Windows system to get variables, custom blocks etc. pp.). And you get a scratch-like programming interface, which is helpful as Scratch is sort of beginner-standard in learning to code. However, this works only as long, as the software works as expected. Which it doesn&#8217;t.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Consider this code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/marekmicrosite6926.live-website.com\/wp-content\/uploads\/2020\/12\/Screenshot_20201206-225624_EV3-Classroom-600x375.jpg\" alt=\"\" class=\"wp-image-866\"\/><\/figure>\n\n\n\n<p>This does some calculation using reflected light value from the light sensor and displays the result on screen. This works exactly as expected. Since our math works, let&#8217;s go on with our program: Why not use the computed value to control motor speed?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/marekmicrosite6926.live-website.com\/wp-content\/uploads\/2020\/12\/Screenshot_20201206-225704_EV3-Classroom-600x375.jpg\" alt=\"\" class=\"wp-image-867\"\/><\/figure>\n\n\n\n<p>Cue the dramatic music: Badum, tsss&#8230; this does not work at all. The motor remains stationary. WTF?<\/p>\n\n\n\n<p>Just to check if there&#8217;s a problem with the value itself &#8211; Create a variable, save the calculated value, pass the variable to the motor:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/marekmicrosite6926.live-website.com\/wp-content\/uploads\/2020\/12\/Screenshot_20201206-225418_EV3-Classroom-600x375.jpg\" alt=\"\" class=\"wp-image-864\"\/><\/figure>\n\n\n\n<p>This all works as expected. So there&#8217;s a bug.<\/p>\n\n\n\n<p>The interesting aspect is that the same behavior is observed in Windows app as well as in the Android one. At least there&#8217;s consistency \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lego has released their Classroom app for Windows\/Android. Which is great, as now you can actually do some serious programming on your Android tablet (previously you had to go for a full-fledged Windows system to get variables, custom blocks etc. &hellip; <a href=\"https:\/\/biasedlogic.com\/index.php\/lego-classroom-for-ev3-bugs\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":815,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,8],"tags":[],"class_list":["post-890","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lego","category-mindstorms-ev3","category-rants-etc"],"_links":{"self":[{"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/posts\/890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/comments?post=890"}],"version-history":[{"count":0,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/posts\/890\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/media\/815"}],"wp:attachment":[{"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/media?parent=890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/categories?post=890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/biasedlogic.com\/index.php\/wp-json\/wp\/v2\/tags?post=890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}