HOWTO get help with your arduino project

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

HOWTO get help with your arduino project

Post by adafruit »

Electronixy beginners don't know how to ask for help because they are beginners.
this post will indicate some of the problems. please read through the suggestions. if you don't, you'll probably be pointed to it anyways so you might as well save yourself the time.

1. learn how to upload code to your arduino. if you dont know how to save and upload sketches and VERIFY that the sketches have been actually uploaded, you will not be able to get your project working. this is a big problem. see Arduino tutorial part 1 for how to upload new code. make sure you get a Done Uploading notice. note on the screen, if you see any errors or failures, your code didnt upload so you have to fix it before continuing.

2. Understand the difference between setup() and loop(). setup() occurs only once, loop() occurs constantly. For more information see Arduino tutorial part 2.

3. Learn how to use Serial.print() Printing is key to debugging. You must print out variables, notes, and hints to yourself about what is going on constantly. Not sure if your temperature sensor is working? Print out what the analogread() function returns. make sure that all the numbers make sense. Not sure how many times a loop is running, or if its running at all? Print out an incrementing number. For more information see Arduino tutorial part 4.

4. Never say "It doesn't work" There is nothing more useless than the phrase "It doesn't work". Its like going to a doctor and demanding treatment but never telling what the symptoms are. You have to define what "it" is - is it the code? is it the LCD? is it the sensor? Second, you have to explain "doesn't work", how do you know it doesnt work (often times, its working fine but the user doesnt understand that). What have you done to verify that its not working? Do you have an examples of it working ever? What should it be doing? Describe as -precisely- as you can muster.

5. Use the

Code: Select all

 tag.[/b] Its a button up top, see? it says code! its for pasting code cleanly. and cleanliness is near godliness, so use it!

[b]6. If you must post code, post the minimal code that demonstrates what doesn't work[/b] Your temperature sensor doesnt work. OK,  that may be a problem...maybe its broken? maybe its not wired up right? But why are you pasting a sketch that has LCD and ethernet code in there too? Make a new sketch with all the extra stuff deleted, if it still doesnt work, you can post that because at least you're debugging only one thing. (see below)
[b]6b. If you're posting code and claiming that something doesn't work, make sure the code -shows- that it doesnt work[/b]. If your LCD doesnt print on the second line, post code that shows you at least tried to print to the second line.

[b]7. For every component in your project, have a sketch that JUST tests that component and nothing else, using Serial.print() to tell you that it works[/b] Have an RGB LED? Are you sure you know the pinout? Might be handy to have a sketch that only tests that part, that way if you break it, there's a quick way for you to verify

[b]8. Don't eat a cow in one bite[/b] Code increases in complexity/difficulty the longer it is. That is a fact. 
Lets say you want to make an internet-enabled cat-feeder (so you can feed your cat over the internet, of course!) Do not try to write all the code and then click compile and pray. That is foolish! Instead, just get a motor turning. Once that works, attach the motor to the cat feeding device and verify it works with serial commands or button presses. Then figure out how to get an LED to light via an Ethernet shield. Finally you can combine the two halves (motor/servo control and Internet control). 
So if your internet-controlled-cat-feeder doesnt work, and you need help, don't just dump 300 lines of code and say "HALP".  Instead, have little tester scripts that verify each part of the project to determine what is breaking!

[b]9. Post nice clear photos or schematics[/b] Sometimes the problem is wiring. In fact, much of the time the problem is wiring. This is unlike software where there is rarely any wires involved. For that reason, you should learn out to take a good, clear photo. An expensive camera is not required but good lighting, some care and setup is. Don't want to bother with all that? Draw a clear schematic or diagram. Think that takes too much time? Those that request help from others need to spend a little effort.

[b]10. Did you look through the forums/internet?[/b] There are literally thousands of posts on various forums that Arduino users visit, including at and other sites that google indexes. Did you use the search box to see if maybe your problem is common? Most problems are the same issue occurring over and over again. You'll learn a lot, even if its not the exact same problem you're having.

[b]11. Spend more time on it[/b] Your friend bought a piano yesterday, but hes upset because for some reason everything he plays sounds awful. Whats up with that? Its because he's never practiced! Electronics, like any skill, requires many hours (even years) of practice. It is not unreasonable to spend a week on a problem, trying different approaches, looking at example code, reading books, examining datasheets, using search engines, all to find a solution. Is it frustrating? Yes. But note that the only way to learn is to have difficulties. When everything goes right, there is no lesson learned. Persevere! Ganbatte!

User avatar
Posts: 105
Joined: Fri Aug 14, 2009 6:05 pm

Re: HOWTO get help with your arduino project

Post by johngineer »

If I may add something to item #9 regarding wiring:

Be sure to check your connections early and often. NEVER use uninsulated or braided wire (i.e. speaker wire) or solder wire on a breadboard -- you're just asking for things to come loose or short out. Also, people will laugh at you. Use good quality solid hook-up wire of the proper size (20-24 AWG) and use different colors for different connections (i.e. red for +5V, black for GND, etc.) This will make visual troubleshooting much easier.

Get very familiar with your multimeter, particularly the continuity tester, and USE it. All the proper connections in the world won't help you if the wire isn't conducting.

And one more thing: don't be afraid to hit the reset button your Arduino. We all have brain-farts now and then.

Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: HOWTO get help with your arduino project

Post by adafruit »

good advice, thanks for adding!

User avatar
pete m
Posts: 20
Joined: Sat Aug 28, 2010 8:38 pm

Re: HOWTO get help with your arduino project

Post by pete m »

I am an electronixy beginner and I was thrilled when I made the led blink on my boarduino.....with help from this is tough to ask for help and great when you can get it without being belittled. You wrote, "That is foolish! Instead, just get a motor turning". Good news, I got my (taken from an old printer) stepper motor turning. It is a start, no doubt.

I appreciate the help, there is a lot of brainpower here.

Posts: 13
Joined: Sun Aug 07, 2011 2:35 am

Re: I know this is probably the wrong area, but...

Post by brimus »

SquidTeeth wrote: DHTtester.cpp:4:17: error: DHT.h: No such file or directory
DHT does not name a type

I made a folders in the username/documents/arduino/ named sketchbook, and then tried 'libraries' nested inside.
Try this location -


inside the libraries filer you will put the folder named what the library is (looks like DHT for your example). inside the folder should be the DHT.cpp and DHT.h and possibly some other files. Just put what came with the library.

Please be positive and constructive with your questions and comments.

Return to “Arduino”