{"id":136,"date":"2012-07-30T22:09:52","date_gmt":"2012-07-30T12:39:52","guid":{"rendered":"http:\/\/davidmonro.net\/blog\/?p=136"},"modified":"2015-01-10T12:26:28","modified_gmt":"2015-01-10T12:26:28","slug":"woot-cc128-rpi-mqtt","status":"publish","type":"post","link":"https:\/\/blog.davidmonro.net\/index.php\/2012\/07\/30\/woot-cc128-rpi-mqtt\/","title":{"rendered":"Woot! cc128 -> rPi -> mqtt!"},"content":{"rendered":"<p>Got my 2nd raspberry pi today. Coinciding with the discovery that pin 10 on the arduino board I was going to use to submit data from the currentcost cc128 meter to mqtt seems to have a duff pin 10 (which makes it rather hard to use the ethernet shield), I decided to see if I could instead have the 3.3v RS232 from the cc128 drive the 3.3v RS232 on the raspberry pi (through 2 gates of a CD4049 running from the rPi 3.3V rail to protect the rPi if something went wrong). After finding an old floppy cable to rip apart and bodging together a LEGO case (based on the design by <a href=\"http:\/\/www.raspberrypi.org\/archives\/1354\">Biz<\/a> but hacked because of the\u00c2\u00a0 over-sized connector I&#8217;ve used for the i\/o port), it was a matter of &#8220;apt-get install mosquitto-clients python-serial&#8221;, copy the script over from the server currently doing the job (which has a long unreliable USB cable to the cc128), hack it to send the data to the server rather than localhost, and voila! works first time.<\/p>\n<p>Disturbingly this actually costs less than an arduino + ethernet shield. The form factor is a little more awkward though (ports at both ends of the board, no screw holes), so getting it into a case along with other bits and pieces will be somewhat more awkward; ideally it would be good to have a tall case with enough room in the upper part to hold a pcb for additional components.<\/p>\n<p><a href=\"https:\/\/www.flickr.com\/photos\/davidmonro\/7676240584\/\" title=\"rPi + cc128 by davidmonro, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm9.staticflickr.com\/8293\/7676240584_0d6fda50d9.jpg\" width=\"299\" height=\"500\" alt=\"rPi + cc128\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got my 2nd raspberry pi today. Coinciding with the discovery that pin 10 on the arduino board I was going to use to submit data from the currentcost cc128 meter to mqtt seems to have a duff pin 10 (which makes it rather hard to use the ethernet shield), I decided to see if I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":1,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.davidmonro.net\/index.php\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}