Author Topic: Is Arduino "crap"?  (Read 758 times)

WA1ICI, djsb, Grandchuck, ledtester, Njk, mahi, xrunner, tom66, OZ1LQB and 3 Guests are viewing this topic.

Offline SteveThackeryTopic starter

  • Frequent Contributor
  • **
  • Posts: 362
  • Country: gb
Is Arduino "crap"?
« on: Today at 10:39:12 am »
In this thread:

https://www.eevblog.com/forum/chat/project-isolation-social-islanding/

@JPortici said,

Quote
Trying to make someone understand why arduino or platformio is crap, or why they have failed as educational tools because they have never tried to create a product with them is pointless... because they are not making products, but contraptions.

I've never made a product using Arduino, but I have made plenty of hobby "contraptions". At the moment I don't see what would prevent them from being sold as products. I'm aware that a lot of the work in setting up the microcontroller is already done for you, and lots of functionality is provided by the vast array of libraries. In that regard using Arduino is easy, but what about that makes it "crap" for real products?

I also developed a couple of "contraptions" using ARM mBed, and once again a fair bit of the work is done for you in the form of libraries. Is this not a good thing when developing a product? One would think it is wasteful to reinvent the wheel when the work has already been done.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4190
  • Country: nl
Re: Is Arduino "crap"?
« Reply #1 on: Today at 11:02:46 am »
Depends on the quality of the work already been done.

Some of the Arduino libraries can be considered sub optimal depending on your needs and experience level.

I myself only use it for quick testing of goodies bought from Aliexpress, and then yes, very handy that the work has already been done for you.

For my actual embedded projects I'm a bare metal person. I do sometimes re-use other peoples libraries, but only if the source is available, or if it is way to complex to write it up yourself in a reasonable time frame. I rather debug my own errors, than someone else their errors.

Online ArdWar

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: sc
Re: Is Arduino "crap"?
« Reply #2 on: Today at 11:27:21 am »
Is it crap? No, not really.

Does it tend to teach bad programming habit? Yes, unfortunately.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4348
  • Country: nz
Re: Is Arduino "crap"?
« Reply #3 on: Today at 11:42:57 am »
Well, let's go through the things that make up "Arduino" one by one:

- AVR. Perfectly fine 8 bit microcontroller, better than PIC or 8051 in many ways. Not crap. 32 bit Arm and RISC-V are also available.

- Arduino branded boards. They're fine, as are clones of them. For a product you'll want soldered connections to GPIOs not Dupont jumpers, but a soldered shield plugged into the Dupont connectors can be fine. Not crap.

- Arduino core libraries. They're optimised to make the most common functionality portable across many different chips, rather than for speed. In many applications it's perfectly fine for digitalWrite(n) to take a couple of µs to figure out what port and bit logical pin n is, every time. It's not like they're buggy or anything. Maybe not what you need in all applications, but it's easy to bypass the libraries and program the bits important to you bare metal. Not crap.

- 3rd party libraries. Can be crap. Or not. Exercise due caution.

- Arduino IDE. Not the best editor or IDE in the world, but serves its purpose. It's easy to use an external editor if you want. I use emacs. Dead easy to install Board Support Packages, including appropriate toolchains. VSCode+PlatformIO is a much better editor and IDE, still easy to set up. Maybe not your cup of tea, but not crap.
 
The following users thanked this post: NiHaoMike, voltsandjolts, tooki, Picuino, pcprogrammer

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: gb
Re: Is Arduino "crap"?
« Reply #4 on: Today at 11:43:08 am »
I can say "not well engineered"

The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 9229
  • Country: gb
Re: Is Arduino "crap"?
« Reply #5 on: Today at 11:48:54 am »
This sounds like an issue related to a recent exchange about doxygen on this forum, where people were decrying the tool because a lot of people abuse it. Something easy to get started with attracts a lot of people to put together half baked things with it. Sometimes as they learn, sometimes because they are talentless, and sometimes because they are bodgers. That isn't actually a reflection on arduino itself. People have abused every tool ever developed.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2341
  • Country: fi
Re: Is Arduino "crap"?
« Reply #6 on: Today at 11:50:34 am »
It's for a purpose.
Out of its scope it's 'crap' quite fast.

An example.
Reading pins one by one and treating the result as one.
That's not hardware, but is it Arduino.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Offline SteveThackeryTopic starter

  • Frequent Contributor
  • **
  • Posts: 362
  • Country: gb
Re: Is Arduino "crap"?
« Reply #7 on: Today at 11:54:19 am »
Does it tend to teach bad programming habit? Yes, unfortunately.

Could you expand on that a little?
 

Offline SteveThackeryTopic starter

  • Frequent Contributor
  • **
  • Posts: 362
  • Country: gb
Re: Is Arduino "crap"?
« Reply #8 on: Today at 11:55:52 am »
An example.
Reading pins one by one and treating the result as one.
That's not hardware, but is it Arduino.

Sounds interesting, but I'm afraid I haven't understood what you're saying. Could you explain it in easier steps?
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4348
  • Country: nz
Re: Is Arduino "crap"?
« Reply #9 on: Today at 12:01:45 pm »
I can say "not well engineered"

I would say "engineered with priorities different to yours".
 
The following users thanked this post: T3sl4co1l

Offline m k

  • Super Contributor
  • ***
  • Posts: 2341
  • Country: fi
Re: Is Arduino "crap"?
« Reply #10 on: Today at 12:02:39 pm »
An example.
Reading pins one by one and treating the result as one.
That's not hardware, but is it Arduino.

Sounds interesting, but I'm afraid I haven't understood what you're saying. Could you explain it in easier steps?

There is time between every read.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9180
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Is Arduino "crap"?
« Reply #11 on: Today at 12:04:06 pm »
I have used Arduino a lot at several different jobs in automated test setups. It's popular for the same reason that Windows is commonly used at work even though it's technically inferior to alternatives - a lot more know how to use it.
In many applications it's perfectly fine for digitalWrite(n) to take a couple of µs to figure out what port and bit logical pin n is, every time. It's not like they're buggy or anything.
I recall that as of recent years, it has been optimized at compile time to be just as fast as a direct register write.
« Last Edit: Today at 12:06:07 pm by NiHaoMike »
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline bookaboo

  • Frequent Contributor
  • **
  • Posts: 749
  • Country: ie
Re: Is Arduino "crap"?
« Reply #12 on: Today at 12:32:47 pm »
Like a lot of people I don't use Arduino for production, as quite often there are limitations in the how it abstracts. For example on ESP32 it's all well and good until there's an ESPIDF feature that's not implemented , or some bug that's fixed by a later version of the framework (beyond whatever Arduino is currently on). I assume other frameworks are similar.

The other thing that would make me hesitant to use it on production is the commercial terms https://support.arduino.cc/hc/en-us/articles/4415094490770-Licensing-for-products-based-on-Arduino
I've nothing against these terms, it just could have commercial implications in the future if the project is successful.

That said, I haven't technically had any major issues with it. Most of the libs are straightforward to read and understand. For test jigs, quick proof of concepts, one offs etc it's actually often the best option.

So to anyone with a one line put down on Arduino, it would be helpful to everyone else if you could expand in technical detail what the issue is? It may or may not be relevant for everyone else.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12359
  • Country: ch
Re: Is Arduino "crap"?
« Reply #13 on: Today at 12:43:15 pm »
I think a lot of people who disparage Arduino  a) are naturally gifted programmers, b) have long since forgotten what it’s like to be a beginner, and/or c) fall into the “hazing” mindset of “I had to suffer as a beginner, and thus so should you”.

The Arduino libraries have some limitations, but if — or rather when — you run into one, then you can learn how to get around it by doing totally normal MCU programming. One of the biggest misconceptions, I think, is that people think Arduino stops you from doing bare metal programming if you want. It won’t.

I do sorta understand one objection that Arduino opponents have: the possibility of getting used to using certain poor design patterns in coding, like polling in loops and using delays instead of using interrupts and non-blocking timers/counters. But then again, one can learn those anti-patterns with bare metal programming too. On the other hand, I have very little sympathy for the argument that using prebaked functions is bad. I mean, what do experienced programmers do all the time, early on in their projects? Write abstraction libraries.
 
The following users thanked this post: tom66, bookaboo, pcprogrammer

Online tom66

  • Super Contributor
  • ***
  • Posts: 6878
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Is Arduino "crap"?
« Reply #14 on: Today at 12:59:04 pm »
No.

The biggest issue with Arduino is that it encourages what I would term "cargo cult programming", where people just Google / ChatGPT a solution and don't fully understand why it works because the culture around Arduino seems to encourage this.

It's a perfectly okay platform for beginners to learn to program on microcontrollers and even implement some useful things - e.g. we have a couple of simple test jigs where an Arduino is part of the solution because we can have that working in a couple of days with a junior engineer.
 

Online ArdWar

  • Frequent Contributor
  • **
  • Posts: 601
  • Country: sc
Re: Is Arduino "crap"?
« Reply #15 on: Today at 01:07:42 pm »
I don't actually dislike the environment. The abstraction is actually good. The complete avoidance of pointers black magic helps *a lot*. The seemingly inefficient style of code is not inherently bad, a lot of RTOS does that too. It maybe irks baremetal purists, but who really cares with today's MCU (ironically it's a bigger problem with UNO lol).

My "bad habit" comment was actually a bit simpler than that. It gives distorted expectation. Everything is public, and everything looks like how you write C but suddenly member function out of nowhere. It often ends up with confusion when they need to write actual C or C++ since they often expect it to be "just like .ino".
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8076
  • Country: de
  • A qualified hobbyist ;)
Re: Is Arduino "crap"?
« Reply #16 on: Today at 01:09:03 pm »
I've never made a product using Arduino, but I have made plenty of hobby "contraptions". At the moment I don't see what would prevent them from being sold as products. I'm aware that a lot of the work in setting up the microcontroller is already done for you, and lots of functionality is provided by the vast array of libraries. In that regard using Arduino is easy, but what about that makes it "crap" for real products?

Arduino is great as a starting point to become familiar with MCUs and for tinkering around. As already mentioned, the convenience of the Arduino environment can cause issues when you need things to be fast or you want to use hardware features already in use by the Arduino framework. At some point you'll have to drop the Arduino framework to make full use of the MCU. For example, I'm involved in an ATmega based OSHW projekt which goes to the maximum what the MCU is able to do, and it runs also fine on classic Arduino hardware. Some people ported the software to the Arduino framework and had to drop a lot of features because the framework takes resources away. Another point is full control over everything. When you have something time critical and use the Arduino framework, you have to pray that they don't change or optimize the related functions in the next release which would screw up your timing. Without the framework, this can't happen.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4348
  • Country: nz
Re: Is Arduino "crap"?
« Reply #17 on: Today at 01:09:42 pm »
The biggest issue with Arduino is that it encourages what I would term "cargo cult programming", where people just Google / ChatGPT a solution and don't fully understand why it works because the culture around Arduino seems to encourage this.

Also a huge problem with Python, JavaScript/Node, and basically anything at all that is popular.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8076
  • Country: de
  • A qualified hobbyist ;)
Re: Is Arduino "crap"?
« Reply #18 on: Today at 01:18:00 pm »
One of the biggest misconceptions, I think, is that people think Arduino stops you from doing bare metal programming if you want. It won’t.

Do you mean the hardware, the framework, or both?
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3503
  • Country: it
Re: Is Arduino "crap"?
« Reply #19 on: Today at 02:06:11 pm »
The biggest issue with Arduino is that it encourages what I would term "cargo cult programming", where people just Google / ChatGPT a solution and don't fully understand why it works because the culture around Arduino seems to encourage this.

Also a huge problem with Python, JavaScript/Node, and basically anything at all that is popular.


Thank you both for understanding why the whole thing failed as a learning tool.
we all use python or some scripting language because it's useful, and hopefully don't abuse it.
we all build contraptions and proof of concepts, that may be potentially seriously hazardous or just things that work with a lab power supply, and tongue at the right angle.

Think of something connected to mains, water pipes, your car's electrical system, ebikes batteries... how many projects come to mind?
Or browse a local facebook group on DIY smart homes, just to refer to the original thread, the shit some people do because they have no training on safety hazards makes me think how lucky we are in general.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12359
  • Country: ch
Re: Is Arduino "crap"?
« Reply #20 on: Today at 02:26:32 pm »
One of the biggest misconceptions, I think, is that people think Arduino stops you from doing bare metal programming if you want. It won’t.

Do you mean the hardware, the framework, or both?
Both! The anti-Arduino people forget that you can use any combination of the framework, boards, and IDE (though using the Arduino boards with another framework is rare, it is doable). The only thing you absolutely cannot do -- which doesn't matter because nobody would want to do this -- is to use the Arduino IDE without the framework.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2341
  • Country: fi
Re: Is Arduino "crap"?
« Reply #21 on: Today at 02:41:22 pm »
One of the biggest misconceptions, I think, is that people think Arduino stops you from doing bare metal programming if you want. It won’t.

Do you mean the hardware, the framework, or both?

Can you separate them and keep the name?

I seem to think that this board is part of it.
But I also seem to avoid DIP versions.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus lesser brands from the work shop of the world)
 

Online DiTBho

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: gb
Re: Is Arduino "crap"?
« Reply #22 on: Today at 02:49:00 pm »
we all use python or some scripting language because it's useful, and hopefully don't abuse it.

Python is a plague, and I also find it in software like Dia, where, to turn the pixels of a symbol 90 degrees, let's realize how much Python is abused: instead of a module written in C/C++, you find yet another Python dump, which to do what it has to do wastes 10 times the resources needed.

Arduino makes it no better, and people make it as their default bad habit.
Plus, libraries are too often written so poorly that people make it as their further default bad habit.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4348
  • Country: nz
Re: Is Arduino "crap"?
« Reply #23 on: Today at 02:53:09 pm »
we all use python or some scripting language because it's useful, and hopefully don't abuse it.

Python is a plague, and I also find it in software like Dia, where, to turn the pixels of a symbol 90 degrees, let's realize how much Python is abused: instead of a module written in C/C++, you find yet another Python dump, which to do what it has to do wastes 10 times the resources needed.

Arduino makes it no better, and people make it as their default bad habit.
Plus, libraries are too often written so poorly that people make it as their further default bad habit.

You wouldn't believe how much the internet has gone downhill since they let all those point-and-drool AOL people in. The WWW was a mistake -- should have stuck to gopher and nntp.

Letting non-landowners vote was a huge mistake, as was stopping teaching exclusively in Latin in the universities.
« Last Edit: Today at 02:55:53 pm by brucehoult »
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20253
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Is Arduino "crap"?
« Reply #24 on: Today at 03:57:30 pm »
Q: Is Arduino crap?  A: mu.

Is a car crap? Yes, repeat no.
Is a boat crap? Yes, repeat no.

Just like cars and boats, Arduino is good/bad depending on whether it is fit for the current purpose.

For quick and dirty one-off hacks and proof-of-principle exercises, Arduino is one perfectly reasonably tool to consider.
For production purposes, I'd be more reluctant to use an Arduino for many reasons. However avoiding using an Arduino for production doesn't mean something else will be better. Sturgeon's Law applies.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: NiHaoMike


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf