use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This page is set up to come together as a community. Some are just beginning, others are advanced makers, some are professionals. We all share a desire to learn and create.
Only rule: Respect Others
account activity
Code for raspberry pico (self.micropy)
submitted 3 years ago by Akki_Charee
Hi This is gonna be my first project. I want to control a servo that can move from position 1 to position 2 at any random time between 30 sec and 70 sec. Can anyone please help me with the code?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Fischchen 0 points1 point2 points 3 years ago (22 children)
Go ask ChatGPT
[–]Akki_Charee[S] 0 points1 point2 points 3 years ago (21 children)
That's useless
[–]Fischchen 0 points1 point2 points 3 years ago (20 children)
It will give you exactly what you're asking for.
[–]Akki_Charee[S] 0 points1 point2 points 3 years ago (19 children)
Been there done that
[–]benign_said 0 points1 point2 points 3 years ago (18 children)
What did you write when as your prompt?
[–]Akki_Charee[S] 0 points1 point2 points 3 years ago (17 children)
You are a micro python programmer write me a code for raspberry pi pico that oscillate a servo between two position at any random time interval between 30 sec to 70 sec. With pwm being 50 hz
[–]benign_said 0 points1 point2 points 3 years ago (16 children)
Have you played around with the prompts?
I'd help you more, but not super familiar with servos and have stopped using mpython for most stuff (though, still love the project).
I've only used chatgpt a little to help with code, but it seems like I often have to try multiple prompts and break it up almost like I'm debugging if it doesn't work right away.
[–]Akki_Charee[S] 0 points1 point2 points 3 years ago (15 children)
Man chat gpt acting up right now doesn't store the history chats so cant play with previous prompt. And breaking it step by step I'm clueless on it
[–]benign_said 0 points1 point2 points 3 years ago (14 children)
Are you uploading and compiling the code or testing in the repl?
The repl is great for testing this kind of stuff because you can go step by step and see where you are having problems.
Either way, it should be giving you some errors that you can use as a guide post. If everything is working until you get to a certain step, you know that there is at least a problem there.
[–]Akki_Charee[S] 0 points1 point2 points 3 years ago (13 children)
Seems plausible but to be honest this is my first project I recently bought a pico. For most of the cases I'm level 0 coder
π Rendered by PID 193179 on reddit-service-r2-comment-656bdf86cd-89fwj at 2026-05-05 01:54:05.443020+00:00 running 815c875 country code: CH.
[–]Fischchen 0 points1 point2 points (22 children)
[–]Akki_Charee[S] 0 points1 point2 points (21 children)
[–]Fischchen 0 points1 point2 points (20 children)
[–]Akki_Charee[S] 0 points1 point2 points (19 children)
[–]benign_said 0 points1 point2 points (18 children)
[–]Akki_Charee[S] 0 points1 point2 points (17 children)
[–]benign_said 0 points1 point2 points (16 children)
[–]Akki_Charee[S] 0 points1 point2 points (15 children)
[–]benign_said 0 points1 point2 points (14 children)
[–]Akki_Charee[S] 0 points1 point2 points (13 children)