[{"element_type":"image_url","content":"https://www.gutenberg.org/cache/epub/61845/pg61845.cover.medium.jpg","metadata":{"alt":"1940","caption":"1940 \"Planet\" Pulp SF magazine cover"}},{"element_type":"text","content":"\n        \u003ch1 class=\"heading-element\"\u003eGalaxy Explorer\u003c/h1\u003e\n\u003cp\u003e\u003ca id=\"user-content-galaxy-explorer\" class=\"anchor\" href=\"https://github.com/mrklingon/Galaxy-Explorer/blob/main/README.md#galaxy-explorer\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eHere's a \u003ca title=\"github repository\" href=\"https://github.com/mrklingon/Galaxy-Explorer/\" target=\"_blank\"\u003eproject \u003c/a\u003ethat combines ideas from my\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://adafruit-playground.com/u/mrklingon/pages/is-that-a-good-idea-building-a-one-dimensional-starfighter-game\"\u003eone-dimensional arcade game\u003c/a\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eand\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://adafruit-playground.com/u/mrklingon/pages/is-that-a-good-idea-building-a-one-dimensional-starfighter-game\"\u003eorrery project\u003c/a\u003e. Think \"1930's pulp science fiction\" and you'll get the idea: The Circuit Playground lets you navigate a galaxy defined in a 100 element array with around 60 stars. You can stop at any one of the solar systems and observe an orrery-like display of the movement of the planets.\u003c/p\u003e\n\u003cp\u003eFor me, the fun here is creating a UI with the CPX controls:\u003c/p\u003e\n\u003cp\u003eThe program has three states:\u003cbr\u003e\u003cstrong\u003etravel\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003e- move through the galaxy\u003cbr\u003e\u003cstrong\u003estop\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003e- choose a star displayed on the ten neopixels\u003cbr\u003e\u003cstrong\u003eexplore\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003e- goes into\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003eorrery\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003emode showing the planets in the chosen star-system\u003c/p\u003e\n\u003cp\u003eWhen in\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003etravel\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003estate, the\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eA\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eand\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eB\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003ebuttons increase the speed of the movement of the stars. A: clockwise, B: counter-clockwise. Multiple clicks increase the speed.\u003c/p\u003e\n\u003cp\u003eWhen in\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003estop\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003estate, the\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eA\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eand\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eB\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003ebuttons move a blinking white pixel to select a star. A:move counter-clockwise, and B:clockwise. (yes, the opposite of\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003etravel\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003emode).\u003c/p\u003e\n\u003cp\u003eChange state by pressing\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eA+B\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003e- state cycles from\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003etravel\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eto\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003estop\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eto\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003eexplore\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eand back to\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003etravel\u003c/em\u003e. In\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003estop\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003emode, you cannot move to\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eexplore\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eunless the blinking pixel is on one of the stars.\u003c/p\u003e\n\u003cp\u003eAt any point, shifting the\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003eswitch\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003eto the left, turns off all the neopixels and switches the system to\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003etravel\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003emode.\u003c/p\u003e\n\u003cp\u003eWhen the switch is shifted to the left,\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cem\u003eshaking\u003c/em\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003ethe CPX will show all neopixels in green and generate a new galaxy.\u003c/p\u003e\n\u003cp\u003eBoth versions, CircuitPython or Makecode work the same.\u003c/p\u003e\n\u003cp\u003eThe generation of the galaxy creates two 100 element arrays. One defines the stars, and the other the \"type\" of solar system. When in\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003cstrong\u003eexplore\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;\u003c/span\u003emode, the defined colors and speed of the planets is set based on an algorithm.\u003c/p\u003e\n\u003cp\u003e\u003ca title=\"Galaxy \" href=\"https://github.com/mrklingon/Galaxy-Explorer/\" target=\"_blank\"\u003e\u003cstrong\u003eGithub Repository\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFiles\u003c/strong\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca title=\"javascript code\" href=\"https://github.com/mrklingon/Galaxy-Explorer/blob/main/explore.js\"\u003eexplore.js\u003c/a\u003e - or makecode version:\u003cspan\u003e\u0026nbsp;\u003c/span\u003e\u003ca href=\"https://makecode.com/_Wt9P3udHMKjR\"\u003ehttps://makecode.com/_Wt9P3udHMKjR\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ca title=\"source code for explore.py\" href=\"https://github.com/mrklingon/Galaxy-Explorer/blob/main/explore.py\" target=\"_blank\"\u003eexplore.py\u003c/a\u003e - copy to code.py on a Circuit Playground with CircuitPython\u003c/li\u003e\n\u003c/ul\u003e\n      ","metadata":{}}]