{"id":787,"date":"2011-01-12T21:28:07","date_gmt":"2011-01-12T10:28:07","guid":{"rendered":"http:\/\/www.madox.net\/blog\/?p=787"},"modified":"2011-01-12T21:28:07","modified_gmt":"2011-01-12T10:28:07","slug":"chumby-infocast-gpio-python-library","status":"publish","type":"post","link":"http:\/\/www.madox.net\/blog\/2011\/01\/12\/chumby-infocast-gpio-python-library\/","title":{"rendered":"Chumby Infocast GPIO Python Library"},"content":{"rendered":"<p>Just a quick and nasty python library for configuring\/reading\/writing to the GPIO header on the Chumby Infocast. \u00a0Probably can be adapted to be used on the Chumby Hackerboard quite easily.<\/p>\n<p>Source code here :-\u00a0<a href=\"http:\/\/code.google.com\/p\/madox\/source\/browse\/trunk\/chumby\/chumby.py?r=5\">http:\/\/code.google.com\/p\/madox\/source\/browse\/trunk\/chumby\/chumby.py?r=5<\/a><\/p>\n<p>Example usage :<\/p>\n<pre>chumby:\/mnt\/storage# python -i chumby.py<\/pre>\n<pre>&gt;&gt;&gt; import chumby<\/pre>\n<pre>&gt;&gt;&gt; gpio = chumby.GPIO()<\/pre>\n<pre>&gt;&gt;&gt; gpio.set_direction(0xFF)<\/pre>\n<pre>&gt;&gt;&gt; gpio.write_output(0xFF)<\/pre>\n<pre>&gt;&gt;&gt; gpio.clear_output(0xFF)<\/pre>\n<pre>&gt;&gt;&gt; gpio.set_output(0xFF)<\/pre>\n<pre>&gt;&gt;&gt; gpio.toggle_output(0x01)<\/pre>\n<pre>&gt;&gt;&gt; gpio.toggle_output(0x01)<\/pre>\n<pre>&gt;&gt;&gt; gpio.set_drive(0x55,0xAA)<\/pre>\n<p>Works quite well.  Need to tidy it up and maybe add i2c support&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a quick and nasty python library for configuring\/reading\/writing to the GPIO header on the Chumby Infocast. \u00a0Probably can be adapted to be used on the Chumby Hackerboard quite easily. Source code here :-\u00a0http:\/\/code.google.com\/p\/madox\/source\/browse\/trunk\/chumby\/chumby.py?r=5 Example usage : chumby:\/mnt\/storage# python -i chumby.py &gt;&gt;&gt; import chumby &gt;&gt;&gt; gpio = chumby.GPIO() &gt;&gt;&gt; gpio.set_direction(0xFF) &gt;&gt;&gt; gpio.write_output(0xFF) &gt;&gt;&gt; gpio.clear_output(0xFF) &gt;&gt;&gt; &hellip; <a href=\"http:\/\/www.madox.net\/blog\/2011\/01\/12\/chumby-infocast-gpio-python-library\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Chumby Infocast GPIO Python Library&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-787","post","type-post","status-publish","format-standard","hentry","category-engineering"],"_links":{"self":[{"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/posts\/787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/comments?post=787"}],"version-history":[{"count":2,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions"}],"predecessor-version":[{"id":789,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/posts\/787\/revisions\/789"}],"wp:attachment":[{"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/categories?post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.madox.net\/blog\/wp-json\/wp\/v2\/tags?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}