{"id":6533,"date":"2025-01-02T18:45:46","date_gmt":"2025-01-02T17:45:46","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=6533"},"modified":"2025-01-02T18:46:50","modified_gmt":"2025-01-02T17:46:50","slug":"rasperry-picco-2w-testing-streaming-audio-to-i2s","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/","title":{"rendered":"Rasperry Picco 2W &#8211; Testing Streaming Audio to I2S"},"content":{"rendered":"<p>Today I found the time to test some audio on the <strong>Rasperry Pico 2W<\/strong> Microcontroller. I tried out the standard <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/blob\/main\/examples\/examples-communication\/http-client\/streams-url_mp3_helix-i2s\/streams-url_mp3_helix-i2s.ino\">Interenet Streaming sketch<\/a> from the Audio Tools examples.<\/p>\n<p>Unfortunatly, I noticed that the regular WiFi login logic is quite unreliable, but using the WiFiMulti works each time.<\/p>\n<p>Here is the adapted version:<\/p>\n<pre><code>#include \"AudioTools.h\"\n#include \"AudioTools\/AudioCodecs\/CodecMP3Helix.h\"\n#include &lt;WiFiMulti.h&gt;\n\nconst char *ssid = \"ssid\";\nconst char *pwd = \"password\";\nWiFiMulti wifiMulti;\nURLStream url;\nI2SStream i2s; \/\/ final output of decoded stream\nEncodedAudioStream dec(&amp;i2s, new MP3DecoderHelix()); \/\/ Decoding stream\nStreamCopy copier(dec, url); \/\/ copy url to decoder\n\nvoid setup(){\n  Serial.begin(115200);\n  AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Info);  \n  while(!Serial);\n  Serial.println(\"starting...\");\n\n  \/\/ connect to Wifi\n  wifiMulti.addAP(ssid, pwd);\n  if ((wifiMulti.run() != WL_CONNECTED)) {\n    Serial.println(\"Connection error\");\n    stop();\n  }\n  \/\/ mp3 radio\n  url.begin(\"http:\/\/stream.srg-ssr.ch\/m\/rsj\/mp3_128\",\"audio\/mp3\");\n\n  \/\/ setup i2s\n  auto config = i2s.defaultConfig(TX_MODE);\n  i2s.begin(config);\n\n  \/\/ setup I2S based on sampling rate provided by decoder\n  dec.begin();\n}\n\nvoid loop(){\n  copier.copy();\n}\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today I found the time to test some audio on the Rasperry Pico 2W Microcontroller. I tried out the standard Interenet Streaming sketch from the Audio Tools examples. Unfortunatly, I noticed that the regular WiFi login logic is quite unreliable, but using the WiFiMulti works each time. Here is the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2416,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[22,24],"tags":[],"class_list":["post-6533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-sound","category-pico"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann<\/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.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"Today I found the time to test some audio on the Rasperry Pico 2W Microcontroller. I tried out the standard Interenet Streaming sketch from the Audio Tools examples. Unfortunatly, I noticed that the regular WiFi login logic is quite unreliable, but using the WiFiMulti works each time. Here is the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-02T17:45:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-02T17:46:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"266\" \/>\n\t<meta property=\"og:image:height\" content=\"190\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Rasperry Picco 2W &#8211; Testing Streaming Audio to I2S\",\"datePublished\":\"2025-01-02T17:45:46+00:00\",\"dateModified\":\"2025-01-02T17:46:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/\"},\"wordCount\":62,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/pico.jpeg\",\"articleSection\":[\"Machine Sound\",\"Pico\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/\",\"name\":\"Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/pico.jpeg\",\"datePublished\":\"2025-01-02T17:45:46+00:00\",\"dateModified\":\"2025-01-02T17:46:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/pico.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/pico.jpeg\",\"width\":266,\"height\":190},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2025\\\/01\\\/02\\\/rasperry-picco-2w-testing-streaming-audio-to-i2s\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rasperry Picco 2W &#8211; Testing Streaming Audio to I2S\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann","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.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/","og_locale":"en_US","og_type":"article","og_title":"Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann","og_description":"Today I found the time to test some audio on the Rasperry Pico 2W Microcontroller. I tried out the standard Interenet Streaming sketch from the Audio Tools examples. Unfortunatly, I noticed that the regular WiFi login logic is quite unreliable, but using the WiFiMulti works each time. Here is the [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/","og_site_name":"Phil Schatzmann","article_published_time":"2025-01-02T17:45:46+00:00","article_modified_time":"2025-01-02T17:46:50+00:00","og_image":[{"width":266,"height":190,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg","type":"image\/jpeg"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Rasperry Picco 2W &#8211; Testing Streaming Audio to I2S","datePublished":"2025-01-02T17:45:46+00:00","dateModified":"2025-01-02T17:46:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/"},"wordCount":62,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg","articleSection":["Machine Sound","Pico"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/","url":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/","name":"Rasperry Picco 2W - Testing Streaming Audio to I2S - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg","datePublished":"2025-01-02T17:45:46+00:00","dateModified":"2025-01-02T17:46:50+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/01\/pico.jpeg","width":266,"height":190},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2025\/01\/02\/rasperry-picco-2w-testing-streaming-audio-to-i2s\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Rasperry Picco 2W &#8211; Testing Streaming Audio to I2S"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=6533"}],"version-history":[{"count":1,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6533\/revisions"}],"predecessor-version":[{"id":6534,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/6533\/revisions\/6534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/2416"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=6533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=6533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=6533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}