{"id":20950,"date":"2021-03-21T10:42:51","date_gmt":"2021-03-21T09:42:51","guid":{"rendered":"https:\/\/www.recantha.co.uk\/blog\/?p=20950"},"modified":"2021-03-21T10:42:51","modified_gmt":"2021-03-21T09:42:51","slug":"playing-sounds-from-the-raspberry-pi-pico-using-circuitpython-a-journey-of-discovery","status":"publish","type":"post","link":"https:\/\/www.recantha.co.uk\/blog\/?p=20950","title":{"rendered":"Playing sounds from the Raspberry Pi Pico using CircuitPython &#8211; a journey of discovery"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20952\" src=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=560%2C419&#038;ssl=1\" alt=\"\" width=\"560\" height=\"419\" srcset=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=1024%2C766&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=768%2C575&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=560%2C419&amp;ssl=1 560w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=260%2C195&amp;ssl=1 260w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?resize=160%2C120&amp;ssl=1 160w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?w=1120&amp;ssl=1 1120w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>As you probably know by now, I&#8217;m not a microcontroller expert. However, with the advent of microcontrollers that use MicroPython and CircuitPython, I am a lot more comfortable using them now than I used to be! However, because the Raspberry Pi Pico is new, there aren&#8217;t a\u00a0<em>lot<\/em> of practical examples of how to do things out there. There is <a href=\"https:\/\/www.raspberrypi.org\/documentation\/rp2040\/getting-started\/\" target=\"_blank\" rel=\"noopener\">excellent documentation<\/a>, of course, but when you&#8217;re trying to do something specific, or something that hasn&#8217;t been thought of, it can be a voyage of discovery.<\/p>\n<h2>TL;DR<\/h2>\n<p>Scroll down to &#8220;Playing a WAV file&#8221; for the code that works and &#8220;Finding the Hardware&#8221; for a wiring diagram.<\/p>\n<h2>The project<\/h2>\n<p>I am currently working on a new version of my long-running <a href=\"https:\/\/www.recantha.co.uk\/blog\/?cat=37\">Picorder<\/a> project, my version of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tricorder\" target=\"_blank\" rel=\"noopener\">the classic Star Trek prop, the Tricorder<\/a>. Whereas in the past I&#8217;ve used exclusively regular Raspberry Pi (with an occasional foray into Arduino to get analog inputs) as the brains, this time I am choosing to use the Pico. A PicoPicorder, if you will. One thing I&#8217;ve never done before is to reproduce the sounds made when the device is opened and scanning.<\/p>\n<h2>Finding the sound effect<\/h2>\n<p>My first job was to find the sound that I wanted to play. This was easy. <a href=\"https:\/\/www.trekcore.com\/audio\/\" target=\"_blank\" rel=\"noopener\">TrekCore has a whole host of sound effects from the Star Trek series<\/a>. I picked the one I wanted (<a href=\"https:\/\/www.trekcore.com\/audio\/tricorder\/tng_tricorder1.mp3\" target=\"_blank\" rel=\"noopener\">this one<\/a>) and downloaded it. I knew straight away that the full file was too long (and large), so I converted it, using <a href=\"https:\/\/www.audacityteam.org\/\" target=\"_blank\" rel=\"noopener\">Audacity<\/a>, into a WAV file, squashed it into a mono sample and chopped most of it away, leaving me with a <a href=\"https:\/\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/tricorder_2.wav\">self-contained, much shorter, loopable sound effect<\/a>.<\/p>\n<h2>How to play it<\/h2>\n<p>Now&#8230; how to play it. To start with, I looked at creating my own circuit and using PWM Audio. This <a href=\"https:\/\/gregchadwick.co.uk\/blog\/playing-with-the-pico-pt3\/\" target=\"_blank\" rel=\"noopener\">post from Greg Chadwick<\/a> indicated that I could do just that. However, it was, excuse me, a bit beyond me. It also used C\/C++ as a programming language. I had already decided that, for this project, I would use Adafruit&#8217;s <a href=\"https:\/\/circuitpython.org\/\" target=\"_blank\" rel=\"noopener\">CircuitPython derivative of MicroPython<\/a>. There were a lot of libraries, it is, basically, Python (which I can already use to a certain extent, thanks to the CamJam EduKits and all the other tutorials that are available), and it is extensively documented.<\/p>\n<p>However, that blog post, and some previously-read Pico documentation, pointed me to needing to use I2S audio, which is how audio (DAC) boards work with the Raspberry Pi. This would give me high enough quality audio to play my sound effect and give me a bit of familiarity (which I always think is key to understanding how to do something).<\/p>\n<h2>The Raspberry Pi Pico and I2S<\/h2>\n<p>However (again), from my past reading I knew that the Pico\u00a0<em>does not have I2S pins<\/em> in the same way that the regular Pi does. Some microcontrollers do have that built-in, but the Pico does not. I also knew that, in order to give functionality to the Pico that it does not have, you use <a href=\"https:\/\/hackspace.raspberrypi.org\/articles\/what-is-programmable-i-o-on-raspberry-pi-pico\" target=\"_blank\" rel=\"noopener\">PIO (Programmable Input\/Output)<\/a>. (If you want to know about how to understand PIO even more, <a href=\"https:\/\/www.cnx-software.com\/2021\/01\/27\/a-closer-look-at-raspberry-pi-rp2040-programmable-ios-pio\/\" target=\"_blank\" rel=\"noopener\">there&#8217;s this excellent article<\/a>).\u00a0<em>It&#8217;s actually quite difficult to find &#8220;how to&#8217;s&#8221; on the Raspberry Pi website for PIO&#8230; in fact, I completely failed, so you will have to root around a bit.<\/em><\/p>\n<p>First of all, I discovered <a href=\"https:\/\/github.com\/raspberrypi\/pico-extras\/tree\/master\/src\/rp2_common\/pico_audio_i2s\" target=\"_blank\" rel=\"noopener\">this example from the Raspberry Pi GitHub repository<\/a> that showed what PIO code you needed in order to accomplish that. However, because it&#8217;s written in C\/C++ and is targeted at the SDK method of programming the Pico, rather than CircuitPython, it rather blew my mind. This is the important part, the PIO code:<\/p>\n<pre>.program audio_i2s\r\n.side_set 2\r\n\r\n    ; \/--- LRCLK\r\n    ; |\/-- BCLK\r\nbitloop1: ; ||\r\n    out pins, 1 side 0b10\r\n    jmp x-- bitloop1 side 0b11\r\n    out pins, 1 side 0b00\r\n    set x, 14 side 0b01\r\n\r\nbitloop0:\r\n    out pins, 1 side 0b00\r\n    jmp x-- bitloop0 side 0b01\r\n    out pins, 1 side 0b10\r\npublic entry_point:\r\n    set x, 14 side 0b11<\/pre>\n<p>Complete gibberish, am I right? It was at this point that I almost gave up. 0b10? jmp? It&#8217;s assembly language, I thought, for the particular implementation on the Pico. Fair enough, but I have no idea what it all means. However, did that mean that I couldn&#8217;t\u00a0<em>use<\/em> it? I had seen <a href=\"https:\/\/github.com\/erawretsila\/EdukitPico\/blob\/main\/Python\/SR04Pio.py\" target=\"_blank\" rel=\"noopener\">an example in MicroPython for using PIO inside Python<\/a> (thanks Alister!) itself, but not CircuitPython.<\/p>\n<p>I thought I&#8217;d step back and approach things a different way.<\/p>\n<h2>Finding the hardware<\/h2>\n<p>I weighed up the amount of problem-solving skills I had and, rather stupidly, assumed that I <em>would<\/em> be able to get I2S working, somehow.<\/p>\n<p>If I could get I2S working, then I knew I would need a DAC and an amplifier to output the sound from the Pico. I came across <a href=\"https:\/\/learn.adafruit.com\/adafruit-max98357-i2s-class-d-mono-amp\" target=\"_blank\" rel=\"noopener\">this tutorial over on the Adafruit site<\/a> for using <a href=\"https:\/\/www.adafruit.com\/product\/3006\" target=\"_blank\" rel=\"noopener\">the MAX98357 I2S mono amp<\/a> which combined an I2S amp and a DAC on the same board. Ideal. It only outputs to one speaker but, for this project, one small speaker is all I need. I found <a href=\"https:\/\/thepihut.com\/products\/adafruit-i2s-3w-class-d-amplifier-breakout-max98357a\" target=\"_blank\" rel=\"noopener\">the breakout on The Pi Hut&#8217;s site<\/a> and they were kind enough to send it to me with some other bits for review purposes.<\/p>\n<p>Looking more at <a href=\"https:\/\/learn.adafruit.com\/adafruit-max98357-i2s-class-d-mono-amp\/circuitpython-wiring-test\" target=\"_blank\" rel=\"noopener\">the tutorial<\/a> on Adafruit, I came across the CircuitPython wiring test. This shows how to hook up the MAX board to a microcontroller with I2S pins. To my dismay, the code example did not cover the PIO part. Okay, I thought, we can smash that bit and the other bit together somehow.<\/p>\n<p>The MAX board arrived the next day and I wired it up. Here&#8217;s my wiring (thank you Adafruit and Fritzing for the software and parts library!):<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20954\" src=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=560%2C413&#038;ssl=1\" alt=\"\" width=\"560\" height=\"413\" srcset=\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?w=969&amp;ssl=1 969w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=300%2C221&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=768%2C566&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=560%2C413&amp;ssl=1 560w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=260%2C192&amp;ssl=1 260w, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/Audio-circuit-only_bb.jpg?resize=160%2C118&amp;ssl=1 160w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>Now that was done, PIO was the next step. Or so I thought.<\/p>\n<h2>Using PIO in CircuitPython and the Adafruit Discord server<\/h2>\n<p>By this point, I knew I was going to need some extra help. Adafruit has, amazingly, created <a href=\"http:\/\/adafru.it\/discord\" target=\"_blank\" rel=\"noopener\">a Discord channel<\/a> for discussion of their products and, Hallelujah, CircuitPython. There was even a special channel for PIO. I joined and then realised how active the channels all were &#8211; awesome, so much expertise\u00a0<em>and<\/em> experience.<\/p>\n<p>From suggestions received there, I came across <a href=\"https:\/\/learn.adafruit.com\/intro-to-rp2040-pio-with-circuitpython\/using-pio-to-drive-a-neopixel\" target=\"_blank\" rel=\"noopener\">this tutorial on the Adafruit site for using PIO in CircuitPython<\/a>, so I finally knew that what I was trying to do was possible. Somebody then pointed <a href=\"https:\/\/github.com\/adafruit\/Adafruit_CircuitPython_PIOASM\/blob\/main\/examples\/pioasm_i2sout.py\" target=\"_blank\" rel=\"noopener\">this example out to me that uses PIOASM (PIO assembler) to create audio on the Pico using CircuitPython<\/a>.<\/p>\n<h2>Wanting to know how things work<\/h2>\n<p>At this point, I lost several hours trying to combine things together before realising that I ought to start from first principles.<\/p>\n<p>Returning to <a href=\"https:\/\/github.com\/adafruit\/Adafruit_CircuitPython_PIOASM\/blob\/main\/examples\/pioasm_i2sout.py\" target=\"_blank\" rel=\"noopener\">the example from earlier<\/a> which shows the PIOASM example to create audio in CircuitPython. All the example does is to create the necessary PIO code, assemble it, and then use it to play a sine wave.<\/p>\n<p>To my surprise, once I&#8217;d got the pins sorted out, it crashed. I got the following error which others might get, so here it is:<\/p>\n<pre>Traceback (most recent call last):\r\nFile \"code.py\", line 40, in &lt;module&gt; File \"adafruit_pioasm.py\",\r\nline 65, in assemble IndexError: list index out of range<\/pre>\n<p>Hmmm. Vexing, that.<\/p>\n<p>I had come across this video, a &#8220;Deep Dive&#8221; with Scott, who works on CircuitPython for Adafruit:<\/p>\n<p><iframe loading=\"lazy\" title=\"Deep Dive w\/Scott: RP2040 audio and DMA debugging #adafruit #raspberrypipico\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/KjhqMafLHiY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>And I wondered&#8230; was the functionality so new that I was using a too-old version of CircuitPython and its libraries? I downloaded the <a href=\"https:\/\/circuitpython.org\/board\/raspberry_pi_pico\/\" target=\"_blank\" rel=\"noopener\">latest stable build of the CircuitPython UF2 from this page<\/a> which was 6.2.0-beta.4 at the time. I also <a href=\"https:\/\/circuitpython.org\/libraries\" target=\"_blank\" rel=\"noopener\">downloaded the latest version of the Libraries<\/a> and updated the PIOASM Python file from there onto my Pico. I ran it again and&#8230; it worked! It worked! Awesome! That wasn&#8217;t the end of the adventure, though&#8230; I wanted to play a WAV file.<\/p>\n<h2>Playing a WAV file<\/h2>\n<p>I returned to <a href=\"https:\/\/learn.adafruit.com\/adafruit-max98357-i2s-class-d-mono-amp\/circuitpython-wiring-test\" target=\"_blank\" rel=\"noopener\">the CircuitPython wiring and test page for the MAX board<\/a>. This contains the following code:<\/p>\n<pre><span class=\"kwd\">import<\/span><span class=\"pln\"> audiocore<\/span>\r\n<span class=\"kwd\">import<\/span><span class=\"pln\"> board<\/span>\r\n<span class=\"kwd\">import<\/span><span class=\"pln\"> audiobusio<\/span>\r\n<span class=\"pln\">\r\nwave_file <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> open<\/span><span class=\"pun\">(<\/span><span class=\"str\">\"StreetChicken.wav\"<\/span><span class=\"pun\">,<\/span> <span class=\"str\">\"rb\"<\/span><span class=\"pun\">)<\/span>\r\n<span class=\"pln\">wave <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> audiocore<\/span><span class=\"pun\">.<\/span><span class=\"typ\">WaveFile<\/span><span class=\"pun\">(<\/span><span class=\"pln\">wave_file<\/span><span class=\"pun\">)<\/span>\r\n\r\n<span class=\"pln\">audio <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> audiobusio<\/span><span class=\"pun\">.<\/span><span class=\"pln\">I2SOut<\/span><span class=\"pun\">(<\/span><span class=\"pln\">board<\/span><span class=\"pun\">.<\/span><span class=\"pln\">D1<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> board<\/span><span class=\"pun\">.<\/span><span class=\"pln\">D0<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> board<\/span><span class=\"pun\">.<\/span><span class=\"pln\">D9<\/span><span class=\"pun\">)<\/span>\r\n\r\n<span class=\"kwd\">while<\/span> <span class=\"kwd\">True<\/span><span class=\"pun\">:<\/span>\r\n<span class=\"pln\">    audio<\/span><span class=\"pun\">.<\/span><span class=\"pln\">play<\/span><span class=\"pun\">(<\/span><span class=\"pln\">wave<\/span><span class=\"pun\">)<\/span>\r\n\r\n<span class=\"kwd\">while<\/span><span class=\"pln\"> audio<\/span><span class=\"pun\">.<\/span><span class=\"pln\">playing<\/span><span class=\"pun\">:<\/span>\r\n<span class=\"kwd\">    pass<\/span><\/pre>\n<p>This simply creates an object containing a sample WAV file (StreetChicken), sets up an I2S device and then plays it until it&#8217;s finished.<\/p>\n<p>I changed the D1, D0 and D9 references to my own pins and added the argument names for clarity:<\/p>\n<pre><span class=\"pl-s1\">audio<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">audiobusio<\/span>.<span class=\"pl-v\">I2SOut<\/span>(<span class=\"pl-s1\">bit_clock<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">board<\/span>.<span class=\"pl-v\">GP10<\/span>, <span class=\"pl-s1\">word_select<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">board<\/span>.<span class=\"pl-v\">GP11<\/span>, <span class=\"pl-s1\">data<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">board<\/span>.<span class=\"pl-v\">GP9<\/span>)<\/pre>\n<p>This matches the wiring diagram above. At this point, I knew I was blundering about in the dark and I knew it wouldn&#8217;t work. No PIO stuff evident there, after all. The Pico wouldn&#8217;t know what to do with itself. Right?<\/p>\n<p>Wrong.<\/p>\n<p>The sample, which I had copied to the root of the Pico&#8217;s CIRCUITPY drive, came out of the speakers. It was distorted and repeated over the top of itself, but it was playing! What the heck?<\/p>\n<h2>Rolling with it<\/h2>\n<p>I decided to roll with it. I changed the code to simply play the WAV file once and then sleep. This resulted in the following (you might need to turn the volume up):<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Raspberry Pi Pico - No I2S pins, No PIO, so why does this work?\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/QqLHkpqCbhw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>It was quite distorted, as you can hear, but it did match what I could play on my laptop. A piece of electronic hip-hoppy music. But why did it work?<\/p>\n<p>I asked on Twitter, I asked on the Adafruit Discord channel and Peter Onion asked me whether I knew what the I2SOut code did. I did not. I received a pointer to <a href=\"https:\/\/github.com\/adafruit\/circuitpython\/blob\/main\/ports\/raspberrypi\/common-hal\/audiobusio\/I2SOut.c\" target=\"_blank\" rel=\"noopener\">the audiobusio\/I2SOut code<\/a> on the Discord channel and took a look. To my surprise, it had all the PIO code in it! That means&#8230; That means that someone else has done all the hard work with the PIOASM stuff&#8230; That&#8217;s amazing!<\/p>\n<h2>Clearing up the sound<\/h2>\n<p>I spoke to <a href=\"https:\/\/twitter.com\/DavidGlaude\" target=\"_blank\" rel=\"noopener\">David Glaude<\/a> on the Discord channel about the problem I was experiencing with the glitchy sound (see video above). He let me see <a href=\"https:\/\/gist.github.com\/dglaude\/7ce0a284e25015320712dbf5baf2ffc5\" target=\"_blank\" rel=\"noopener\">his test script<\/a> (which was adapted from the previous examples I noted above). I tried it out. It loops the StreetChicken music 10 times. It showed that the glitching problem was still there and also pointed to a problem with the <em><span class=\"pl-k\">while<\/span> <span class=\"pl-s1\">i2s<\/span>.<\/em><span class=\"pl-s1\"><em>playing part<\/em> &#8211; there might be a bug (<a href=\"https:\/\/github.com\/adafruit\/circuitpython\/issues\/4271\" target=\"_blank\" rel=\"noopener\">which David has reported<\/a>). David also suggested that there was an issue with the Pico being connected to the laptop &#8211; i.e. the reading of the flash memory was interfering with the I2S playback. I tried it with a wall PSU and, indeed, this cleared the issue up.<\/span><\/p>\n<p>I then altered the code to play back\u00a0<em>my<\/em> sound sample of the tricorder in a loop, based on David&#8217;s code. To my delight, it works perfectly (if connected to a non-reading power source). You might need to turn your audio volume up a bit, but this is what it now does!<\/p>\n<p><iframe loading=\"lazy\" title=\"Playing audio on a Raspberry Pi Pico using CircuitPython and I2SOut\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/8NqELG6jm34?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>In conclusion<\/h2>\n<p>You <em>can<\/em> get sound, quite easily, out of a Raspberry Pi Pico using CircuitPython. Use audiocore to open and play your WAV files over I2S with the CircuitPython audiobusio library from Adafruit doing the heavy lifting with regards to PIO. And get on the Adafruit Discord channel &#8211; there&#8217;s a lot of help available out there! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you probably know by now, I&#8217;m not a microcontroller expert. However, with the advent of microcontrollers that use MicroPython and CircuitPython, I am a lot more comfortable using them now than I used to be! However, because the Raspberry&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":20952,"comment_status":"open","ping_status":"closed","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":"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery","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":[4,22,50,31,972,51],"tags":[198,336,981,1014],"class_list":["post-20950","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-audio","category-geeky-techiness","category-making","category-music","category-raspberry-pi-pico","category-tutorials","tag-adafruit","tag-audio","tag-circuitpython","tag-max98357"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - 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=20950\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - Raspberry Pi Pod\" \/>\n<meta property=\"og:description\" content=\"As you probably know by now, I&#8217;m not a microcontroller expert. However, with the advent of microcontrollers that use MicroPython and CircuitPython, I am a lot more comfortable using them now than I used to be! However, because the Raspberry&hellip;Read more &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\" \/>\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=\"2021-03-21T09:42:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i2.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"898\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\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=20950#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\"},\"author\":{\"name\":\"Michael Horne\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263\"},\"headline\":\"Playing sounds from the Raspberry Pi Pico using CircuitPython &#8211; a journey of discovery\",\"datePublished\":\"2021-03-21T09:42:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\"},\"wordCount\":1817,\"commentCount\":42,\"publisher\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1\",\"keywords\":[\"adafruit\",\"audio\",\"CircuitPython\",\"MAX98357\"],\"articleSection\":[\"Audio\",\"Geeky Techiness\",\"Making\",\"Music\",\"Raspberry Pi Pico\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\",\"url\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\",\"name\":\"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - Raspberry Pi Pod\",\"isPartOf\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1\",\"datePublished\":\"2021-03-21T09:42:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.recantha.co.uk\/blog\/?p=20950\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1\",\"width\":1200,\"height\":898},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.recantha.co.uk\/blog\/?p=20950#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.recantha.co.uk\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Playing sounds from the Raspberry Pi Pico using CircuitPython &#8211; a journey of discovery\"}]},{\"@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":"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - 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=20950","og_locale":"en_US","og_type":"article","og_title":"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - Raspberry Pi Pod","og_description":"As you probably know by now, I&#8217;m not a microcontroller expert. However, with the advent of microcontrollers that use MicroPython and CircuitPython, I am a lot more comfortable using them now than I used to be! However, because the Raspberry&hellip;Read more &rarr;","og_url":"https:\/\/www.recantha.co.uk\/blog\/?p=20950","og_site_name":"Raspberry Pi Pod","article_publisher":"https:\/\/www.facebook.com\/recantha\/","article_published_time":"2021-03-21T09:42:51+00:00","og_image":[{"width":1200,"height":898,"url":"https:\/\/i2.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","type":"image\/jpeg"}],"author":"Michael Horne","twitter_card":"summary_large_image","twitter_creator":"@recantha","twitter_site":"@recantha","twitter_misc":{"Written by":"Michael Horne","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#article","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950"},"author":{"name":"Michael Horne","@id":"https:\/\/www.recantha.co.uk\/blog\/#\/schema\/person\/c27c4ef2ee1c18b130f1fcd5dcdbb263"},"headline":"Playing sounds from the Raspberry Pi Pico using CircuitPython &#8211; a journey of discovery","datePublished":"2021-03-21T09:42:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950"},"wordCount":1817,"commentCount":42,"publisher":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#organization"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","keywords":["adafruit","audio","CircuitPython","MAX98357"],"articleSection":["Audio","Geeky Techiness","Making","Music","Raspberry Pi Pico","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.recantha.co.uk\/blog\/?p=20950#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950","url":"https:\/\/www.recantha.co.uk\/blog\/?p=20950","name":"Playing sounds from the Raspberry Pi Pico using CircuitPython - a journey of discovery - Raspberry Pi Pod","isPartOf":{"@id":"https:\/\/www.recantha.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage"},"image":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","datePublished":"2021-03-21T09:42:51+00:00","breadcrumb":{"@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.recantha.co.uk\/blog\/?p=20950"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#primaryimage","url":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","width":1200,"height":898},{"@type":"BreadcrumbList","@id":"https:\/\/www.recantha.co.uk\/blog\/?p=20950#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.recantha.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Playing sounds from the Raspberry Pi Pico using CircuitPython &#8211; a journey of discovery"}]},{"@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":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/IMG_20210321_074930089_sm.jpg?fit=1200%2C898&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2RsaV-5rU","jetpack-related-posts":[{"id":20762,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20762","url_meta":{"origin":20950,"position":0},"title":"CircuitPython from Adafruit runs on the Raspberry Pi Pico","author":"Michael Horne","date":"21 January 2021","format":false,"excerpt":"As highlighted by Les Pounder on Twitter and again by 'tannewt' (Scott Shawcroft) on the Raspberry Pi Forums, Adafruit's CircuitPython will run on the Raspberry Pi Pico and, more generally, RP2040 boards, such as Adafruit's upcoming Feather 2040. According to this post on the Forum you just follow these instructions:\u2026","rel":"","context":"In &quot;Announcements&quot;","block_context":{"text":"Announcements","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=952"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/01\/EsPzY45XAAAtSgK.jpeg?fit=1094%2C488&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/01\/EsPzY45XAAAtSgK.jpeg?fit=1094%2C488&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/01\/EsPzY45XAAAtSgK.jpeg?fit=1094%2C488&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/01\/EsPzY45XAAAtSgK.jpeg?fit=1094%2C488&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/01\/EsPzY45XAAAtSgK.jpeg?fit=1094%2C488&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":20803,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20803","url_meta":{"origin":20950,"position":1},"title":"Use Adafruit&#8217;s CircuitPython on the Raspberry Pi Pico","author":"Michael Horne","date":"6 February 2021","format":false,"excerpt":"At the start of the Raspberry Pi Pico launch, it was only possible to program it in either C\/C++ or MicroPython. A few languages are beginning to make an appearance now, including the quite exciting prospect of Rust running on the board. Today, I'm highlighting Adafruit's CircuitPython. It is similar,\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":20836,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20836","url_meta":{"origin":20950,"position":2},"title":"Use your Raspberry Pi Pico as a HID device to give mouse and keyboard input using Adafruit&#8217;s CircuitPython","author":"Michael Horne","date":"10 February 2021","format":false,"excerpt":"Hriday Barot has written up a couple of example scripts for the Raspberry Pi Pico that will mimic mouse and keyboard input to the USB port it is plugged into. The scripts, written in CircuitPython, are very simple, but you can see how they work easily enough. This seems ideal\u2026","rel":"","context":"In &quot;Geeky Techiness&quot;","block_context":{"text":"Geeky Techiness","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=22"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/02\/CircuitPython_Repo_header_logo.png?fit=1000%2C380&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":20898,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20898","url_meta":{"origin":20950,"position":3},"title":"Your horse runs like the wind with this Raspberry Pi Pico-driven animation","author":"Michael Horne","date":"3 March 2021","format":false,"excerpt":"Hari Wiguna has taken a Raspberry Pi Pico and a small SSD1306 OLED display and created a lovely animation project. It features the stop-motion frames from the galloping horse animation cards by Eadweard Muybridge and uses CircuitPython to do the animation. You can see it in action below and see\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=39"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/The_Horse_in_Motion_high_res.jpg?fit=1200%2C740&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/The_Horse_in_Motion_high_res.jpg?fit=1200%2C740&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/The_Horse_in_Motion_high_res.jpg?fit=1200%2C740&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/The_Horse_in_Motion_high_res.jpg?fit=1200%2C740&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/The_Horse_in_Motion_high_res.jpg?fit=1200%2C740&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":21011,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=21011","url_meta":{"origin":20950,"position":4},"title":"Taking the Cytron Maker Pi Pico out for a spin with the Raspberry Pi Pico","author":"Michael Horne","date":"17 April 2021","format":false,"excerpt":"Tony Goodhew has been in touch about some experiments he has run on the new, low-cost Maker Pi Pico from Cytron. TL;DR - here's the Instructable. In the UK, the Maker Pi Pico is available from The Pi Hut (also as a version without the Pico pre-soldered, but with header\u2026","rel":"","context":"In &quot;Geeky Techiness&quot;","block_context":{"text":"Geeky Techiness","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=22"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/04\/FY1JLWQKNG1CJTD.jpg?fit=1024%2C456&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/04\/FY1JLWQKNG1CJTD.jpg?fit=1024%2C456&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/04\/FY1JLWQKNG1CJTD.jpg?fit=1024%2C456&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/04\/FY1JLWQKNG1CJTD.jpg?fit=1024%2C456&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":20901,"url":"https:\/\/www.recantha.co.uk\/blog\/?p=20901","url_meta":{"origin":20950,"position":5},"title":"Using CircuitPython with the Raspberry Pi Pico&#8217;s PIO functionality","author":"Michael Horne","date":"4 March 2021","format":false,"excerpt":"Jeff Epler over at Adafruit has written an excellent guide to using the Pico's PIO functionality in combination with CircuitPython. As he points out, CircuitPython sometimes interacts differently with the PIO than standard MicroPython, so this guide was necessary to highlight the differences. It explains things in detail and gives\u2026","rel":"","context":"In &quot;Blinkies&quot;","block_context":{"text":"Blinkies","link":"https:\/\/www.recantha.co.uk\/blog\/?cat=80"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/raspberry_pi_pio.png?fit=652%2C484&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/raspberry_pi_pio.png?fit=652%2C484&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.recantha.co.uk\/blog\/wp-content\/uploads\/2021\/03\/raspberry_pi_pio.png?fit=652%2C484&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/20950","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=20950"}],"version-history":[{"count":3,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/20950\/revisions"}],"predecessor-version":[{"id":20956,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/20950\/revisions\/20956"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/media\/20952"}],"wp:attachment":[{"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.recantha.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}