Go Down

Topic: Basic Arduino Questions  (Read 725 times) previous topic - next topic

Empty

Hey guys.
I'm completely new to Arduino, but I'll start my own project soon. I have some stupid questions to start with and more coming along when I start to build:

1.Does every part has its own code? By that, I want to know, if, for example, I write a code for LEDs, then I have to upload it, then add code to motor drivers, upload that, then add code to sensors and so on? Or I have to write a big code, which includes all the parts?
2.How do I count or check how much features(code) I can add to Arduino. I know im gonna use Arduino Uno, or one of its clones, and it has a 32 bit memory to it.

Im sorry in advance for my english, or maybe choosing the wrong forum section to post this.

Nick_Pyner

You write and upload one programme that covers all the features.

The IDE will advise you of the size of the programme you have just compiled. If it is too boig for Uno, it will tell you.

Empty

Follow up question. Do I still need to use just two voids for setup and loop, and not create new ones for each task in the main program?

Nick_Pyner

Correct - just bigger voids.

Delta_G

Follow up question. Do I still need to use just two voids for setup and loop, and not create new ones for each task in the main program?
Void is a type. Function is the word your looking for. The void in front of it just means it doesn't return a value.

You'd do well to keep your code localized in functions that you can call from loop as needed. It makes the code much easier to manage as it grows.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Robin2

Have a look at how the program is organized in Planning and Implementing a Program. It will be much easier to develop, test and debug a program if it is designed as a collection of small single purpose functions. (Don't worry if you don't understand all the details of the program straight off).

If you put all the code for a complex program into the loop() function it can very quickly become a mess of spaghetti.

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

123Splat

Do worry if you don't understand the details straight off.

Empty

Hey guys, I hope youre having a wonderful weekend.

Im new to all the Arduino stuff, but I have a project in mind and would like to know if its possible with the parts I have in mind.

Its basically a Bluetooth controlled robot with a vehicle kit. I would also like to add an ultrasonic sensor and a LCD screen, which i would connect to either a distance sensor, so it would show what it is the distance to the obsticle, or a temperature sensor, so that i could see my room temperature. Also, id like to add some LED lights. I guess, my question is, does Arduino Uno R3, or a copy of it, can handle the code that it would take for this project?

Im sorry, if this seems like a lackluster of a post. This project is for my studies but im looking forward to making this my hobby, because it looks really interesting

Delta_G

Yes, if you'd bother to do some searching you'd find many similar robots built using the uno.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Nick_Pyner

You don't have to look far, there is an entire section on this forum devoted to robotics.

Go Up