{"id":1094,"date":"2025-03-25T23:32:11","date_gmt":"2025-03-25T22:32:11","guid":{"rendered":"https:\/\/sharedinventions.com\/?p=1094"},"modified":"2025-03-27T10:12:36","modified_gmt":"2025-03-27T09:12:36","slug":"rp2040-zero","status":"publish","type":"post","link":"https:\/\/sharedinventions.com\/?p=1094","title":{"rendered":"RP2040-Zero"},"content":{"rendered":"\n<p>RP2040-Zero is a cheap but powerful developer tiny board utilizing a dual core ARM CPU developed by the RaspberryPi team. This particular module was developed by WaveShare.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Original web page: <a href=\"https:\/\/www.waveshare.com\/wiki\/RP2040-Zero\">https:\/\/www.waveshare.com\/wiki\/RP2040-Zero<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-1024x768.jpg\" alt=\"\" class=\"wp-image-1096\" srcset=\"https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-1024x768.jpg 1024w, https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-300x225.jpg 300w, https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-768x576.jpg 768w, https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-1536x1152.jpg 1536w, https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-2048x1536.jpg 2048w, https:\/\/sharedinventions.com\/wp-content\/uploads\/2025\/03\/PXL_20250226_143307848-660x495.jpg 660w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Where to buy<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/s.click.aliexpress.com\/e\/_okHQk6V\">https:\/\/s.click.aliexpress.com\/e\/_okHQk6V<\/a> About $2.7 or 2.5\u20ac<\/li>\n<\/ul>\n\n\n\n<p>(Affiliate link)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using it in PlatformIO<\/h2>\n\n\n\n<p>We can use the <code>raspberrypi<\/code> platform with the board named <code>pico<\/code>. platformio.ini can look like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;env:rp2040-zero]\nplatform = raspberrypi\nboard = pico\nframework = arduino\nmonitor_speed = 115200\nupload_protocol = picotool\nlib_deps =\n  fastled\/FastLED<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Blink LED code<\/h2>\n\n\n\n<p>We have one WS2812 RGB LED attached to PIN 16, so we should utilize that for a blink example. We use the fastLED library but <code>adafruit\/Adafruit NeoPixel<\/code> will work as well.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;Arduino.h&gt;\n#include &lt;FastLED.h&gt;\n\n#define LED_PIN 16\n#define NUM_LEDS 1\n\n#define COLOR_ORDER GRB\n\n#define BRIGHTNESS  20\n\nCRGB leds&#91;NUM_LEDS];\n\nvoid setup() {\n  FastLED.addLeds&lt;WS2812, LED_PIN, GRB&gt;(leds, NUM_LEDS);\n  FastLED.setBrightness(BRIGHTNESS);\n  FastLED.clear();\n  FastLED.show();\n}\n\nvoid loop() {\n  leds&#91;0] = CRGB::Red;\n  FastLED.show();\n  delay(500);\n\n  leds&#91;0] = CRGB::Green;\n  FastLED.show();\n  delay(500);\n\n  leds&#91;0] = CRGB::Blue;\n  FastLED.show();\n  delay(500);\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Upload the code<\/h2>\n\n\n\n<p>We should use picotool upload within platformio, but it just does not work for me.<\/p>\n\n\n\n<p>However when you plug the device with the Boot button pressed, it will be mounted as a storage device and you can upload the code by simply copying the UF2 file to this storage. (The device will detect the change, flashes it&#8217;s new code and restart into the new firmware.)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp .pio\/build\/rp2040-zero\/firmware.uf2 \/run\/media\/kelemenb\/RPI-RP2\/<\/code><\/pre>\n\n\n\n<p>You can enter storage device mode with the following sequence: press reset &#8211; press boot &#8211; release reset &#8211; release boot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More to go<\/h2>\n\n\n\n<p>There are more features to test<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fix picotool upload issue<\/li>\n\n\n\n<li>Test multi-core features<\/li>\n\n\n\n<li>Try USB host\/device<\/li>\n\n\n\n<li>Try other peripherals, like temperature sensor<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>RP2040-Zero is a cheap but powerful developer tiny board utilizing a dual core ARM CPU developed by the RaspberryPi team. This particular module was developed by WaveShare.<\/p>\n","protected":false},"author":1,"featured_media":1096,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[18,30,31],"class_list":["post-1094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tipps-and-tricks","tag-arduino","tag-platformio","tag-rp2040-2"],"_links":{"self":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/1094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1094"}],"version-history":[{"count":6,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/1094\/revisions"}],"predecessor-version":[{"id":1110,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/posts\/1094\/revisions\/1110"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=\/wp\/v2\/media\/1096"}],"wp:attachment":[{"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sharedinventions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}