Having spent the past 6 years writing code for the Arduino platform, I’ve noticed a trend in myths from both newcomers and veteran users. Here are the Top 5 Myths I see come up on forums, in classes, and on IRC.

1. The Arduino uses its own Language

This myth isn’t helped by the Arduino.cc home page used to say

“The microcontroller on the board is programmed using the Arduino programming language.

While it is true that the structure of an Arduino sketch looks unique, it is really just C++ with a tiny bit of preprocessing. Users writing “Arduino Code” are actually writing C++ with, what I call, the Arduino Library. Functions like digitalWrite() are just that, C++ functions.

So while the Arduino Library does a great job of making microcontroller programming very simple, it is not its own language.

2. Pin 13 Has a Resistor

Countless tutorials have lulled newbies into this trap. The very first Arduino board, of which something like 200 was produced, had a LED and series resistor on Pin 13. That’s the only board that did. So you should never never never connect a LED to Pin 13, without a resistor!

Update: Clarification. There *is* a resistor on Pin 13. However, it is only connected to the LED that is in series with it to ground. So that resistor does *nothing* to protect anything you attach to the pin, like your own LED.

3. Commercial products don’t use Arduino

Corollary: “real” engineers don’t use Arduino!

Okay. I try not to toot this horn, but I’m a “real engineer.”  You already know that: it’s in my Twitter name and URL. Here’s a top-secret piece of information:  I use Arduino. Now it is true. You aren’t going to go to Best Buy or your local big-box electronics store and find any products that have an “Arduino Inside” sticker. However, Arduino is a prototyping platform. You aren’t going to ship an Uno with every product. You might, however, develop a product with an Arduino and embed the ATmega328 inside of it. Or, more likely, you’ll prototype the idea, run it through a crowdfunding effort, and then redesign it.

You have to define what “commercial” means, but there are plenty of products out there that started with an Arduino in the early stages.

Ever hear of 3D printers?

4. analogWrite() is Analog

This one catches a lot of people who don’t really understand Pulse-Width Modulation. With the exception of the “Due”, Arduino boards do not output “analog” signals. (Note, you might want to watch this video on the difference between Analog and Digital.)

PWM signals are actually digital signals, where you change the length of time between the “on” and “off” states.

5. The Header Spacing was a mistake (or it wasn’t.)

If you know anything about the Arduino pinout, you should know that the spacing between pins 7 and 8 isn’t 0.1″ (or 2.54mm). At one point the Arduino website had this in the FAQ as an “eleventh hour” mistake. Then there was the explanation that it prevented shields from being plugged in backward. Now, I’m not sure if it was intentional, but it is true that a benefit of the spacing is that you can’t plug in a shield backward.

The perceived downside to this decision is that it makes the board difficult to plug into a breadboard or a shield into a breadboard. However, magic jumper wires do exist which solve this “problem.”

Okay, so those are the 5 Myths I encounter most.

What other myths have you heard or helped to dispel?
Author

Fan of making things beep, blink and fly. Created AddOhms. Stream on Twitch. Video Host on element14 Presents and writing for Hackster.IO. Call sign KN6FGY.

62 Comments

  1. I don’t know if I agree that the Arduino sketches are just C++. Then again, I don’t know if it even matters. But for the sake correctly understanding what sketches really are, I think you have to start with how to define what C++ is. C++ is a defined language and the Arduino sketches do not adhere to that definition. If so, then by definition it is not C++. The Arduino sketches cannot be compiled with a C++ compiler. They have to be cross compiled as a first step. So that alone tells me it is not C++. If it was, I wouldn’t need the Arduino IDE to compile anything for me.

    If is C++, why can’t you create a class, why can’t you inherit, why can’t you have two programs call each other? Why can’t I create a constructor and destructor? C++ is an OO language, but sketches are not. These are all fundamental to C++. Without them, I don’t think you can call it C++. Using a C++ library doesn’t make it C++, as I can do that from VB.

    I don’t really know exactly what the Arduino language is. But it seems to be some some pseudo C language sitting on top of C++. The Arduino IDE does some cross-language compile from Arduino into C++, then it uses the AVR compiler to compile C++. That makes the Arduino IDE a cross-language compiler, I think that is the Processing compiler or a branch of it, right?

    I have actually written a few cross-language compilers professionally. So I can write a COBOL to C++ cross language. But that wouldn’t mean that COBOL is now C++. My compiler would not be C++ compiler. The same as the Arduino compiler based on Processing is not a C++ compiler. It seems to be a cross-language compiler from sketch to C++. If so, then by definition, it is not C++.

    Just my two-cents worth… as a previous C++ compiler developer and a current C# developer.

    • I am sorry but, everything you stated is incorrect. There is no cross-compiling happening. You can see the entire (AVR) Arduino library in this Github repo.

      I think you have to start with how to define what C++

      There are ISO/IEC committees that define both C and C++ (among other things.) The latest version of the specification C++20, however, avr-gcc is using an older version of the specification. And depending on the avr-gcc version, you can change which specification is used to compile the code. This fact alone is proof enough that the “Arduino language” is literally just a library for C++.

      The Arduino sketches cannot be compiled with a C++ compiler.

      Um, except that they already are being compiled with a C++ compiler. That is what avr-gcc is, an AVR-targeted version of GCC.

      They have to be cross compiled as a first step.

      Nope. I suspect you do not know what “cross-compile” actually means, though.

      If it was, I wouldn’t need the Arduino IDE to compile anything for me.

      You don’t need the IDE. It simply automates the compiling task, like any other IDE. There are multiple editors that implement their own toolchain, including Atmel Studio. These are (almost) all based on avr-gcc and related tools.

      If is C++, why can’t you create a class, why can’t you inherit, why can’t you have two programs call each other? Why can’t I create a constructor and destructor?

      Except, you can do all of those things. The Serial class inherits from the Stream class, as just one of many examples throughout the Arduino library.

      The rest of your argument in that paragraph is just nonsense.

      The Arduino IDE does some cross-language compile from Arduino into C++

      Again, nope. No cross-compiling. The IDE does do a little bit of pre-processing, but all if it is legal C++. It creates function prototypes, includes some default libraries, and then throws the code into a template with a main() function. It is no different than someone automating a compile with a make file driving their toolchain.

      • A cross-compiler is not the same as a cross-language compiler. I did not say that Arudino was a cross-compiler. Well, actually I said that I didn’t know what it was but that it looked like a cross-language compiler, meaning a source-to-source compiler of some sorts. Oh, I just read what I posted again… and sorry I did say cross-compiled. My mistake! I meant cross-language compiled, as I mention later down in the post. My point was that it looked like any of the thousands of cross-language or source-to-source compilers or syntax-translators that just flip things around a bit before passing the code off to the compiler.

        >>Nope. I suspect you do not know what “cross-compile” actually means, though.
        I have written many of them over the past 30+ years. I know what it means. I meant cross-language compiled as I mention later in my post.

        >>The rest of your argument in that paragraph is just nonsense.
        >>>>The Arduino IDE does some cross-language compile from Arduino into C++.
        Not sure why you think that is nonsense. Cross-language compilation is taking one high level language and using a compiler to output another high-level language. Compared to just a syntax-translation that does not use a compile process… and compared to being compiled to an intermediate or machine language.

        >>Um, except that they already are being compiled with a C++ compiler.
        The sketch is not compiled with the C++ compiler. It is preprocessed and the results passed into avr-gcc for compiling. I get that it is just semantics here, but it is important to me when trying to understand what the Arduino IDE and sketch is actually doing.

        One of my complaints with Arduino as a learning tool for software is that I cannot teach students things like classes, object, inheritance, constructors, destructors, overloading, etc. Based on what you said, setup() and loop() are function prototypes that are then dropped into a template and compiled with avr-gcc. Thanks for explaining that, as that is the key to understanding how it works.

        Based on what you are saying, I should be able to take a sketch program and use Amtel Studio and a template and compile it with avr-gcc. So at that point, it would just be like any other ATMega chip. Can I do that?

      • I went back and read all of this again to see if I am misunderstanding something, as I get what you are saying and after you explained how the Arduino IDE works, I do not disagree with you in regards to it being fully C++. I get that now.

        However, Arduino says that their language is Sketch. From what I have seen, you cannot do all of things I listed earlier such as creating two classes, having one class use the other, have them inherit from each other, create a constructor, destructor, create a library, etc.. If you can, I would like to know. I spent a lot of time on their forum where they say you cannot. It is my understanding that to do any of that, you have to leave the Arduino IDE and Sketch and build a C++ library that you can call from a sketch.

        I’m coming from the point of view of using Arduino to teach beginning level software development and I am frustrated that after investing so much time into Arduino, I really cannot use it without having to jump over to C++. I think it is a common frustration. If there is a better way, I’d love to know.

  2. Esteban Rafael Negrete Montero Reply

    I was reading about the header spacing issue some days ago, and there is a post on the arduino forums which confirms it was a mistake, the actual arduino “founder” himself confirmed he screwed up in the design and that they had no time to check the files, as the board manufacturer for the first batch had told them he needed the files next morning or they would be delayed for the next month.

  3. Jane ODell Reply

    Real engineers now have the ability to make custom lab equipment for data measurement and acquisition that 10-15 years ago would have required an expensive license and data acquisition board from the 800 pound gorilla of data acquisition. As soon as another competitor for low cost boards popped up, they bought them and poof, no more inexpensive competition. For those of us engineers in experimental R&D, the explosion of low cost boards with modest data acquisition rates is nirvana. Sometimes you don’t have an undergrad/ grad student to sit and watch the test for time x logging temperature, or they can do higher level work actually analyzing the other data, or working out how the next step can be done. Now I can put together a miniature controlled environment chamber with a couple thermocouples, a thermoelectric cooler/heater, an Arduino and the PID library some kind soul worked out and shared with the world. It fits my sample! It compensates when the university shuts off the chillers in the fall and we have a heat wave! It slices and dices! Well, not yet, but the next version could!

    Real engineers use the technology that fits the requirements, and if you’re too snooty to use a low cost board that fits the actual needs, you may find yourself looking for another job, when the kid that can design and test within an order of magnitude finishes the proof of concept prototype at half the cost or half the time.

  4. This space separates the ports of the microcontroller, pin 8-13 PORTB, pin A0-A5 PORTC, pin 0-7 PORTD

  5. about pin 13 it depends if you sink or source the pin 13 it will use the leds resiser if your using the pin as ground,ive never used resistor on that pin and its fine,if i do its verry dim lit as its usinf two tesistors,the other pins work brighter with the resistor wich seems to back up my theory,i could be totaly wrong of cource,this ive been told by arduino makers,

    • I’m not sure your statements make sense.

      From the Diecmila to the Uno R2, there was a current limiting resistor for the LED on the board. However, that has no effect on limiting current to an LED connected at the pin header. From the R3 on, an op-amp circuit was used to reduce loading that the LED and Resistor presented to the pin. Again, has no effect on what you attach to the pin.

      Your “experiment” would be better down with measurements, not a visual comparison.

  6. Pingback: Week ten: How are electronics viable additions to “crafting” for today’s young person? | kendrawollert

  7. David Watson Reply

    Four(ty) years ago I coont evn spel injuneer, now I are won. No offense intended to anyone. Maybe you hear the line also, “Really. You don’t look like an engineer.” Still never figured that one out, what are we supposed to look like? If I might paraphrase point number 3 thus allowing it’s removal from the myth list;

    Real engineers aren’t afraid to use Arduino.

    • Agreed. Real engineers aren’t afraid of using anything that properly solves their current problem (no pun intended).

  8. QUOTE: The very first Arduino board, of which something like 200 were produced, had a LED and series resistor on Pin 13. That’s the only board which did.

    Actually ALL current Arduino boards DO have “a LED and a [series] resistor” connected from pin 13 to ground.

    There is no SERIES resistor between the Atmel chip and the pin 13 connector.

    Regards, Terry King …In The Woods In Vermont

  9. -First of all thanks for the post.

    -Second, if I get it right, these statements below are all true:

    1) Let’s go on through an example. Let’s say I want to produce a rgb mood light and sell it commercially. And my product is something that does not need firmware upgrade or sth like that…

    I have an arduino board, rgb led and arduino sketch. I connect the rgb led with arduino and upload my skecth to it and it works when I power it. So this is basically a prototype.
    Now let’s say I want to sell it as a commercial product. Since using an arduino board in every product might cost a lot I decided to use an atmel chip instead. I programmed my atmel chip with arduino board and arduino ide. So my final product will have a chip and a led. And a casing.
    So I’m free to sell this product locally, worldwide or online without any copyright etc. restrictions? It does not have an arduino inside right?
    And I do not have to open up my sketch/circuit to public?

    2) Let’s say I’ve made a complicated device which needs to have an arduino inside to run. And some other components.
    I can make an arduino based on the open source diagram and use it inside my device. Add other components etc.
    And I do not have to mention that the device uses an arduino inside?
    And I do not have to open up my sketch/circuit to public?

    3) Same situation as number 2 but instead of making one, I buy arduino compatible boards and use them.
    And I do not have to mention that the device uses an arduino inside?
    And I do not have to open up my sketch/circuit to public?

    4) I use a sketch with gpl (without changing/modyfyng any codes) in my device.
    And I do not have to open up my circuit to public?
    And I do not have to mention the code inside is open source?

      • Alain Martel Reply

        I would like to point out that the majority of 3D Printers are made with some form of Arduino (using RAMPS shield) or are an off shoot Arduino + RAMPS rolled into a single board. Marlin is one of the more popular firmwares and is programed using the Arduino IDE.
        So yes you can use Arduino commercially and yes engineers do use Arduinos that do go to market.

        • I get the point of what people are saying… it is not necessary to use an Arduino prototyping board in a commercial product. Sure you can by a $50 board and use it in a commercial product, but you can produce a $1 pcb and upload your Arduino code to a $1 chip and save your $50 Arduino board for prototyping. But if you use the Arduino IDE to program that chip, technically it is an Arduino compatible board… and sure you can and people do and have taken products like this to market.

          Besides, Banzi is an engineer and millions of Arduino boards have been sold. So it is certainly a commercial product that has done very well. The fact that people are even arguing the point, proves it.

  10. Pingback: Arduino myths or misunderstandings | Arduino | Gadget Master

  11. There are many mis-understood things about the Arduino.

    The 5 items listed are some questions I have gotten about Arduinos as well.

    These (and many others) are the type of questions beginners ask, but not those whom have not started the learning process.

    Look at the “myths” proposed:

    1. The Arduino uses its own Language
    2. Pin 13 Has a Resistor
    3. Commercial products don’t use Arduino
    4. analogWrite() is Analog
    5. The Header Spacing was a mistake (or it wasn’t.)

    Items 2,4,5 are asked by those who have started learning about those things, that only someone who has looked at the manual or demo programs.

    Item 1 is Arduinos fault as baldengineer has discussed.

    But item 3 is a ringger !!

    A beginner may ask this question because they think their great idea will make them a million bucks. 😉

    But as I have stated previously, I let those would be entrepreneurs know how hard it is to bring a real product to market.

    Now if item 3 said: “real” engineers don’t use Arduino! , I would agree, that this statement is a myth.

    • Hey it’s not hard to bring a product to market entrepeneurs just like to think it is so they can bang on how great they are. Not hard but lots you need to do other than write code and build Pcb’s.

  12. Pingback: Dispelling Arduino myths with James Lewis

 | Bits & Pieces from the Embedded Design World

  13. When millis() rolls over, it is TEOTWAWKI. Magic smoke will be released, the board will reset, the sketch will hang, dogs and cats will sleep together, etc. The fact is, the only limitation with millis() is that it cannot be used to time events that last more than about 49 days.

    • Yeah, this is a really good one. In fact, I think I wrote another post calling that a myth but forgot about it here!

  14. Pingback: El laboratorio de Zironid | 5 mitos comunes de Arduino (que no son verdad) [Traducción]

  15. I think there are some misunderstanding about the role of shields available for Arduino. For example, I hear many friends doubt that Arduino can NOT communicate with a WiFi transceiver without a WiFi-Shield !

    Even though I didn’t try that, I believe that Shields are important but not necessary ! So hope someone explain in what really shields do for Arduino ..

    • Good point! Shields in general sometimes get endowed with magical powers. I’ve noticed that users will avoid using a breakout board for a chip because it is not a “shield.”

  16. Regarding myth 3.

    I have been involved and designed the programs for a light module for model railway houses. We used a clone of UNO called Brage (Swedish educational version). Small form factor.
    Every house has a Brage inside connected in a group to a Uno with ethernet to a central PC-program controlling over 100 Brage modules for synchronizing the light effects. A simple but yet vesatile system based on Arduino products.

    It’s not a commercial product itself but Its used in the same way. It will be used in a “professional” manner.

    So I think defenitly it can be used in real world applications.

    Yes, I am an enegineer and have worked with programming since late 70’s. Worked as a manager for many years, but I fell in love with Ardunio and was excited over the possibillites to create this application. The whole system was up and running within a week of programming in my spare time.

  17. Myth #6: There is a reason for non-typical, non-rectangular shape (form factor) of the Arduino board.

    Reality: No, there is no special reason, they just wanted to be “different”.

  18. Daniel Gelman Reply

    Hello,

    Commenting on Myth 3,

    I consider myself more or less an engineer. I am a PhD student with an electrical engineering background currently in the field of biomedical engineering focusing on surgical robotics. Many times I love to go into the Arduino platform just for proof of concept and prototyping. I have done so for years and have been proud of it. It is feasible and community support is through the roof.

    Although Arduino is open-source and many say it is targeted for beginners, research and industrial engineers do use it thoroughly. My personal board is the Due because of the ARM processor – matter of fact the Arduino Due truly did push me into ARM designs into my custom PCBs. I do believe the Arduino is a viable tool for any engineer. And although your final design may not have the legendary Arduino logo, you can bet your ass that in many final products, there is a good chance it may have used the Arduino as a prototype.

  19. It is c++ with a lot of the stuff that trips up the “newbies’ behind some curtains. The real generated code can be found if you know where to look.

  20. Strictly speaking, I think the Arduino language is based on the Processing language, which itself is a simplified form of C++. /nitpick 🙂

      • Ah – it’s based on Wiring, which uses the Processing IDE but uses a C++ implementation. My mistake.

    • The Arduino “Language” is what I stated: a C++ library.

      Processing is actually based on Java, not C++.

      Wiring, like Arduino (which is what the Arduino library was based on), is C++.

  21. flapjackboy Reply

    #2 is wrong. I have 3 Arduino boards. A Duemilanove, an Uno and a Mega and ALL of them have an LED and series resistor tied to pin 13.

    • I can confirm that the Arduino Uno schematics show a 1k resistor on the SCK (pin 13). However, I think it’s for the LED that’s also linked to the pin.. not for additional loads.

    • Yes, but that resistor is ONLY limits current to the LED onboard. It does nothing to protect additional loads connected to the pin.

      The resistor and LED is in parallel with the pin header.

      • Linker3000 Reply

        That’s a good clarification – the onbord LED DOES have a current limiting resistor, but this resistor is NOT in series with the off-board connector.

  22. One of the biggest myths I’ve encountered is the assumption that you have to use one whole Arduino board for a project. In my experience it’s better to use the board for testing and debugging and then flash an atmega chip with your sketch. Then you can integrate the chip into your design on a perf board. It may be a little more work and you lose the ability to use shields but it makes for a cleaner and smaller profile. (Plus it’s cheaper)

    • I’ve seen that a lot, you can get ATMega328 chips flashed with the Arduino Bootloader for just under £3. I’ve done several projects where I’ve prototyped with an Arduino and then etched my own PCB.

      You don’t really need much to get an ATMega328 to run, all you need is a couple of capacitors, a crystal and a datasheet with the pinouts of the 328 and you are sorted. I have built arduino ‘clones’ on stripboard with a 5V regulator, the process is trivial and inexpensive and shouldn’t really cost more than £5 to achieve.

  23. It’s versus its. I’ll give you one guess at whether you used the right version. English is hard huh?

    • He may have used “It’s” incorrectly in the title for #1, but used “it’s” correctly under #3 regarding his twitter name & URL.

    • Thanks for the excellent feedback. I’m sorry your mother and father chose such a poor name for you. It kind of makes you look like a shit head.

  24. Dose anyone has an information about how to move from Arduino to real commercial product? I’ve been searching for a long time but it seems not much clue on it.

    • You might be over thinking it. Im not sure such leap exist.
      You design a product with an atmega chip inside and program it with any other programmer . You can even order hundreds of chips preprogrammed.
      You can even cheat and load the arduino bootloader and run the same code you already created i believe this is known as a arduino clone. Same skills you just use the exact amount of hardware you need. No extra headers no shields
      This should be faster end cheaper.

      • I have done this quite a few times as part of my learning process of arduino and electronics.

        I prototype on arduino, then make a custom board with a 328 inside and good old soldering.

        My latest project, I burn my own bootloader on a 328 chip and put it on a breadboard and load my programs from the arduino software directly via a usb-serial adaptor or directly through icsp.
        Once my dev work was done, I soldered everything on a prototype pcb board (hours of soldering).

        If I wanted to comercialize the product I would make a PCB design and send it to a pcb fab.

        Cheers!

        • Thanks a lot guys. That’s pretty much help. I will try all solutions.

  25. Engineering Student Reply

    Can confirm, am engineering student, have used arduino to prototype a setup with Atmega328 for use in my Sr. Design project.

  26. spiralphenomena Reply

    I have taken stage equipment apart before and been surprised to find an atmega 328 as the microprocessor, the product was a dmx hazer, that was a commercial application

        • There is really no way of knowing.

          Arduino requires the bootloader to be programmed first.

          So if the bootloader is not there, the Arduino IDE will not work.

          Also, if the 328p is soldered down, there will be a small chance to get the bootloader programmed into that chip.

          • > Arduino requires the bootloader to be programmed first. So if the bootloader is not there, the Arduino IDE will not work.

            That’s not true. For one thing, the Arduino IDE works whether or not an Arduino is connected in any way. Second, you can program “via an ICSP” (see File Menu -> Upload Using Programmer).

            Alternatively, you can take the .hex file from an Arduino IDE compile, and upload that using other methods (eg. avrdude).

Write A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.