[{"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        \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","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/943/original/screenshot.png?1755101284","metadata":{}},{"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        \u003cp\u003eWhat do you get when you combine \u003cem\u003e\u003cstrong\u003eTetris\u003c/strong\u003e\u003c/em\u003e and the \u003cem\u003e\u003cstrong\u003eAdafruit Fruit Jam\u003c/strong\u003e\u003c/em\u003e? You get \u003cstrong\u003e\u003cem\u003eFruitris\u003c/em\u003e\u003c/strong\u003e, silly! This variation of tetris amps up the bright colors, pumps up the music, and adds some subtle twists to the class Tetris formula. All of the game mechanics are mostly based on the standards of 1989's NES Tetris (\u003ca title=\"Tetris Wiki on Fandom\" href=\"https://tetris.fandom.com/wiki/Tetris_Wiki\" target=\"_blank\"\u003esee the Tetris Wiki\u003c/a\u003e for great detailed information). What's added in is that you've got a little robo-friend in the bottom right corner to please and a bunch of fruit smoothies and milkshakes to fill up! \u003cem\u003eHow far can you get? Can you beat the high score?!?\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003cem\u003e\u003cstrong\u003eFruitris\u003c/strong\u003e\u003c/em\u003e runs on the Fruit Jam with USB keyboard or game controller support, HDMI video output, and stereo I2S DAC audio output with a fully synthesized soundtrack. It also integrates with the 5 onboard NeoPixels and 3 hardware push-buttons.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://youtu.be/oTE1ENndiPs"},{"element_type":"alert","content":"\u003cp\u003eFor full feature support, it is advised to install the absolute newest version of CircuitPython or 10.0.0-beta.2 or higher on your board. CircuitPython 9.2.x support is untested at this time.\u003c/p\u003e\n","metadata":{"class":"element alert-element build-alert alert-danger","markdown":"For full feature support, it is advised to install the absolute newest version of CircuitPython or 10.0.0-beta.2 or higher on your board. CircuitPython 9.2.x support is untested at this time.","alert_type":"danger","icon":null}},{"element_type":"markdown","content":"\u003ch2\u003eControls\u003c/h2\u003e\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003cth\u003eAction\u003c/th\u003e\n\u003cth\u003eKeyboard\u003c/th\u003e\n\u003cth\u003eGamepad\u003c/th\u003e\n\u003cth\u003eButtons\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eMove Left\u003c/td\u003e\n\u003ctd\u003eLeft Arrow\u003c/td\u003e\n\u003ctd\u003eLeft\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMove Right\u003c/td\u003e\n\u003ctd\u003eRight Arrow\u003c/td\u003e\n\u003ctd\u003eRight\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eRotate Clockwise\u003c/td\u003e\n\u003ctd\u003eUp Arrow or X\u003c/td\u003e\n\u003ctd\u003eUp or A\u003c/td\u003e\n\u003ctd\u003eButton #2\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDrop: Soft\u003c/td\u003e\n\u003ctd\u003eDown Arrow\u003c/td\u003e\n\u003ctd\u003eDown\u003c/td\u003e\n\u003ctd\u003eButton #1\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDrop: Hard\u003c/td\u003e\n\u003ctd\u003eZ\u003c/td\u003e\n\u003ctd\u003eB\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eQuit (reload)\u003c/td\u003e\n\u003ctd\u003eEnter\u003c/td\u003e\n\u003ctd\u003eStart\u003c/td\u003e\n\u003ctd\u003eButton #3\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n","metadata":{"markdown":"## Controls\n\n| Action           | Keyboard      | Gamepad | Buttons   |\n|------------------|---------------|---------|-----------|\n| Move Left        | Left Arrow    | Left    |           |\n| Move Right       | Right Arrow   | Right   |           |\n| Rotate Clockwise | Up Arrow or X | Up or A | Button #2 |\n| Drop: Soft       | Down Arrow    | Down    | Button #1 |\n| Drop: Hard       | Z             | B       |           |\n| Quit (reload)    | Enter         | Start   | Button #3 |"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eConfiguration\u003c/h2\u003e\n\u003ch3\u003eDisplay\u003c/h3\u003e\n\u003cp\u003eFruitris defaults to a resolution of 640x480. In order to utilize another supported resolution, add the \u003ccode\u003eCIRCUITPY_DISPLAY_WIDTH\u003c/code\u003e environment variable to your \u003cstrong\u003eCIRCUITPY/settings.toml\u003c/strong\u003e file. You can learn more about this setting and how to change it here within the \u003ca title=\"Documentation on environment variables\" href=\"https://docs.circuitpython.org/en/latest/docs/environment.html#circuitpy-display-width-circuitpy-display-height-and-circuitpy-display-color-depth-rp2350-boards-with-dvi-or-hstx-connector\" target=\"_blank\"\u003eCircuitPython documentation\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThe following resolutions are supported:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e720x400 - 1.8:1 widescreen aspect ratio with small text\u003c/li\u003e\n\u003cli\u003e640x480 - 4:3 square aspect ratio with small text\u003c/li\u003e\n\u003cli\u003e360x200 - 1.8:1 widescreen aspect ratio with large text and extended color palette\u003c/li\u003e\n\u003cli\u003e320x240 - 4:3 square aspect ratio with large text and extended color palette\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eNeoPixels\u003c/h3\u003e\n\u003cp\u003eAt the moment, neopixel support is experimental as it may cause display stability issues. In order enable neopixel output, change the \u003ccode\u003eNEOPIXELS\u003c/code\u003e constant from \u003ccode\u003eFalse\u003c/code\u003e to \u003ccode\u003eTrue\u003c/code\u003e within \u003cstrong\u003ecode.py\u003c/strong\u003e on \u003ca title=\"code.py:L47\" href=\"https://github.com/relic-se/Fruit_Jam_Fruitris/blob/b9fdb5471a53deac4e75050c4370721176de317a/src/code.py#L47\" target=\"_blank\"\u003eline 47\u003c/a\u003e (subject to change).\u003c/p\u003e\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  \n  \n  \n        \u003ch2\u003eParts\u003c/h2\u003e\n\u003cp\u003eI am using a production revision D Fruit Jam board. Most additional components can likely be found around the house such as HDMI cable \u0026amp; display, headphones, power supply, etc. The controller system is designed to be as compatible as possible. So, most USB controller devices should work or even a USB keyboard.\u003c/p\u003e\n\u003cp\u003eIt is possible to use a Metro RP2350 which is discussed in learn guides such as\u0026nbsp;\u003ca href=\"https://learn.adafruit.com/larsio-paint-music\"\u003eLarsio Paint Music\u003c/a\u003e., but this guide will not discuss that procedure nor has the software been tested within that environment.\u003c/p\u003e\n\u003ch3\u003eFrom the Adafruit Shop\u003c/h3\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6200","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/6285","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/1966","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/1363","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/608","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/5802","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/1667","metadata":{}},{"element_type":"text","content":"\n  \n  \n        \u003ch2\u003eInstallation\u003c/h2\u003e\n\u003ch3\u003eUpdating CircuitPython\u003c/h3\u003e\n\u003cp\u003eAt this time (August 13th, 2025), CircuitPython 10.0.0-beta.2 is the most recent build for Fruit Jam. Some specific features such as song tempo increase requires a version newer than that release. It is recommended to use the \u003ca href=\"https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/adafruit_fruit_jam/\" target=\"_blank\"\u003eabsolute newest firmware version for Fruit Jam\u003c/a\u003e until 10.0.0-beta.3 is released.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https://circuitpython.org/board/adafruit_fruit_jam/\" target=\"_blank\"\u003eFruit Jam CircuitPython Download\u003c/a\u003e page\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\u003e(charge-only cables won't work!)\u003c/em\u003e\n\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 \u003cstrong\u003eRP2350\u003c/strong\u003e appears, copy the UF2 file onto it. After the copy finishes, you should see the \u003cstrong\u003eRP2350\u003c/strong\u003e drive disappear and soon after that a new \u003cstrong\u003eCIRCUITPY\u003c/strong\u003e drive should appear.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3\u003eInstall Project Bundle\u003c/h3\u003e\n\u003cp\u003eYou can view the code on the \u003ca href=\"https://github.com/relic-se/Fruit_Jam_Fruitris\" target=\"_blank\"\u003erelic-se/Fruit_Jam_Fruitris\u003c/a\u003e code repository on GitHub. It is recommended to download the \u003cstrong\u003eFruit_Jam_Fruitris.zip\u003c/strong\u003e asset from the most recent project release to obtain a pre-packaged version of the program with all library dependencies.\u003c/p\u003e\n      \n\n","metadata":{}},{"element_type":"button","content":"https://github.com/relic-se/Fruit_Jam_Fruitris/releases","metadata":{"button_type":"primary","icon":"","target":"_blank","zip_folder":"false"}},{"element_type":"text","content":"\n  \n        \u003cp\u003eTo copy the project bundle files to your \u003cstrong\u003eCIRCUITPY\u003c/strong\u003e drive:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eVisit the project releases page and download the latest release's \u003cstrong\u003eFruit_Jam_Fruitris.zip\u003c/strong\u003e file using the \"Download Project Bundle\" button above.\u003c/li\u003e\n\u003cli\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 \u003cstrong\u003ecode.py\u003c/strong\u003e file and a handful of other files and folders.\u003c/li\u003e\n\u003cli\u003eCopy all of this folder's contents to your \u003cstrong\u003eCIRCUITPY\u003c/strong\u003e drive so that \u003cstrong\u003ecode.py\u003c/strong\u003e is in the root folder.\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\u003ch4 class=\"p2\"\u003e\u003cspan class=\"s1\"\u003eAlternate Installation: Fruit Jam OS\u003c/span\u003e\u003c/h4\u003e\n\u003cp\u003e\u003cspan class=\"s1\"\u003e\u003cem\u003e\u003cstrong\u003eFruitris\u003c/strong\u003e\u003c/em\u003e is compatible with \u003cem\u003e\u003cstrong\u003eFruit Jam OS\u003c/strong\u003e\u003c/em\u003e and will show up as a valid application to load into and back out of. If you are using\u0026nbsp;\u003ca href=\"https://github.com/adafruit/Fruit-Jam-OS\" target=\"_blank\"\u003eFruit Jam OS\u003c/a\u003e on your device, follow the above installation instructions but instead of copying the program assets into the root folder in step #3, do the following:\u003c/span\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cspan class=\"s1\"\u003eCreate a new folder within \u003cstrong\u003eapps\u003c/strong\u003e called \u003cem\u003eFruit_Jam_Fruitris\u003c/em\u003e so that your folder path is \u003cstrong\u003eCIRCUITPY/apps/Fruit_Jam_Fruitris/\u003c/strong\u003e.\u003c/span\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan class=\"s1\"\u003eCopy all files except for the \u003cstrong\u003elib\u003c/strong\u003e folder into that location.\u003c/span\u003e\u003c/li\u003e\n\u003cli\u003e\u003cspan class=\"s1\"\u003eIn order to ensure that all dependencies are installed, copy the \u003cstrong\u003elib\u003c/strong\u003e folder into the root folder of the\u0026nbsp;\u003cstrong\u003eCIRCUITPY\u003c/strong\u003e drive. If asked to merge this folder, select \"Yes\". If given the option to apply to all file operations, select \"Yes\" as well. \u003cem\u003eThis procedure may be different depending on your desktop environment.\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e\n\u003c/ol\u003e\n      \n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n        \u003ch2\u003eCircuitPython Code\u003c/h2\u003e\n\u003cp\u003eThe majority of the game logic is handled by\u0026nbsp;\u003cstrong\u003ecode.py\u003c/strong\u003e. The only exception to this rule is USB host is managed by\u0026nbsp;\u003cstrong\u003egamepad.py\u003c/strong\u003e and\u0026nbsp;\u003cstrong\u003eusb_descriptor.py\u003c/strong\u003e which I will not go into within this post. To learn more about USB host game controller support, I highly recommend checking out \u003ca href=\"https://adafruit-playground.com/u/SamBlenny\"\u003eSam Blenny's\u003c/a\u003e \u003ca href=\"https://adafruit-playground.com/u/SamBlenny/pages/fruit-jam-gamepad-tester\"\u003eFruit Jam Gamepad Tester\u003c/a\u003e of which this code is based on.\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eTetromino logic is based on my work on \u003ca href=\"https://github.com/relic-se/megamachine-tetris\" target=\"_blank\"\u003eMegaMachine Tetris\u003c/a\u003e from 2019 in case your interested.\u003c/em\u003e\u003c/p\u003e\n\u003ch3\u003ecode.py\u003c/h3\u003e\n      \n\n\n\n\n","metadata":{}},{"element_type":"embed","content":"https://github.com/relic-se/Fruit_Jam_Fruitris/blob/main/code.py"}]