Go Down

Topic: PLEASE HELP !!! BEGINNER PROGRAMMING TO RUN OBJECTS AT THE SAME TIME (Read 297 times) previous topic - next topic

x3xplosiiv3x

Hello everyone,

Long story short I had an Arduino laying around and wanted to put it to use for a school project. I got everything wired up and running with some basic code. I have absolutely zero experience with any type of code. I have a servo, leds, LCD screen, and a speaker all hooked up to my arduino uno, but they run in sequence in my loop(); code. my leds would turn on then the LCD start, then the servo moves and then the speaker plays. I need all of that to happen at the same exact time. Can someone please help!!

I've attached my code down below.

Thank You!

sterretje

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

x3xplosiiv3x

I had seen that post, I don't know why but I can not grasp the concept of how to do it.

Robin2

I had seen that post, I don't know why but I can not grasp the concept of how to do it.
If you explain what you don't understand I will try to help.

The idea is that there are several functions and each of them runs very briefly and returns to loop() so the next one can be called. Long running processes are achieved a tiny piece at a time. And there may be dozens of calls to some functions before it is actually time for anything to happen.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

x3xplosiiv3x

Well then I guess my question would be what are the exact code commands I would need and what they exactly do?

vffgaston

Well then I guess my question would be what are the exact code commands I would need and what they exactly do?
Amazing ... :smiley-confuse:

TolpuddleSartre

Can you post the code you've got?
Helping you would be easier then.

slipstick

Well then I guess my question would be what are the exact code commands I would need and what they exactly do?
That's not a real question, that's a request for someone to write your program for you. Good luck with that.

Steve

Robin2

I agree with @slipstick

If you make an effort to use the ideas from Several Things at a Time and run into difficulties we will try to help.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

lastchancename

A good start would be letting us *see* your code.
please edit your OP, and repost the INO within </code> tags.

Many - including me, browse on a phone or tablet... no INO here.
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

Go Up