[{"element_type":"image_url","content":"https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Orrery_small.jpg/300px-Orrery_small.jpg","metadata":{"alt":"Mechanical","caption":"A small orrery showing Earth and the inner planets"}},{"element_type":"text","content":"\n        \u003cp\u003eFor hundreds of years, the clockwork \u003ca title=\"Orrery\" href=\"https://en.wikipedia.org/wiki/Orrery\" target=\"_blank\"\u003eorrery \u003c/a\u003ehas been a way to demonstrate the movement of planets around the sun - as Wikipedia describes them: \"An orrery is a mechanical model of the Solar System that illustrates or predicts the relative positions and motions of the planets and moons, usually according to the heliocentric model. \"\u003c/p\u003e\n\u003cp\u003eIt occurred to me that, the circular display of ten neopixels on the Circuit Playground might be a way to make a different kind of orrery... so I did. My programs are in this \u003ca title=\"Orrery repository\" href=\"https://github.com/mrklingon/Orrery/\" target=\"_blank\"\u003erepository \u003c/a\u003eand consist of three programs:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003eorrery.js - Javascript/Makecode version for the Circuit Playground (https://makecode.com/_EHeh61h4Dcvo\u0026nbsp;for the Makecode IDE version)\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eorrery.py - Circuit Python version for the Circuit Playground (copy to code.py on the device)\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eneo-orrery.py - Circuit Python version for the NeoTrinkey\u0026nbsp; - again, copy to code.py on the device (you didn't think I'd leave the NeoTrinkey out did you?)\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eI opted to just do Mercury, Venus, Earth and Mars - adding more planets was too cluttered, plus the relative speeds of the inner planets are easier to see.\u003c/p\u003e\n\u003cp\u003eAll versions start by showing Mercury (pale white), Venus (yellow), Earth (green) and Mars (red) as neo pixels moving at their relative speeds around the sun - from Mercury the fastest to Mars the slowest.\u003c/p\u003e\n\u003cp\u003eEach can switch to a random setting, changing the color and speeds of the four planets.\u003c/p\u003e\n\u003cp\u003eMakecode version: \"A\" stops/starts motion, \"B\" sets up a random solar system, and \"Shake\" resets to defaults.\u003c/p\u003e\n\u003cp\u003eCircuit Python Playground version: \"B\" sets up a random solar system and \"A\" resets to defaults\u003c/p\u003e\n\u003cp\u003eCircuit Python NeoTrinkey version: Touch pad #2 to get a random solar system and pad #1 to reset to defaults\u003c/p\u003e\n\u003cp\u003eNOTE:\u003c/p\u003e\n\u003cp\u003eThe mechanics of the simulation are simple. Each program has a loop that increments a counter for each \"planet.\"\u0026nbsp; There is a table of periods for each planet, an integer that is 100 times the length of the planet year, so, for example, Mercury's period is 22 and Earth's is 100. When a planet's counter reaches the value of its period, the counter is cleared and the planet's position is advanced one position.\u003c/p\u003e\n      ","metadata":{}}]