Have you ever thought how cool it'd be to hold the vast universe in the palm of your hand—as if you could bottle it up and place it on your desk?
That little idea was where this whole project started.
I wanted to do more than just look at space—I wanted to bring the swirling dance of the planets to life in an interactive way, right on a tiny device. The M5Stack Core 2 packs an integrated capacitive touchscreen and a built-in speaker. These features made it possible to create a compact, touch-based simulation of planetary motion.
It’s not just a display—it’s an interactive way to play with the planets’ motion and see how gravity shapes our cosmos. As you move the planets with your fingertips, the fundamental principles that govern the universe are visualized in miniature, offering both a playful and educational experience.
Features- Interactive Planet Placement: Tap the screen to add planets anywhere in the simulation space.
- Dynamic Motion Control: Swipe to give planets an initial velocity, allowing you to explore orbital dynamics and collisions.
- Real-Time Gravity Simulation: Planets respond to each other’s gravitational pull, demonstrating the principles of Newtonian mechanics in a visually engaging way.
- Compact and Portable: Runs entirely on the M5Stack Core2, making the universe literally fit in your hand.
- Audio Feedback: Built-in speaker provides sound effects, enhancing the sense of immersion as planets impact.
- Register an M5Stack Community account if you haven't already.
- Launch the M5Burner .
- Click
USER CUSTOMin the lower left corner. - Log in to the M5Stack Community.
- Click the
Share Burnbutton. - Enter
UwE1Ekq5yMOozHfkin theShare Codefield. - Click the lightning icon ⚡.
- Clone the repository:
git clone https://github.com/cubic9com/m5core2_gravsim.git
cd m5core2_gravsim- Install Visual Studio Code if you haven't already.
- Open the project in Visual Studio Code:
code .- Install
PlatformIO IDEextension: Go to the Extensions view (Ctrl+Shift+X). Search forPlatformIO IDEand install it. - Open PlatformIO Home: In the left Activity Bar, click the PlatformIO icon. In the left Primary Sidebar, Go to
QUICK ACCESS > PIO Home > Open. - Open the project: In the right Editor Groups, Click
Open Projectin thePIO HOMEtab. Select the clonedm5core2_gravsimproject folder. - Upload the project: In the left Primary Sidebar, go to
PROJECT TASKS > m5stack-core2 > General > Upload.
- To interact with the simulator, simply tap the screen to place a planet and swipe to set its initial velocity.







Comments