I hate Arduino
Gabriel wrote 04/14/2016 at 21:35 • 2 pointsShitty libraries, hidden code or absurd levels of encapsulation, thousands of libraries to do a simple task, tutorials on new hardware based on some obscure library made up of 30 GitHub files, shield towers 15 stories high because nobody has read the datasheet of the micro and haven't noticed the AVR already has a module for that....
Am I the only one that likes to know EXACTLY what my Micro is doing?
The net is flooded with this bullshit.
Cool New IoT stuff coming out.... only shitty Arduino tutorials consisting of:
1) get your Arduino Carbonara UNO,DOS,TRES-CATORCE
2) load the obscure GitHub Prego Library.sauce
3) Success! LIKE, SHARE, FB, Insta-interest
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
perhaps i'm not bright enough but the complexity of files / screen based Arduino activity both repels me and makes me feel and look stupid every time i attempt to get anywhere, selling the lot.
Are you sure? yes | no
sad all sad.. i am so frustrated with the way things have become.... please just write simple code and explain in the simplest way how it works and why it is needed.
Are you sure? yes | no
i don't think you get the point of arduino! Your perfectly entitled to ignore the arduino code,library's and bootloader and program the micro directly if you want to use it as a dev platform. Hell if you want you could use any number of compilers and ide's.
It's great for people who want to accomplish a task without a great knowledge of hardware or software programming.. You know like artists etc.
Are you sure? yes | no
Well, I can see both sides of it, I do think there is a place for Arduino, either for beginners or for quickly bashing something together. Personally I prefer to understand exactly whats going on, probably too much so and I only write my own libraries.
What does worry me is when this level of technology ends up in proper products. I work in live TV, both in the field and designing broadcast equipment, and traditionally kit was built to a high standard because shows depended on it and it had to work at midnight in a muddy field somewhere. If things failed it would be catastrophic.
Recently someone sent me a photo of a fibre-optic convertor unit that does multiple channels of video plus lots of other interesting things, inside, the main processor was... a raspberry pi...
Bare in mind this piece of kit costs somewhere around £8000 and an entire TV show could rely on it......
One SD card corruption and a Premier League footie match could go off the air....( not necessarily a bad thing.....)
And only today, I've seen a broadcast manufacturer release an arduino shield designed to control cameras and studio equipment. This kind of thing scares me a lot....
Are you sure? yes | no
I kind of agree, I'm an old school PIC fanboy. I like having full control and knowing what's going on. But I can see some attraction to Arduino for beginners, probably gives a sense of achievement quicker but I think a lot get stuck at this stage because of the reasons you describe.
Are you sure? yes | no
Has a stack ever received so many comments so quickly?
Are you sure? yes | no
[this comment has been deleted]
LOL 16 minutes at the normal activity-lull-hours. :)
Are you sure? yes | no
somebody had to say it.
Are you sure? yes | no
Why arduino is great:
1. allows me to do something simple with no ridiculous learning crazy long and barely readable datasheets. E.g. test that my LED string display is working.
2. This makes it easy to learn other stuff, not microcontrollers! MCUs are boring.
3. allows me to go the hard way if I want to. It even allows to mix stuff. For example, I needed a top-notch timer juggling, and serial communication. I didn't bother learning serial registers and stuff, but I did go in depth on timers.
4. Shitty libraries... well, if one is good enough, I'm using it. If not, I can roll my own =), task specific and efficient.
Yes I did dig arduino sources a few years back. It's a mess. I agree.
Are you sure? yes | no
"This makes it easy to learn other stuff, not microcontrollers! MCUs are boring"
And then you (generic you) publish your libraries, then your code gets wrapped up in a nice package and promoted and used by others and then I complain about how poor and obscure these libraries are and then I get my ass chewed off because the library is shitty.easy(), I must be wrong because lots of people use it, but in reality it was written by a dude wanting to learn Hydroponics, who thought MCU's are boring....
Are you sure? yes | no
If you want a great play, go read some Shakespeare and don't hang out in the zoo.
Are you sure? yes | no
Broaden your tool set!
All of the things you mention can be accomplished just as easy or easier, faster and better while knowing less about the system with *modern* tools.
I don't think everyone should be a microcontroller expert. But you have way less chance of shooting yourself in the foot, and you'll have a better experience and result if you look at something like NodeMCU (http://nodemcu.com/index_en.html), MicroPython (https://micropython.org/), PlatformIO (http://platformio.org/), mbed (https://www.mbed.com/en/), Espruino (http://www.espruino.com/), ...
So many better options. Arduino is seriously old crap. Unless you like using tools and computers from a decade ago, you'll benefit if you let it go.
Are you sure? yes | no
I agree. Maybe when Arduino first came out it had its use but it's time to move on people. It's especially bad if someone throws together an Arduino prototype that works half the time in lab conditions and then thinks they can go to production with it... I speak from experience.
Arduino as a teaching tool is horrendous. There is, after all these years, STILL no way to step through your code, which it pretty much the most important thing you need to be able to do to get an understanding of what the code does. Instead you're supposed to grab a pile of random libraries, unversioned and of unknown origin, cobble something together, throw it at the wall and see if it sticks. What a horrible way to get introduced to embedded design!
By the way, Arduino did NOT get it right with their headers on the hardware either. They HAD to shift one of them out of a 0.1" grid so you HAD to buy a stupid shield instead of being able to stick on a generic perf board.
I wrote a blog post last year about this very subject:
http://www.achanceofbrainshowers.com/2015/3/17/why-not-use-arduino/
Are you sure? yes | no
nice writeup!
Are you sure? yes | no
I get your point Dave, but I personally think that Arduino has done good to the community. Of course now there's a metric shit ton of script kiddies that just garble code found in the depths of the Interwebs and put it on GitHub and say "look, I made a 50 files library that blinks your LED, how cool is that? It also takes 99% of your program memory" , but you should not see only the downside of the story.
I'm currently going through (multiple times, actually) an entire Arduino Core base and Atmel SAMD datasheet to get a custom Arduino-compatible board working and let me tell you that when you know what you are doing, it gets linear and you just do "modify this, then modify that, then jump to the header file imported in this one and modifty that as well" most of the times, to get things working. If there's something you do not need, just #ifdef it out and that's it. Otherwise, if you (generic you) do not like this, just go grab your Xyz Studio version number whatever, import the Xyz libraries for Xyz MCU, then type your own main.c file and bash it.
Of course the codebase got convoluted over time, because as you said they are now supporting several different boards and mcu families, so that's just how it goes around when making a unified API multi-platform.
The situation changes when you want to expand real shitty libraries (I'm trying to adapt the Adafruit_TFTLCD library for a cheap Chinese LCD display board I have....sheeeez), but that's because of the reason I mentioned at the beginning of this answer.
Dunno if this is ever going to be of help to anyone.
Cheers
Are you sure? yes | no
This sounds like you're responding to everyone, but only use my name :D I'm confused..
Are you sure? yes | no
Yeah I was at work and just could not keep up with the names of everyone :D
Are you sure? yes | no
Arduino is good for quickly sketching up a prototype. I agree that it isn't appropriate for teaching or long-term use though.
Are you sure? yes | no
Arduino has a use. When I'm doing an easy project, and need it finished in a day, I grab an arduino, plug in some sensors and an LCD, modify three lines of whichever example sketch is closest to my need and hit upload. Sure, I miss my preferred IDE, and if I wanted low cost or efficiency or hacker cred I would use a different micro on a custom board... but sometimes you just need to get a hack out the door :)
Are you sure? yes | no
I will bite. I think you are underestimating Arduino. I think they did pretty well, considering what they could have done instead:
* They could have used a closed hardware platform, requiring NDAs to get datasheet, like Raspberry Pi Foundation did,
* They could invent their own language, like BASCOM, and lock out the users in that land forever.
* They could make it impossible to mix Ardunio code with normal microcontroller C++ code, making it harder to transition gradually between the two.
* They could use their own custom "standard" for connectors, instead of pin headers, like Seeed studio does, so only the special breakouts they make would fit.
* They could require all shields to have a small memory on them, identifying them, like the Raspberry Foundation does.
* They could add some crypto to that memory, so only "officially signed" shields would work, how Apple would do it.
* They could distribute all libraries as binary blobs, like you do on Windows.
* They could also sign the libraries, so you couldn't use "unoffical" ones.
* They could require you to register at their website and do all the compilation "in the cloud", like Micro:bit does.
* And so on.
Are you sure? yes | no
Thanks for biting.
Ive never underestimated Arduino.
The "revolution" on this industry has been because of it. I even bought one.
The dev board explosion, the form factor/shield concept....its all great.
Most of it IS because Arduino (the board).
As ive said my problem is the obscure coding in 23 files.
Execute.task() = success.....does not teach me anything.
Maybe if others had it the other way around, they would understand the hassel.
And whats worse is that new hardware is being converted to arduino and now finding a Non-convoluted, 41 file, arduino.easy() code is imposible. Companies push out new products and release only arduino code which is fine...if it was readable.
And THAT is my problem.
Are you sure? yes | no
It's quite readable. Certainly more than hardware-specific shifting bits into ports. Especially on the ARM boards, where you have to do a ton of things before you can even blink a LED. Thanks to the high(ish)-level nature of the Arduino code, you can run the same code, the same libraries and the same hardware drivers on a huge range of platforms without or with minimal modification. Would you rather rewrite the WS2812 driver code for every new chip you are using?
The reason why all those new products use Arduino is precisely because those companies want the users to be able to use their existing experience and existing code with them. If you release a new product, but there are no libraries for it, and using it requires you to read 400 pages of datasheets, then the adoption of that product can be pretty slow. On the other hand, if you can just run your old programs on it, and then maybe add a few changes to make use of the new features, that's a clear win.
Are you sure? yes | no
so its better to have people just download code and not read the 400 pages? I know thats not your point....but its whats happening.
The portability is enviable though.
Are you sure? yes | no
It's better to have the people just download the code and play with it, and read the 400 pages a few pages at a time when they feel like learning how it actually works and/or want to improve it. You know, start with something simple but not very good, and gradually learn to become better and more powerful. Like in the RPG games.
Are you sure? yes | no
400 pages vs. 23 files - this is not the best argument either. You should be able to do both.
Are you sure? yes | no
It is exactly like playing RPG. Some like to buy their shiny equipments "Pay to Play" and some just like the challenge and grind their way up.
400 pages is misleading as most of the time, it really boils down to an actual chapter around 20-30 pages that are relevant. I deal with 700+ page of ARM chips reference manuals all the time. Half the time I wish the manuals were 10% more detailed.
Are you sure? yes | no
@K.C. Lee : oh no, not more details in Arduino documentations ! It could scare the noobs and make them believe it's actually complicated...
I believe that a lot of the success of Arduino comes from the discourse and tone of the promoters. "It's easy" "Just click and it works". It's comforting and reassuring and of course it's not, but the noob has bit the bullet and is now too invested to go back.
And Yes, I once tried to use Arduino. I failed. The IDE couldn't connect to the board. I gave the boards away to a kid who could use it. I'm lame. Sue me.
Are you sure? yes | no
Check out http://retrobsd.org/wiki/doku.php. There's also a 4.4 BSD port in the works. :)
Are you sure? yes | no
You're obviously not in the target audience then. The thing about arduinos is that they make it easy for people to get started with microcontrollers, and electronics in general.
Are you sure? yes | no
indeed its a great learning tool and i tottally get that.... my point is that its NOT facilitating learning when stuff is so hidden you cant see how it works..... and im sure the audience here is or should be interested in HOW things are getting done.
Are you sure? yes | no
That's fair. However, I think the arduinos are aimed at an audience that doesn't really care about the specifics of register manipulation for GPIO output on the ATMEGA328. It's more of a tool to streamline development of projects that involve a microcontroller.
Are you sure? yes | no
[this comment has been deleted]
You would only be proving that you _post_ more projects than i do..... ive seen your projects from HaD fame... i even skulled a few of them here.
You have more internet cred than i do....thats about it.
Edit: why take it personal?
Are you sure? yes | no
It was meant to be agressive... i was pissed man.... hours looking at code trying to figure out what task.bullshit() does, only to find its running bullshit.sensor() behind it, which calls to protocol.read()
.......aaaaaahhhhhhhhhhhhhhhhhh
Are you sure? yes | no
totally agree about the convoluted over engineered libraries I see from many people but not all. I do like the arduino though, way easier then the basic stamp, and way more examples and a friendlier community then parallax at least when I was interacting with that community a few years ago, and I found some nice reliable inexpensive arduino clones. But I see in other coding worlds the same problem quite often.
Are you sure? yes | no
I really quite like the Arduino and the IDE; it was the first platform I really used when I started programming, and was great tool for a beginner such as myself.
One day I will drift away from it and start using other microcontrollers and IDEs when i start conjuring up more difficult orojects, but until the sheer convenience of it all will keep me using it for a while to come.
That being said; have come to love and prefer Python these days. And I tend to write in a basic text editor on a windows machine :-)
I like it, but I don't know any better :-)
Are you sure? yes | no
No need to drift anywhere... my point which most missed, is that when you chose to code in what ever platform, make code readable.... its a micro, not the Matrix.
Are you sure? yes | no
I completely agree mate; a clear, readable code is much more useful. It is something I have started understanding the importance of since using python.
Are you sure? yes | no
BTW you only hate it because you haven't seen the light yet!
Don't despair! do as I say:
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
Are you sure? yes | no
you are going to need 23 files for that DigitalWrite() to work.
look for the Instructables on how to load the Library for that.
Are you sure? yes | no
DDRB |= (1 << DDB5);
PORTB |= (1<<PB5);
That's for AVR boards.
Are you sure? yes | no
Personally I don't like the IDE but I use it seldomly to perform simple tasks like generating signals or testing functions. As for the board it is very convenient to have a pre-assembled AVR with crystal, crystal load caps, decoupling caps, voltage regulator and USB-serial converter.
Are you sure? yes | no
I thought the boards where cool too.
There is a cool dev board for all micros now.
I dont have a problem with people coding in what works for them and using x-micro....
Just dont hide that which needs not to be hidden.... after a while "elegance" becomes impractical.... i think arduino is here... thus my hate.
Are you sure? yes | no
Number of Atmel parts in my projects here: Zero.
Are you sure? yes | no