{"id":253,"date":"2020-08-06T14:13:53","date_gmt":"2020-08-06T14:13:53","guid":{"rendered":"https:\/\/samndave.org.uk\/ourdoc\/?p=253"},"modified":"2025-07-10T16:11:34","modified_gmt":"2025-07-10T16:11:34","slug":"particle-hardware-pcf8574","status":"publish","type":"post","link":"https:\/\/samndave.org.uk\/index.php\/2020\/08\/06\/particle-hardware-pcf8574\/","title":{"rendered":"Particle hardware: PCF8574"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">See details about the PCF8574 board in the <a href=\"https:\/\/samndave.org.uk\/2020\/08\/01\/microbit-more-io-pins-pcf8574-binary-and-hex\/\">Micro:bit notes<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Write example, sets all inputs high then low:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;Wire.h>\n\nint PCF_ADDR = 0x20;\n\nvoid pcfSend(int a, unsigned int d) {\n    Wire.beginTransmission(a);\n    Wire.write(d);\n    Wire.endTransmission();\n    delay(100);\n}\n    \nvoid setup() {\n    Wire.begin();\n}\n\nvoid loop() {\n    pcfSend(PCF_ADDR, 0xFF);\n    delay(1000);\n    pcfSend(PCF_ADDR, 0x00);\n    delay(1000);\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>See details about the PCF8574 board in the Micro:bit notes. Write example, sets all inputs [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,29,30],"tags":[],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-hardware-notes","category-microcontrollers","category-particle"],"_links":{"self":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":1,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":1172,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/posts\/253\/revisions\/1172"}],"wp:attachment":[{"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samndave.org.uk\/index.php\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}