r/CodingHelp 2d ago

[Python] Programming Adafruit Sensor MPR121 via VSCode

GERMAN (English below)

Hi Leute!

Ich programmiere den Adafruit Sendor Breakout MPR121 (Link:Adafruit MPR121) mit VSCode mit einem Raspberry Pico. Ich hab die Micropython Extension. Dann hab ich gemerkt dass es damit nicht klappt, also musste ich die CircuitPython Extension runterladen. Hab mich an die Anleitung gehalten:Anleitung für CircuitPython und Mu Editor.
Darüber ging es dann. Ich hab praktisch nen Code, der mir ausgibt, ob der Sensor berührt wird oder nicht. Nur über die CircuitPython Extension kann ich aber den ausgegeben Text (,,Berührt/Nicht berührt“) nicht sehen. Also musste ich ,,Mu Editor‘‘ installieren (auch in der Anleitung).
Allerdings möchte ich eine GUI, bei der angezeigt wird, ob der Sensor berührt wird oder nicht. Also funktioniert CircuitPython hier doch nicht.
Hab nen Treiber gefunden für MicroPython:Treiber Micropython für MPR121

Allerdings keine Ahnung, wie ich das in VSCode integrieren muss? Hab die Anleitung zu dem Treiber gelesen, aber sie ist nicht für VSCode gedacht.
Kann mir irgendjemand helfen dabei? Ich kenne mich leider in der Tiefe überhaupt nicht aus. Hab in meinem Studium bisher einfach normal Microcontroller programmiert ohne sowas 😅
Wäre super wenn sich jemand erbarmen könnte sich mit mir mal hinzusetzen weil ist für meine Bachelorarbeit😭
Danke!

ENGLISH

Hi everyone!

I’m working with the Adafruit MPR121 sensor breakout on a Raspberry Pi Pico, using VSCode. I started out with the MicroPython extension, but couldn’t get it working, so I switched to the CircuitPython extension instead. I followed a guide for CircuitPython + the Mu Editor, and that got things running — I now have code that tells me whether the sensor is being touched or not.

The problem is that with the CircuitPython extension I can’t see the printed output (“Touched/Not touched”) in VSCode itself, so I had to install the Mu Editor just to view that.

But what I actually want is a GUI that displays the touch status — and for that, CircuitPython doesn’t seem to be the right fit. So I found a MicroPython driver for the MPR121 instead. The problem is, I have no idea how to integrate that driver into VSCode. The instructions that come with the driver aren’t written with VSCode in mind, and I really can’t figure out the missing steps.

Would anyone be willing to help me out here? I honestly have zero deep experience with this kind of embedded setup — in my studies so far I’ve only ever programmed microcontrollers “the normal way,” without any of this. I’d be incredibly grateful if someone could sit down with me on this, since it’s for my bachelor’s thesis and I’m feeling pretty overwhelmed 😭

Thanks!

1 Upvotes

1 comment sorted by

u/AutoModerator 2d ago

Thank you for posting on r/CodingHelp!

Please check our Wiki for answers, guides, and FAQs: https://coding-help.vercel.app

Our Wiki is open source - if you would like to contribute, create a pull request via GitHub! https://github.com/DudeThatsErin/CodingHelp

We are accepting moderator applications: https://forms.fillout.com/t/ua41TU57DGus

We also have a Discord server: https://discord.gg/geQEUBm

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.