Go Down

Topic: Need some general beginners help if anyone can give it (Read 243 times) previous topic - next topic

JohnP1

Hi,

I am a new user to arduino and circuits in general. If someone could give me some general guidance as to how to set up an arduino board it would be greatly appreciated.

My current goal is to set up a little ultrasonic and infrared distance and motion sensing device. I've already bought an arduino board and two sensors; they are coming in the mail. I have no idea as to how to set up a board as I have not done this before, can you offer me some general guidance as to how to do this?

Here are the links as to what I've bought already:
http://www.ebay.com/itm/SainSmart-UNO-R3-Board-ATmega328P-ATmega16U2-Free-USB-Cable-For-Arduino-/300948763268?pt=LH_DefaultDomain_0&hash=item4611f1b284
http://www.ebay.com/itm/251546073420?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
http://www.ebay.com/itm/171125346925?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Thanks,

John

Cgenius

Well, I'm new too and I don't know much about the devices you have. But first you can start by getting the arduino IDE which is available on the website on the downloads page. Use the installer if you arent too familiar with manually installing drivers. After that, you should have a (usually blue) USB cable in which you can hook up to your arduino-capable SainSmart board. Once its hooked up you can go in the settings on the arduino IDE and set the COM port for the board, which may already be set. Once that's done, you can start a new sketch/project. You have 2 functions: setup () and loop ()
setup() is ran one, before loop() goes into effect. loop () runs throughout your program, it's equivalent to your main () function if you have any programming background.
You can start playing with arduino by looking up a tutorial on how to flash an LED. Pin 13 has an LED built in to it. I hope i helped.

JohnP1

Hi, thanks yeah that is helpful. Do you know what type of components I should buy? I was checking the page, it looks like I will need some small resistors and wires.

MAS3

Hi and welcome.


You do not need any hardware to start learning.
Download the IDE and install it now.
Start it and go to file > example > 01.Basics.
There you will find the "blink" sketch, open it.
Have a look at what's happening in there, and to see if you understand that.
Take a peek at the other sketch there and see if you get that.
Just sniff a bit.
After the SainSmart board arrives, you can upload the blink sketch to it and see what happens.
Now the fun can begin.
Start making small changes to that blink sketch and see if that does what you expect it to do.

Don't think you can order a few PCB's today and use them the way you imagined tomorrow.
It will take some time and you need to take the time to learn.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

polymorph

Ignore the Blink sketch! Using delay() to time anything is a horrible way to start out. It is like teaching a beginning driver to use the parking brake to control speed for their first lesson.

Skip right to Blink Without Delay.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - tinyurl.com/q7uqnvn
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

MAS3

Isn't blink without delay a bit steep for someone who said he is new to this all ?
(He didn't say that he has never done any programming, though)
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

polymorph

So is driving with a clutch.

Blink using delay() is tantamount to newbie abuse, IMHO.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - tinyurl.com/q7uqnvn
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

JohnP1

Oh don't worry, I have lots of programming experience.
Just no circuits experience, I will try to do blink without delay to avoid the delay function.

123Splat

I don't agree with polymorph, but I'm not about to argue with someone with his skill and knowledge.

Bottom line is: start small, figure out what you think is going on, try some modifications, if you get hung up, show us/them what you have done and ask pertinent questions, and LEARN. then go on to more extensive, or advanced examples and do the same.  Once you get familiar with the board and the software, then branch out to new sensors and such.  Do the examples before you dream up some project like nuclear reactor control systems.

Oh,,, and HAVE FUN!!

polymorph

When it comes to the use of delay() for timing as used in the Blink sketch, it is down to opinion. I am -not- an experienced programmer. I just think it really leads a newbie down the garden trail, as it is not scalable. You cannot use it to time unsynchronized events or alter the timing between synchronized events in any realistic way.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - tinyurl.com/q7uqnvn
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

123Splat

It is a gigantic waste, but does provide some insight to operation for the newbee, noobie, tyro....
But, I must agree. If you are doing anything beyond utilizing the whole board for blinking the LED, you're pretty much better off without using it.

xl97

I tend to agree with Polymorph now that I have more experience/exposure to the Arduino/programming.

delay() has its place.. but I think knowing when to use it is crucial.

Teaching noobies to use this without a true understanding of how it stops the rest of the program/app from running leads to future problems.

Starting with BlinkWithoutDelay is a great concept for beginners to use and understand..

I'd also say getting noobies to grasp what and how to use/implements a FSM (Finite State Machine) approach is also very useful.


Go Up