{"id":1201,"date":"2017-10-05T22:44:17","date_gmt":"2017-10-05T21:44:17","guid":{"rendered":"http:\/\/ofalcao.pt\/blog\/?p=1201"},"modified":"2017-10-05T22:44:17","modified_gmt":"2017-10-05T21:44:17","slug":"some-findings-with-interface-a","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2017\/some-findings-with-interface-a","title":{"rendered":"Some findings with Interface A"},"content":{"rendered":"<div class=\"seriesmeta\">This post is part 3 of 4 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/lego-interface-a\" class=\"series-317\" title=\"LEGO Interface A\">LEGO Interface A<\/a><\/div><p>Controlling motor or lamps is easy, just change the state of a bit and the output changes accordingly. I made a simple cable adapter to use 9V devices so I can use more recent motors, even Power Functions 1.0 motors and LED&#8217;s. The PF Medium Motor works fine, just a bit more slow because maximum voltage is around 4.5V instead of 9V.<\/p>\n<p>Read sensors is not so simple. When idle they are always high. When I shorted them the green LED blinks very quickly and then returns to high again.<\/p>\n<p>I have an optosensor and it changes when passing a yellow brick at front (according to the user guides, the optosensor seems to react better to yellow) and it also changes when passing my hand between it and a light source or when pointing a ligth source directly to it. But it doesn&#8217;t &#8220;keep&#8221; that state, after a second or two it returns to high.<\/p>\n<p>So I thing the sensor inputs react only to change, perhaps through a capacitor.<\/p>\n<p>Using the same cable adapter I can use the RCX touch sensors with the Interface A<\/p>\n<figure style=\"width: 262px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-large\" src=\"https:\/\/i0.wp.com\/img.bricklink.com\/ItemImage\/PN\/9\/879.png?resize=262%2C240&#038;ssl=1\" width=\"262\" height=\"240\" \/><figcaption class=\"wp-caption-text\">879 Touch Sensor<\/figcaption><\/figure>\n<p>It works but it seems to only detect releases, not presses.<\/p>\n<p>So for the inputs to be usefull we might have to take in account more than just the current state. And perhaps a counter also helps.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"seriesmeta\">This post is part 3  of 4 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/lego-interface-a\" class=\"series-317\" title=\"LEGO Interface A\">LEGO Interface A<\/a><\/div><p>Controlling motor or lamps is easy, just change the state of a bit and the output changes accordingly. I made a simple cable adapter to use 9V devices so I can use more recent motors, even Power Functions 1.0 motors and LED&#8217;s. The PF Medium Motor works fine, just a bit more slow because maximum &hellip; <a href=\"https:\/\/ofalcao.pt\/blog\/2017\/some-findings-with-interface-a\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;Some findings with Interface A&#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":[1],"tags":[],"series":[317],"class_list":["post-1201","post","type-post","status-publish","format-standard","hentry","category-sem-categoria","series-lego-interface-a"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-jn","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1201","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=1201"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1201\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=1201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=1201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=1201"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=1201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}