Skip to main content

Attempt to ask ChatGPT to write python

· 2 min read
Daniel Fang
AI, Robotics & LEGO Enthusiast

The team is struggling with writing Python for the first time! It's so hard, and we don't know where to start. Drag-and-drop coding in the code blocks was so easy, but now we need to learn Python and figure out what to do. The Spike Prime has some examples, but they're not so easy to understand for us.

We turned to ChatGPT for help. It does output lots of code, but it doesn't run on the app. Why? We asked our coach for help and learned that the Spike Prime only uses a specific set of Python, and the robot only knows some of the functions but not all.

It turns out that Spike Prime uses MicroPython, which is a simplified version of Python designed for microcontrollers and embedded systems. This means that not all standard Python libraries and functions are available. Some of the code that ChatGPT provides uses functions that the Spike Prime doesn't support.

This was a bit disheartening at first. We thought that learning Python would open up new possibilities, but instead, we hit a wall. However, we realized that this is just another challenge to overcome. We're now focusing on learning the specific commands and functions that are available in Spike Prime's MicroPython environment.

It's still tough, but we're making progress. We're finding tutorials and resources specifically for Spike Prime's Python coding. We're also experimenting with small bits of code to see what works and what doesn't. It's a learning process, and while it's frustrating at times, it's also exciting to see our robot respond to the code we've written.

In the end, we're hopeful that with perseverance and a better understanding of Spike Prime's Python capabilities, we'll be able to code like pros. For anyone else struggling with this, know that you're not alone, and don't hesitate to seek help and keep experimenting!