{"id":400,"date":"2013-11-27T14:13:51","date_gmt":"2013-11-27T21:13:51","guid":{"rendered":"http:\/\/www.michaelkeating.com\/wordpress\/?p=400"},"modified":"2013-12-19T14:29:47","modified_gmt":"2013-12-19T21:29:47","slug":"numato-relay-on-x","status":"publish","type":"post","link":"https:\/\/www.michaelkeating.com\/wordpress\/2013\/11\/27\/numato-relay-on-x\/","title":{"rendered":"Numato &#8220;relay on x&#8221;"},"content":{"rendered":"<h3>Problem<\/h3>\n<p><a href=\"http:\/\/numato.com\/productdoc\/usbrelay16\/16ChannelUSBRelayModule.pdf\">Documentation from Numato<\/a> says that in order to turn on an individual relay on their <a href=\"http:\/\/numato.com\/16-channel-usb-relay-module\" title=\"Numato 16 Channel USB Relay Module\">URMC16 USB Relay Module<\/a>, users should send the command, <code>relay on x<\/code>. This command, they say,<br \/>\n<code>Turns a particular relay on. The parameter \u201cx\u201c stands for the relay number. The relay number starts from zero. See some examples below.<br \/>\nrelay on 0 \u2013 Turns on relay 0<br \/>\nrelay on 1 \u2013 Turns on relay 1<\/code><\/p>\n<p>That is all good for relays 0 through 9, but what about relays 10 through 15? Trying, for example, to turn on relay 12 with <code>relay on 12<\/code> led to relay 1, if it was off, being turned on. So the controller seems to be getting the first digit and ignoring everything after that.<\/p>\n<p>The next thought was that relays 10 through 15 would be addressed by their hex names, &#8216;a&#8217; through &#8216;f&#8217;, allowing them each to be referenced by a single character. But <code>relay on c<\/code> had no effect on any relays on the board.<\/p>\n<h3>Solution<\/h3>\n<p>After some frustrating searches, I finally found what appeared to be an older version of their documentation. In the older version, they give examples of commands sent to switch the higher-addressed relays, and <code>relay on C<\/code> was what I needed. The address character needs to be in UPPERCASE. I sure wish they would have included that in the documentation.<\/p>\n<p>All related posts will be in the <a href=\"https:\/\/www.michaelkeating.com\/wordpress\/category\/pythonnumato\/\" title=\"Category: Python and Numato\">&#8220;pythonnumato&#8221; category<\/a>.<\/p>\n<p><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-6623658596914203\";\n\/* Horizontal Post *\/\ngoogle_ad_slot = \"8678316391\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Problem Documentation from Numato says that in order to turn on an individual relay on their URMC16 USB Relay Module, users should send the command, relay on x. This command, they say, Turns a particular relay on. The parameter \u201cx\u201c stands for the relay number. The relay number starts from zero. See some examples below&#8230;.<!-- AddThis Advanced Settings generic via filter on wp_trim_excerpt --><!-- AddThis Share Buttons generic via filter on wp_trim_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[54],"tags":[70,56,55,69,57],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-pythonnumato","tag-actuate","tag-numato","tag-python","tag-relay","tag-usb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2Q7kW-6s","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":8,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/posts\/400\/revisions\/409"}],"wp:attachment":[{"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.michaelkeating.com\/wordpress\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}