#๐ I need help getting my script to run properly for a raspberry pi 4 project.
40 messages ยท Page 1 of 1 (latest)
@wheat mason
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
why was my message deleted?
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
hmm, text wasn't long... I had two attachments that was the code and an image. Are those the issue?
yeah
alright. Do I need to delete this and try the question again then with just the codeblock and explanation?
u can continue here just paste ur code in these and write ur explaination
DESCRIPTION: My project uses a raspberry pi, a button attached using a GPIO board, a recording and listening device attached via USB, and of course python script to run the program. someone pushes the button and records a message. The next person that hears the message replies to it, and the game continues. When a user pushes the button, they will hear instructions on what to do. then the most recent message is played and a 'beep' noise indicating it's time for them to record their response. They then hang up the phone and the process starts over.
I have appx 60% of the script written but the program is not functioning well, so I am asking for help.
that's the code.
you've got a bunch of functions but you don't run them
unless you're running this from a different file
no mvm the try block confused me
can you say what's the problem?
what's not working
is it the button, the recording device, something else?
button works, recording and playback audio both work.
the primary issue (among others) is that I can't get the whole program to restart itself if the button is pushed at any time.
here's a flowchart I'm using for the whole project as a plan
you can run the program and a function that handles the button on 2 different threads
that way u can stop the program while recording audio for example
I don't necessarily want any part of the program, recording, playback or otherwise to continue if the button is pressed. I want the whole thing to start over from the beginning.
Your while True is blocked while recording so button checks or max length check are not getting done
Do you by chance have the code snippet to fix that? I'm a novice at this stuff
As DORON said put something in another thread
so, I'm not even sure what another thread is. I'm a complete novice at this stuff and had ChatGPT help me get this far. Honestly, I would like to just hire someone to finish the code since it 's not my forte. Is there a place on this discord where I can request help on a project for pay?
I'm not sure if that's ok with the mods... but this community has many people who are willing to help for free
your post just kinda fell through the cracks
you can try to post again with more specific questions and people will help u
also maybe try asking at #microcontrollers as well
!rule paid
Nope. You can try fiverr or upwork or something like that.
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.