[{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eOverview\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/875/original/curve-2.png?1749869831","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n        \u003cp\u003eThis draws hypotrochoid spirals (like Spirograph) for a picodvi display on Fruit Jam or Metro RP2350. I tested this on a Fruit Jam rev B prototype and a Metro RP2350 (no PSRAM version). The 320x480 8-bit video mode works on both, but 640x480 8-bit seems to need a board that has a PSRAM chip. The curves get plotted as individual pixels using a color ramp that cycles through the entire 8-bit RGB332 palette. This might be useful to people looking for sample code showing how to configure picodvi displays for RP2350 boards.\u003c/p\u003e\n\u003cp\u003eFor more details on the math for Hypotrochoid curves, you can check out the \u003ca href=\"https://en.wikipedia.org/wiki/Hypotrochoid\" target=\"_blank\"\u003eWikipedia\u003c/a\u003e\u0026nbsp;or \u003ca href=\"https://mathworld.wolfram.com/Hypotrochoid.html\" target=\"_blank\"\u003eWolfram MathWorld\u003c/a\u003e\u0026nbsp;Hypotrochoid pages.\u003c/p\u003e\n\u003cp\u003e\u003cspan\u003eTransparency note: Adafruit provided the Fruit Jam rev B prototype board I used for this guide (Thanks Adafruit!).\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://youtu.be/WZMR64-OCqk"},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/876/original/curve-1.png?1749869873","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/877/original/curve-1-640x480.png?1749869901","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003ch2\u003eParts\u003c/h2\u003e\n\u003cp\u003e\u003cspan\u003eI used a pre-release revision B Fruit Jam prototype board and a Metro RP2350 (no PSRAM version). Y\u003c/span\u003e\u003cspan\u003eou could probably get very similar results to the Fruit Jam using a Metro RP2350 with PSRAM once you add an HSTX to DVI adapter. For more information on setting up a Metro RP2350 as a pseudo-Fruit Jam, you can check out some of the recent guides by \u003ca href=\"https://learn.adafruit.com/match3-game-on-metro-rp2350\" target=\"_blank\"\u003eTim C.\u003c/a\u003e\u0026nbsp;and\u0026nbsp;\u003ca href=\"https://learn.adafruit.com/minesweeper-on-metro-rp2350\" target=\"_blank\"\u003eM. LeBlanc-Williams\u003c/a\u003e.\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6267","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6003","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6035","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6036","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6055","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eUpdating CircuitPython\u003c/h2\u003e\n\u003cp\u003eAs I write this (June 13, 2025), CircuitPython 10.0.0-alpha.6 is the most recent build for Fruit Jam. I'm not sure what will change by the time 10.0.0 is released. To keep your board up to date, you can use the \"DOWNLOAD .UF2 NOW\" buttons on the appropriate download page of circuitpython.org:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https://circuitpython.org/board/adafruit_metro_rp2350/\" target=\"_blank\"\u003eMetro RP2350 Download\u003c/a\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003epage\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"https://circuitpython.org/board/adafruit_fruit_jam/\" target=\"_blank\"\u003eFruit Jam Download\u003c/a\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003epage\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eTo install the UF2 File:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eConnect your board to a computer with a USB data cable (\u003cem\u003echarge-only cables won't work!\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003c/em\u003e)\u003c/li\u003e\n\u003cli\u003ePress and hold the board's boot button (Button 1 on Fruit Jam)\u003c/li\u003e\n\u003cli\u003ePress and release the reset button\u003c/li\u003e\n\u003cli\u003eRelease the boot button\u003c/li\u003e\n\u003cli\u003eWhen the removable drive named\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eRP2350\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eappears, copy the UF2 file onto it. After the copy finishes, you should see the\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eRP2350\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003edrive disappear and soon after that a new\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eCIRCUITPY\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003edrive should appear.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2\u003eCircuitPython Code\u003c/h2\u003e\n\u003cp\u003eYou can view the code at the\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://github.com/samblenny/fruit-jam-spirals\" target=\"_blank\"\u003esamblenny/fruit-jam-spirals\u003c/a\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eGitHub repository. To download a zip archive project bundle with the code and all the necessary libraries, use the \"Download Project Bundle\" button:\u003c/p\u003e\n      \n\n\n\n\n\n\n","metadata":{}},{"element_type":"button","content":"https://github.com/samblenny/fruit-jam-spirals/releases/download/v0.1.1/fruit-jam-spirals-203ef99.zip","metadata":{"class":"btn btn-large btn-block btn-primary","button_type":"primary","target":"_blank","zip_folder":"false"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eInstall Project Bundle\u003c/h3\u003e\n\u003cp class=\"p2\"\u003e\u003cspan class=\"s1\"\u003eTo copy the project bundle files to your CIRCUITPY drive:\u003c/span\u003e\u003c/p\u003e\n\u003col class=\"ol1\"\u003e\n\u003cli class=\"li3\"\u003e\u003cspan class=\"s1\"\u003eDownload the project bundle .zip file using the \"Download Project Bundle\" button above.\u003c/span\u003e\u003c/li\u003e\n\u003cli class=\"li3\"\u003e\u003cspan class=\"s1\"\u003eExpand the zip file by opening it, or use unzip in a Terminal. The zip archive should expand to a folder. When you open the folder, it should contain a README.txt file and a CircuitPython 10.x folder.\u003c/span\u003e\u003c/li\u003e\n\u003cli class=\"li3\"\u003e\u003cspan class=\"s1\"\u003eOpen the CircuitPython 10.x folder and copy all of its contents to your CIRCUITPY drive.\u003c/span\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp class=\"p2\"\u003e\u003cspan class=\"s1\"\u003eTo learn more about copying libraries to your\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eCIRCUITPY\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003edrive, check out the\u0026nbsp;\u003ca href=\"https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries\" target=\"_blank\"\u003e\u003cspan class=\"s2\"\u003eCircuitPython Libraries\u003c/span\u003e\u003c/a\u003e\u0026nbsp;section of the\u0026nbsp;\u003ca href=\"https://learn.adafruit.com/welcome-to-circuitpython\" target=\"_blank\"\u003e\u003cspan class=\"s2\"\u003eWelcome to CircuitPython!\u003c/span\u003e\u003c/a\u003e\u0026nbsp;learn guide.\u003c/span\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eCIRCUITPY/code.py\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/samblenny/fruit-jam-spirals/blob/v0.1.1/code.py"},{"element_type":"text","content":"\n  \n  \n  \n        \u003ch3\u003eAvoiding MemoryError\u003c/h3\u003e\n\u003cp\u003eWhen I tried to use \u003ccode\u003epicodvi\u003c/code\u003e with 640x480 and 8-bit color depth on my Metro RP2350 (no PSRAM version), I got a \u003ccode\u003eMemoryError\u003c/code\u003e exception. It works fine on Fruit Jam though. I expect the Metro RP2350 with PSRAM also works, but I haven't tested that. If you get an error that looks like this,\u003c/p\u003e\n      \n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/878/original/memory-allocation-error.png?1749870833","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003ethen you need to either use a different board or switch to a video mode that use less RAM.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n","metadata":{}}]