Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Running a Portal Gun on MicroPython
Post Flair (click to view more posts with a particular flair)
Post Body

I have a very basic understanding of Python and its various flavours, but I’m still very new to programming and have no idea how to do overly complex work.

I’m wanting to use a pi-pico to run neopixel sequences for a portal gun I’m building, and I’ve got the actual color sequences written out, but I don’t know how to best write them up to work with a two-position switch.

As it stands, I’ve got two separate programs written: blue_portal.py and orange_portal.py, and I’m wanting to use a hardware switch to tell the pico to swap between them to change the color. I know that the cleaner method would be to write them all up in one single file, but that is far beyond my current understanding of Python.

If someone could look at what I’ve got so far, and help me get everything properly merged into one clean file, I would greatly appreciate it.

Paste Bin of the Neopixel library, the example code I’m working from, and the two color sequences I’ve put together, for reference.

https://paste.pythondiscord.com/SAWQ

Author
Account Strength
100%
Account Age
4 years
Verified Email
Yes
Verified Flair
No
Total Karma
32,404
Link Karma
478
Comment Karma
31,918
Profile updated: 1 week ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 months ago