{"id":2141,"date":"2013-02-10T21:53:07","date_gmt":"2013-02-10T21:53:07","guid":{"rendered":"http:\/\/178.62.14.192\/?p=2141"},"modified":"2013-02-10T21:53:07","modified_gmt":"2013-02-10T21:53:07","slug":"pwm-with-the-raspberrypi","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=2141","title":{"rendered":"PWM with the #RaspberryPi"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignleft\" alt=\"\" src=\"https:\/\/i0.wp.com\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA%3D%3D\/%24T2eC16h%2C%21y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG?resize=500%2C453\" width=\"500\" height=\"453\" \/>Over at RaspiRobot, Peter Mansvelder has used an L298N H bridge module to generate PWM signals from the Pi<\/p>\n<p><a href=\"http:\/\/raspirobot.blogspot.co.uk\/2013\/02\/pwm-with-raspberry-pi.html\">Read his article here<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over at RaspiRobot, Peter Mansvelder has used an L298N H bridge module to generate PWM signals from the Pi Read his article here &nbsp;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-2141","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PWM with the #RaspberryPi - Raspberry Pi Pod<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PWM with the #RaspberryPi - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"Over at RaspiRobot, Peter Mansvelder has used an L298N H bridge module to generate PWM signals from the Pi Read his article here &nbsp;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\" \/>\n<meta property=\"og:site_name\" content=\"Raspberry Pi Pod\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/recantha\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-10T21:53:07+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG\" \/>\n<meta name=\"author\" content=\"Michael Horne\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@recantha\" \/>\n<meta name=\"twitter:site\" content=\"@recantha\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Horne\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"PWM with the #RaspberryPi\",\"datePublished\":\"2013-02-10T21:53:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\"},\"wordCount\":29,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage\"},\"thumbnailUrl\":\"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\",\"name\":\"PWM with the #RaspberryPi - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage\"},\"thumbnailUrl\":\"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG\",\"datePublished\":\"2013-02-10T21:53:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=2141\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage\",\"url\":\"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG\",\"contentUrl\":\"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=2141#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PWM with the #RaspberryPi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"name\":\"Raspberry Pi Pod\",\"description\":\"Experiences with the Raspberry Pi micro computer and microcontroller\",\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\",\"name\":\"Raspberry Pi Pod\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1\",\"width\":800,\"height\":337,\"caption\":\"Raspberry Pi Pod\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/recantha\/\",\"https:\/\/x.com\/recantha\",\"https:\/\/www.linkedin.com\/in\/recantha\/\",\"https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\",\"name\":\"Michael Horne\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g\",\"caption\":\"Michael Horne\"},\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PWM with the #RaspberryPi - Raspberry Pi Pod","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.recantha.co.uk\/blog\/?p=2141","og_locale":"en_US","og_type":"article","og_title":"PWM with the #RaspberryPi - Raspberry Pi Pod","og_description":"Over at RaspiRobot, Peter Mansvelder has used an L298N H bridge module to generate PWM signals from the Pi Read his article here &nbsp;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=2141","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2013-02-10T21:53:07+00:00","og_image":[{"url":"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG","type":"","width":"","height":""}],"author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"PWM with the #RaspberryPi","datePublished":"2013-02-10T21:53:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141"},"wordCount":29,"commentCount":0,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage"},"thumbnailUrl":"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=2141#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141","url":"https:\/\/www.recantha.co.uk\/blog\/?p=2141","name":"PWM with the #RaspberryPi - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage"},"thumbnailUrl":"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG","datePublished":"2013-02-10T21:53:07+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=2141"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#primaryimage","url":"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG","contentUrl":"http:\/\/i.ebayimg.com\/t\/Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-Arduino-L298N-\/00\/s\/NDUzWDUwMA==\/$T2eC16h,!y0E9s2S9K11BP5tsrv0DQ~~60_12.JPG"},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=2141#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"PWM with the #RaspberryPi"}]},{"@type":"WebSite","@id":"https:\/\/www.recantha.co.uk\/blog\/#website","url":"https:\/\/www.recantha.co.uk\/blog\/","name":"Raspberry Pi Pod","description":"Experiences with the Raspberry Pi micro computer and microcontroller","publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.recantha.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.recantha.co.uk\/blog\/#organization","name":"Raspberry Pi Pod","url":"https:\/\/www.recantha.co.uk\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2016\/03\/cropped-PiPod-Logo-v3.png?fit=800%2C337&ssl=1","width":800,"height":337,"caption":"Raspberry Pi Pod"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/recantha\/","https:\/\/x.com\/recantha","https:\/\/www.linkedin.com\/in\/recantha\/","https:\/\/www.youtube.com\/channel\/UCK4F9blabxzmk8Inzhs8tpg"]},{"@type":"Person","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263","name":"Michael Horne","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/479778b0677caadde0ceb54c4129804ef674914607e3ed0998808148357d10d8?s=96&d=mm&r=g","caption":"Michael Horne"},"url":"https:\/\/www.recantha.co.uk\/blog\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2RsaV-yx","jetpack-related-posts":[{"id":6064,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=6064","url_meta":{"origin":2141,"position":0},"title":"Software PWM on a #RaspberryPi","author":"Michael Horne","date":"23 September 2013","format":false,"excerpt":"Mark Williams has been looking at how to generate signals to create PWM-like effects on the Pi. This lets him control the brightness of LEDs without using the PWM pin, albeit in a simulated kind of way. I'll let him explain it on his blog. His sample code is in\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3248,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=3248","url_meta":{"origin":2141,"position":1},"title":"Controlling servo motors on the #RaspberryPi","author":"Michael Horne","date":"28 March 2013","format":false,"excerpt":"As part of my \"SpacePi\" Raspberry Pi astronomy project, I want to be able to control the orientation of the camera module remotely. I want to be able to sit away from the camera rig and control where it is pointing using a web interface and (optionally, and because I\u2026","rel":"","context":"In &quot;Camera module&quot;","block_context":{"text":"Camera module","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=8"},"img":{"alt_text":"Better PWM on the Raspberry Pi","src":"\/blog\/wp-content\/uploads\/2013\/03\/PanTilt-1L1.jpg","width":350,"height":200},"classes":[]},{"id":7720,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=7720","url_meta":{"origin":2141,"position":2},"title":"PWM dimming of an LED on the #RaspberryPi","author":"Michael Horne","date":"3 February 2014","format":false,"excerpt":"A father-and-daughter team wants to control servo motors using PWM (Pulse Width Modulation) on the Raspberry Pi. As a demonstration of how possible this is, they've started out by using PWM with an LED to fade it up and down. To do this, they've used the Occidentalis distro from Adafruit\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13012,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=13012","url_meta":{"origin":2141,"position":3},"title":"Raspberry Pi add-on board RasPiO Duino gets new PWM video","author":"Michael Horne","date":"24 July 2015","format":false,"excerpt":"Alex Eames has been busy creating a new video for owners of the excellent RasPiO Duino board. This one takes you through experiments you can do with the PWM pins on the Duino and helps you to create a colour-fading ball display using a ping-pong ball as a diffuser. You\u2026","rel":"","context":"In &quot;GPIO boards&quot;","block_context":{"text":"GPIO boards","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=20"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2015\/07\/duino-pwm.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2015\/07\/duino-pwm.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2015\/07\/duino-pwm.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":10249,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=10249","url_meta":{"origin":2141,"position":4},"title":"Access PWM on the #RaspberryPi using C++","author":"Michael Horne","date":"7 July 2014","format":false,"excerpt":"Hussam Al-Hertani has blogged a C++ class he's written to access pin 18 on the Raspberry Pi. This is the only hardware PWM pin on the Pi.\u00a0Read about it here.","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12198,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=12198","url_meta":{"origin":2141,"position":5},"title":"Simple code and diagram to control PWM on the Raspberry Pi","author":"Michael Horne","date":"13 March 2015","format":false,"excerpt":"Over on his blog, Eric is doing a great line in simple examples for controlling the GPIO pins of the Pi. This time, he covers PWM on the Pi by giving an example of an LED which changes brightness depending on a button press. Take a look here.","rel":"","context":"In &quot;Making&quot;","block_context":{"text":"Making","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=50"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=1050%2C600 3x, https:\/\/i0.wp.com\/3.bp.blogspot.com\/-sN4Rqyili_g\/VQH4w8JQ6hI\/AAAAAAAAMg4\/iQPblj-TtCg\/s1600\/GPIO_21_LED_Button.png?resize=1400%2C800 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2141"}],"version-history":[{"count":0,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2141\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}