How-to: Get help with your Arduino project

Arduino
How-to: Get help with your Arduino project

2088974416-330Bbf2647-B
Handy overview on getting help with your Arduino project from the Adafruit forums — applies practically everywhere online and getting help with electronics projects…

Electronixy beginners don’t know how to ask for help because they are beginners. this post will indicate some of the problems…

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] tag – Its a button up top (in the forums) see? it says code! its for pasting code cleanly. and cleanliness is near godliness, so use it!

6. If you must post code, post the minimal code that demonstrates what doesn’t work – 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) 6b. If you’re posting code and claiming that something doesn’t work, make sure the code -shows- that it doesnt work. If your LCD doesnt print on the second line, post code that shows you at least tried to print to the second line.

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 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

8. Don’t eat a cow in one bite – 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!

9. Post nice clear photos or schematics – 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.

10. Did you look through the forums/internet? There are literally thousands of posts on various forums that Arduino users visit, including at arduino.cc 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.

11. Spend more time on it – 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!

4 thoughts on “How-to: Get help with your Arduino project

  1. chic says:

    Take nothing for granted. Don’t just pop that battery onto the batterysnap and then plug the two pin header gizmo onto the board. Check the battery with a voltmeter, Check the continuity of the batterysnaps, once the battery is on the snap, but before you plug the header to the board, check the polarity and voltage. Once you’ve plugged it in, check the voltages again. By doing this you are doing your faultfind as part of the assembly process, and you’ll know what is OK if something goes wrong. And checking is a scientific process, before you do the check, state what you expect the outcome to be, if the check does not provide the expected answer, you need to work out why. This stuff slows you down slightly initially, but in the long run saves time, and you develop a ‘nose’ for faults

    hope this helps

    1. Nate says:

      I’ve been stymied and ruined by bad connections. Especially on older parts — they work when on the breadboard, but when you solder them to the PCB, there’s just enough cruft on the leads (which never touched the breadboard) to make a bad connection.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

current: @adafruit - previous: MAKE, popular science, hackaday, engadget, fallon, braincraft ... howtoons, 2600...

View more articles by Phillip Torrone

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK