analogWrite(pin, val);]] ></ac:plain-text-body></ac:structured-macro></div></td><td><div class="content-wrapper"><p><ac:image ac:thumbnail="true" ac:width="250"><ri:attachment ri:filename="image2020-1-21_19-10-22.png" /></ac:image></p><p>Note : The example above shows pin 11 being used. We can't use a variable for pin number with Blocks</p></div></td></tr><tr><td colspan="1"><div class="content-wrapper">Using a constant (hard-coded) <em>val</em><ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="4000e7d5-af44-48c7-b887-ec5fc1416d61"><ac:parameter ac:name="theme">Confluence</ac:parameter><ac:plain-text-body><![CDATA[analogWrite(3, 128);]] ></ac:plain-text-body></ac:structured-macro></div></td><td colspan="1"><div class="content-wrapper"><p><ac:image ac:thumbnail="true" ac:width="230"><ri:attachment ri:filename="image2020-1-21_19-10-51.png" /></ac:image></p></div></td></tr></tbody></table><p><span style="color: rgb(0,0,0);">pin </span>– refers to the OUTPUT pin (limited to pins 3, 5, 6, 9, 10, 11.) – denoted by a ~ symbol</p><p>val – 8 bit value (0 – 255). </p><p>0 => 0V</p><p>255 => 5V </p><p><strong><ac:image ac:width="300"><ri:attachment ri:filename="image2019-7-31_17-14-47.png" /></ac:image></strong></p><p><br /><p><h3>Screencast</h3><p><ac:structured-macro ac:name="widget" ac:schema-version="1" ac:macro-id="692597cf-0ec1-4dcb-b2b2-a22d8bbb294f"><ac:parameter ac:name="url"><ri:url ri:value="http://youtube.com/watch?v=45P0fvZNbBs" /></ac:parameter></ac:structured-macro></p><p><br /></p> |