Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md could use section for beginners about common mistakes #196

Open
Redsandro opened this issue Jan 31, 2024 · 5 comments
Open

README.md could use section for beginners about common mistakes #196

Redsandro opened this issue Jan 31, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Redsandro
Copy link

Redsandro commented Jan 31, 2024

Feature Request 🚀

Is your feature request related to a problem? Please describe.

I am a complete beginner with MicroPython and MicroPico on VSCode. I have been using VSCode for other purposes on Linux for years, everything running smooth and happy. Pretty vanilla with some language extensions for node and javascript. I switched to VSCodium last year, which is almost identical but without telemetry. I though I knew VSCode until I tried this MicroPico workspace extension.

After installing MicroPico, I'm running into all kinds of problems that I never had before, don't understand and can't resolve. I've obviously made some mistakes and I'm missing VSCode knowledge that I was able to do without until now.

  1. When I want to work on a project, I go into the folder and run code . Since MicroPico, VSCode opens twice. One time the project I want to open, and one time the test project I created for my Raspberry Pi Pico.
  2. I can see my device's files in the Raspberry Pi Pico project, but the terminal opens to my local tree. The Raspberry Pi Pico remote terminal opens on the second instance of VSCode. I can open one on the first instance, but it doesn't remember the next time.
  3. I get the popup to install Pylance or revert to Jedi every time. It doesn't matter what I choose, I keep getting the same popup.
  4. The status bar is alerting me to select an interpreter. It doesn't matter what I choose. The alert stays.
  5. Now something called ptyHost fileWatcher is constantly using 100% CPU as long as VSCode is open, making my laptop fan blow as if I'm doing a stress test, draining my battery. I don't know how to turn it off.

image

Describe the solution you'd like

I'd like the README.md to address beginner issues and common mistakes.

Describe alternatives you've considered

I have spend many hours searching for help, talking to Bard, talking to ChatGPT, getting nowhere. For now I have switched to Thonny, but it doesn't compare to VSCode.

Teachability, Documentation, Adoption, Migration Strategy

It would help the tinkerer relax their mind if they can start programming without having to deal with these issues first.

@Redsandro Redsandro added the enhancement New feature or request label Jan 31, 2024
@JPH-Botron
Copy link

I agree with the above. Creating this entire extension had to be a major time sink in the first place, but without a better idea of how and what it does it loses most of its utility. The many web tutorials work, but nothing beyond a very simple single file example seems to be operational. I'm trying to handle a project with multiple .py files, and I have no idea if: (1, That isn't supported (2. It used to be supported, but not anymore (3. Supported, but you have to know the tricks to make it work. It's noteworthy that not a single tutorial talks about working with multiple files, although the code appears to have a significant chunk of filesystem support. In short, it looks like you've probably done a great job and put in a lot of effort, but without any real documentation, it loses most of its (probable?) value outside a very small circle.

@vbakke
Copy link

vbakke commented Feb 6, 2024

Totally agree. This is my first MicroPython project as well, and MicroPico has a few quirks, like when you change a library file.

I'd be happy to create a suggestion with multiple files, e.g. using the onboard led and temp sensor.

What would we need to highlight?

  • A main file in root, and a sencond file in a sub directory
  • How to upload and run, after altering the files
    Anything else?

It needs to be short and simple. Yet show the essentials.

@Redsandro
Copy link
Author

What would we need to highlight?

I just need to feel like I understand what is happening.

  • What are these recommended plugins triggered by MicroPico, and should a beginner reject them?

The immediate rivalry with epic battles fought out between two characters called Pylance and Jedi, one single click after installing MicroPico, is a bit overwhelming. And the question which one should rule the earth (There Can Only Be One) keeps popping up every time you start VSCode, regardless of the choice you make. Who are they? How can I shut them up? Eventually I removed all recommended extensions and the fight is finally over. VSCode still recognized Python just fine and even does basic code completion. I don't understand what just happened and what I'm missing, but my laptop no longer blows its fans like an airplane whenever I start VSCode.

  • How to use MicroPico and Workspaces properly from VS Code point of view.

Since installing MicroPico, VSCode opens two windows racing to connect to the Pico. I don't understand why. This seems buggy but I probably need to click a single option somewhere in VSCode settings or MicroPico settings or Workspace settings.

  • How configure MicroPico to run code from the editor straight on the Pico.

Every time I do this, I get MemoryError: Memory allocation failed, allocating 90000 bytes. 90k, that's a lot of memory for the Pico. I often have only 40k free. It can probably be configured to use less, but how? On Thonny IDE I get no such error.

@vbakke
Copy link

vbakke commented Feb 12, 2024

Hmm... I don't get any of these issues that you are describing here.
I just followed the MicoPico 'Getting Started' and it all worked fine. No Jedi. No double windows. And no memory error. Sorry.

@Redsandro
Copy link
Author

I don't get any of these issues that you are describing

I just tried on a different machine with a different Pico. Same issues. Especially the two instances of VSCode opening is annoying and causes extra problems. I'm running v1.85.2 on Linux. Are you running VSCode on Linux?

@paulober paulober added the documentation Improvements or additions to documentation label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants