I am making a walkie talkie type device with a potentameter, button, oled screen and a microphone and speaker im wondering whats the best way to structure my code and structure it in the best way. please let me know if there any recommended way.
I moved your topic to an appropriate forum category @ioack .
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I think if you work on integrating the components one at a time and getting a feel for each chunk of code, the answer will become self evident for your own personal style.
One structure is the IPO model. That stands for Input, Processing, Output. Read the inputs to gather information, process the information, act on the information.
A state machine is a way to organize the program. A state or states to get the input data, state or states to process and state or states to ourput to dislpay, speaker, etc.
does the walkie talkie use separate radio and audio circuits controlled by the pot and button and the software is just some fancy interface?
or is communication of something more related to software such as WiFi, Bluetooth, SMS, ... because the communication software would be the challenging part
I might take that as a compliment, but ChatG has a personality.
The speaker is the talkie along with the slider as an analog(ue) input (as the mic) because the sim has none (yet). Button can initiate the PTT. Pot can be squelch and volume. OLED... who needs one on a walkie talkie?
For post #1. I consider what and why similar enough to send the message in context... but I see your point... as it would have answered question #1.
This number was settled upon for the sim. Too little and the sim wouldn't even open the Serial Monitor. Too much and the tones (talkie) would drag. I commented-out the "walkie-talkie" part because that can be solved with a GSM... or a USD$10 walkie-talkie. I neglected to remove the delay after removing the walkie-talkie part.
Whoever is the Badges Minister out there, I would like a badge for "produces chat-like code."