{"id":2217,"date":"2024-02-06T18:01:01","date_gmt":"2024-02-06T10:01:01","guid":{"rendered":""},"modified":"2024-02-06T18:01:01","modified_gmt":"2024-02-06T10:01:01","slug":"\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210----\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)","status":"publish","type":"post","link":"https:\/\/mushiming.com\/2217.html","title":{"rendered":"\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210----\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u7b2c\u4e8c\u7ae0 \u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210<\/h2>\n

\u7b2c\u4e00\u7ae0 \u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4bGPIO\u53e3\u7684\u64cd\u4f5c
\u7b2c\u4e8c\u7ae0 \u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210<\/p>\n


\n
\n

\u6587\u7ae0\u76ee\u5f55<\/h4>\n
    \n
  • \u7b2c\u4e8c\u7ae0 \u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210<\/li>\n
  • \u524d\u8a00<\/li>\n
  • \u4e00\u3001\u4ec0\u4e48\u662fPWM\u6ce2<\/li>\n
  • \u4e8c\u3001\u6811\u8393\u6d3e\u4f7f\u7528Python\uff08RPi\u5e93\uff09\u751f\u6210PWM\u6ce2<\/li>\n
  • \n
      \n
    • 1.\u5f15\u5165\u5e93\u53ca\u6d4b\u8bd5<\/li>\n
    • 2.\u7f16\u5199\u751f\u6210PWM\u6ce2\u7684\u7a0b\u5e8f<\/li>\n
    • 3.\u66f4\u6539\u9891\u7387\u53ca\u5360\u7a7a\u6bd4<\/li>\n<\/ul>\n<\/li>\n
    • \u4e09\u3001\u6811\u8393\u6d3e\u4f7f\u7528Python\uff08pigpio\u5e93\uff09\u751f\u6210PWM\u6ce2<\/li>\n
    • \n
        \n
      • 1.\u542f\u52a8\u5b88\u62a4\u8fdb\u7a0b<\/li>\n
      • 2.\u7f16\u5199\u7a0b\u5e8f<\/li>\n<\/ul>\n<\/li>\n
      • \u603b\u7ed3<\/li>\n<\/ul>\n<\/div>\n
        \n

        \u524d\u8a00<\/h2>\n

        \u4e0a\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86\u4e09\u79cdGPIO\u7684\u64cd\u63a7\u65b9\u5f0f\uff0c\u4eca\u5929\u5219\u4e3a\u5927\u5bb6\u5e26\u6765pwm\u6ce2\u7684\u751f\u6210\u65b9\u6cd5\uff0cpwm\u6ce2\u662f\u786c\u4ef6\u63a7\u5236\u4e2d\u4e00\u79cd\u5f88\u91cd\u8981\u7684\u6ce2\u5f62\uff0c\u63a5\u4e0b\u6765\u6211\u5148\u4ecb\u7ecd\u4e00\u4e0b\u5b83<\/font><\/p>\n


        \n

        \u4e00\u3001\u4ec0\u4e48\u662fPWM\u6ce2<\/h2>\n

        PWM\u7684\u82f1\u6587\u5168\u79f0\u662f\"Pulse Width Modulation\"\uff0c\u4e2d\u6587\u7ffb\u8bd1\u4e3a\"\u8109\u51b2\u5bbd\u5ea6\u8c03\u5236\"\u3002PWM\u7684\u6ce2\u5f62\u662f\u4e00\u79cd\u5468\u671f\u56fa\u5b9a\u7684\u3001\u5bbd\u5ea6\u53ef\u8c03\u7684\u65b9\u6ce2\u3002
        pwm\u6ce2\u6709\u4e24\u4e2a\u91cd\u70b9\u53c2\u6570\uff1a<\/p>\n

        1\uff09PWM\u65b9\u6ce2\u7684\u5468\u671f<\/p>\n

        2\uff09PWM\u65b9\u6ce2\u7684\u5360\u7a7a\u6bd4<\/p>\n

        \u7528\u8fd9\u4e24\u4e2a\u53c2\u6570\u5373\u53ef\u8868\u793a\u4efb\u610f\u4e00\u4e2apwm\u6ce2\"\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210----\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)
        \u8fd9\u662f\u7b14\u8005\u7528\u793a\u6ce2\u5668\u68c0\u6d4b\u7684\u4e00\u4e2apwm\u6ce2\uff0c\u662f\u4e00\u4e2a\u9891\u7387\u4e3a50Hz\uff0c\u5360\u7a7a\u6bd4\u4e3a30%\u7684PWM\u6ce2\u3002
        \u4f7f\u7528pwm\u6ce2\u53ef\u4ee5\uff1a
        1\uff09\u63a7\u5236\u7535\u673a\u7684\u8f6c\u901f
        2\uff09\u63a7\u5236\u8235\u673a\u89d2\u5ea6
        3\uff09\u63a7\u5236led\u547c\u5438\u706f\uff0c\u6216\u8005\u8bbe\u7f6e\u4e3a\u9694\u51e0\u79d2\u95ea\u70c1\u4e00\u4e0b\u3002
        4\uff09\u5176\u4ed6\u5e95\u5c42\u786c\u4ef6\u63a7\u5236<\/p>\n

        \u4e8c\u3001\u6811\u8393\u6d3e\u4f7f\u7528Python\uff08RPi\u5e93\uff09\u751f\u6210PWM\u6ce2<\/h2>\n

        1.\u5f15\u5165\u5e93\u53ca\u6d4b\u8bd5<\/h3>\n

        \"\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210----\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)
        \u9996\u5148\u6211\u4eec\u6253\u5f00\u6811\u8393\u6d3e\u81ea\u5e26Python IDE\u2014\u2014mu<\/p>\n

        import<\/span> RPi.<\/span>GPIO  as<\/span> GPIO #\u6ce8\u610f\u8fd9\u91cc\u7684i\u662f\u5c0f\u5199=.=<\/span>\nGPIO.<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2\u751f\u6210----\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)\u6811\u8393\u6d3e\u786c\u4ef6\u63a7\u5236\u5b66\u4e60\u7b14\u8bb0(\u4e8c)\u7b2c\u4e8c\u7ae0\u786c\u4ef6\u63a7\u5236\u5165\u95e8\u4e4b\u6811\u8393\u6d3ePWM\u6ce2...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/2217"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=2217"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/2217\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=2217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=2217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=2217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}