[{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003cp\u003eAnyone who has seen the miniature 3D printed Trek and Star Wars ships hanging over my workbench (thanks, Thingiverse!) won't be surprised how many of my projects take an SF bent. But I've\u0026nbsp;\u003cem\u003ealso\u003c/em\u003e got a space station!\u003c/p\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/189/original/ds9.jpg?1727139839","metadata":{"caption":"Space Station DS9"}},{"element_type":"text","content":"\n  \n  \n        \u003cp\u003eAnd\u0026nbsp;\u003cstrong\u003ethat\u003c/strong\u003e inspires this Circuit Playground Express project - launching probes into the \u003ca href=\"https://memory-alpha.fandom.com/wiki/Bajoran_wormhole\" target=\"_blank\"\u003eBajoran Worhmhole\u003c/a\u003e!\u003c/p\u003e\n\u003cp\u003eI've got a repository for the code at \u003ca href=\"https://github.com/mrklingon/DS9-game/\" target=\"_blank\"\u003eDS9-game:\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eThere are three files, two CircuitPython, and one JavaScript (or you can follow the makecode.com link)\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eds9.js - Javascript/Makecode version of game (\u003ca href=\"https://makecode.com/_KhmDoYXCpVdh\"\u003ehttps://makecode.com/_KhmDoYXCpVdh\u003c/a\u003e)\u003c/li\u003e\n\u003cli\u003eds9.py - CircuitPython version (rename to code.py)\u003c/li\u003e\n\u003cli\u003ebach.py - helper code for music and sounds for ds9.py\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eIt is a pretty simple game using the Circuit Playground circle of neopixels.\u003c/p\u003e\n\u003cp\u003eThe premise is the space station Deep Space Nine (a blue neopixel) is in motion near the Bajoran Wormhole (a neopixel of shifting color). As the station shifts back and forth, the wormhole remains the same distance (five neopixels away). The station is launching automated probes to the wormhole -\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eA\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003esends them counter-clockwise,\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eB\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003esends them in a clockwise direction. You have ten probes to launch - if they successfully enter the wormhole, there will be a rainbow of neopixels across all ten. When you have sent all ten, you'll see pixels representing how many you managed to send into the wormhole (0-10). For the Makecode version, shake the CPX to restart. For the CircuitPython version press\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eA\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eor\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eB\u003c/strong\u003e.\u003c/p\u003e\n\u003cp\u003eBoth versions make a sound when launching the probe, and will play a scale or musical flourish when you succeed. To turn that off, slide the switch to the left. To the right turns the game sounds on.\u003c/p\u003e\n\u003cp\u003eI found the differences in coding Makecode and CircuitPython versions interesting. With Makecode I could have multiple \"forever\" loops handling different actions - toggling Booleans to activate/deactivate them. With CircuitPython I used a single game loop and controlled the movement of the probe with a Boolean and a counter (it can only go 4 steps). The same Boolean prevents the\u0026nbsp;\u003cstrong\u003eA/B\u003c/strong\u003e buttons from launching more than one probe at a time.\u003c/p\u003e\n\u003cp\u003eGive it a try - see how many you can get to land in the wormhole!\u003c/p\u003e\n      \n\n","metadata":{}}]