Readit News logoReadit News
sircastor · 3 years ago
I’m a sufficiently advanced programmer, and I still use the Arduino IDE rather than anything else for my electronics projects (though mostly non-Arduino boards these days)

My VSCode setup is already crowded with Development tools for other platforms and the Arduino IDE reliably works, with the libraries. I’ve been using the 2.0 beta for awhile And it is really nice. I’m pleased it’s made it out of beta.

DannyBee · 3 years ago
I'm the exact opposite. I find the Arduino ide totally unusable. It takes forever to start up. Every operation is slow. It can take over ten seconds to open a small file and display it on an top of the line 12th gen Intel laptop

It literally recompiles all code on every verify or upload (because "we don't want lots of machine objects littering hard disks")

So on any of the mbed based boards compiles are like a minute or two for anything. On platformio and other compatible ways, it is instant.

So even for basic messing around I don't use the Arduino ide because it makes it not fun

HeyLaughingBoy · 3 years ago
> recompiles all code

This alone was reason for me to move to PlatformIO. It's infuriating.

Teknoman117 · 3 years ago
> It can take over ten seconds to open a small file and display it on an top of the line 12th gen Intel laptop

What did you do to your computer? My 5 year old Ryzen desktop opens the Arduino IDE in ~1.5 seconds.

glouwbug · 3 years ago
How can C++ compilation be slow if Arduino doesn't even use templates and the final binary is to fit in 32kb of ROM? If anything, recompiling all cpp files instead of individual object files with a link step shouldn't even have a noticeable speed difference
gw99 · 3 years ago
It's horrible. After futzing with it for a year or two for trivial test rig and automation stuff I switched to avr-gcc and avr-libc toolchains and just used vim and makefiles now.
joshvm · 3 years ago
Unfortunately yes. I ran a workshop with a group of students learning about digital electronics. They all installed the IDE and it was pretty much unusable except for on the faster laptops. The RP2040 was particularly bad, but the Mega*8 was a bit better. The problem seemed to be continual project indexing and no caching. It was also very difficult to see progress so often you'd hit upload and wait for tens of seconds before figuring out if anything had compiled or uploaded.

This is absolutely an Arduino problem. avr-gcc for a small program often compiles faster than the time it takes to upload with avrdude. And the IDE uses both underneath. Or compared to Atmel Studio, which is surprisingly not bad.

andyfilms1 · 3 years ago
Lots of people swear by PlatformIO on VSCode, and that's totally fine. But if you're the kind of programmer that just wants "notepad, but with an 'upload' button" the Arduino IDE is hard to beat.
IshKebab · 3 years ago
Why would anyone want that though? Masochistic challenge? "If you're the kind of person who likes to wash their clothes by hand..."
taf2 · 3 years ago
Interesting I found platform.io and a like a Makefile approach so I can continue using vim… but it’s a little frustrating when the esp32 s3 came out and support lagged behind… maybe I should use the more native approach for these or maybe just use the IDE… I just can’t bring myself to learn a user interface that will not be the same in 10 years… vim and bash have not really changed in 20 years …
sgtnoodle · 3 years ago
Yeah, I'm the same way. I battle build systems, cross compilers and version control all day for work. I have specific company owned laptops set up for all that. When I just want to mess around with a microcontroller, I fire up the Arduino IDE, and use Google drive for versioning...
wejick · 3 years ago
This is the problem with vscode that I'm sure many are experiencing. I hope they add easier way to manage and run multiple profiles of the IDE.
ComSubVie · 3 years ago
I do have set up different workspaces for different development tasks where only the necessary plugins are activated. If I do embedded development I open my platformio.workspace, if I'm doing Java I have a workspace and if I'm doing JS/Frontend stuff I have a workspace as well as for LaTeX. It really works well and isn't really difficult (although I'm not really sure that workspaces should be used for this)

Deleted Comment

tejtm · 3 years ago
PSA: there is also the "arduino-cli" which lets us use other, everyday tools.

https://arduino.github.io/arduino-cli

sixstringtheory · 3 years ago
As always, there’s are emacs options built on top of that: https://www.emacswiki.org/emacs/ArduinoSupport
morelisp · 3 years ago
Having lost several hours once trying to set up Arduino.mk properly, I would strongly recommend not using anything suggested there and opting for a Makefile calling arduino-cli and normal c++-mode, alongside arduino-language-server.
Cloudef · 3 years ago
Yes, arduino-cli is very nice. You get the convenience of arduino ecosystem (prebuilt cross-compilers, board files, libraries), without the downsides of using full blown IDE.
analog31 · 3 years ago
This is an aside, but Arduino has saved my butt during the chip shortage. It's often possible to port code from one chip platform to another with relative impunity. I've ported mundane apps to lower performance chips, to free up the fancy boards when new boards become unavailable. Also, sharing code across platforms has resulted in a much larger developer community.

Nothings perfect, sometimes you need chip specific functions, but I have so far been pretty lucky.

franga2000 · 3 years ago
Yes! This is exactly why I continue to use Arduino for both personal and "work" (various non-industrial one-off widgets), despite having been literally laughed out of the room by embedded software and hardware engineers for even suggesting it.

Like for one project as a student, we had to make a dozen or so units of a custom data logging thingy. The plan was to use STM boards, but I suggested using Arduino software/libs because all the hardware was supported and we didn't really need anything STM-specific. Eyes were rolled, something to the extent of "Arduino is for amateurs and children" was said, so I volunteered to work on the server side instead and let them have their fun with STM32 HAL. They ended up having to interface with most things manually because libs just don't exist or aren't publicly available. Half a year later, they needed to set up a more of these units, but it was in the middle of the supply chain issues and basically no affordable STM boards were in stock. Meanwhile, the local electronics store had more than a hundred Arduinos in the warehouse. My screenshot and winking emoji were not appreciated in the team chat. The new generation now uses various Arduino (Atmel) and ESP boards with software now fully written on top of the Arduino stack with only one or two board-specific sections in the code.

analog31 · 3 years ago
I've never regretted choosing the tools that were intended for hobbyists and kiddies. They laughed at me for using Python. Of course there are good reasons for choosing the grown-up tools, but also bad reasons, and the bad reasons translate directly into costs in time and effort, lack of adaptability, and so forth. These things are normalized by the structure of the organization, but remain painfully visible to the astute observer on the sidelines. And to the users.
olabyne · 3 years ago
For work, I had to program on a industrial Atmel board. I was baffled by the crappy librairies Atmel provived with the board. Stuff like the I2C lib was broken and I had to patch some code that was checking interrupts flags and such. I spent days to do something I could have done in days at home, and the board was still unstable. That's why companies with non-critical sytems don't bother with 'industrial' developement boards, when it's cheaper to buy Arduino compatible boards. Oh, and the documentation and knowledge available online is gold, when compared to the crappy docs from a big tech firm,
bee_rider · 3 years ago
Work stuff, or hobby stuff? If work, what industry? An environment where you are able to do ad-hoc replacements like that sounds cool as heck!
analog31 · 3 years ago
Work stuff, but in an R&D environment where nothing goes into large scale production. If something threatens to be useful, it gets handed over to the dev team. The devs are actually very good engineers, but they do use the traditional methods. Moving across platforms is a headache -- perhaps the biggest problem is that the contract shops also have their own chosen platforms, so it's hard to outsource even minor work when a little bit of extra capacity is needed. Every platform is an island.
babypuncher · 3 years ago
I always felt the Arduino IDE was lacking some features I would consider "basic" for any IDE. I'm glad to see they seem to be putting a lot more work into it lately. I think these features will improve usability tremendously.

When I was doing a lot more Arduino programming ~5 years ago I ended up using Visual Studio with some pretty good extensions. The Arduino "IDE" really felt more like a basic text editor with an upload button at the time.

fny · 3 years ago
Is anyone else terrified that Microsoft is slowly taking over the entire development stack? I love the new Microsoft, but I'm generally worried about what tomorrow's Microsoft could look like.

I have a particularly hard time forgetting "Linux is a cancer."

solarkraft · 3 years ago
The new new Microsoft is the old Microsoft. They're already attempting to extinguish open source VSCode (much more "open core" nowadays). However most of the cool projects based on "VScode"are actually based on its open core which Microsoft won't be able to take it away.
pjmlp · 3 years ago
Originally there wasn't even source code to look into at all, VSCode started as an Web IDE for Azure.
smegsicle · 3 years ago
what was that thing where they invited open source dotnet projects to join a curation club on github, and proceeded to take over those projects?

Deleted Comment

funnym0nk3y · 3 years ago
Is there any advantage in using this over using vscode with platform.io?
erwinh · 3 years ago
In my first years as design student I spent quite some time programming in the Arduino IDE because it worked pretty much out of the box plug-n-play.

Happy to see an integrated rich serial data plotter. One of my tricks used to be to do a: Serial.print(inputVal * 100 * "-") to get a basic visual 'chart' stream going to test sensor inputs and the like.

stjohnswarts · 3 years ago
It's been a while but I made a plotter for a client several years ago kluged a simple rs232 client that fed data to gnuplot as a plotter and they could also do some basic signal filters I put in the client. Gnuplot is good for quicky jobs where you want to graph things, even real time. Along the lines of what's going on here https://funprojects.blog/2020/09/10/gnuplot-realtime-plots-i...
PointyFluff · 3 years ago
Serial plotter has been a thing for VERY long time.
1MachineElf · 3 years ago
Maybe it depends on your preferences. As someone who enjoys "suckless" tools on Linux, it makes me happy when I can avoid VS Code, however, many embedded projects out there just default to Platform IO. A simpler Arduino IDE is an advantage for me. With a more capable Arduino IDE, maybe there will be less VS Code dependence.
lkschubert8 · 3 years ago
As I understand it this is really just a specifically configured vs code fork for arduino.
skybrian · 3 years ago
You can use PlatformIO from the command line, so it should work with any editor in principle. (It’s written in Python.) The main thing missing would be the glue code to tell the editor which directories to find header files.
t0mas88 · 3 years ago
I think this is more targeted at beginners or at hardware/electronics people that have little software experience. In those cases vscode + platform.io is probably more daunting than a simple arduino editor with a button to flash your code to the chip.
BoorishBears · 3 years ago
I feel like the complexity is being oversold a bit here, I agree Arduino is very beginner friendly, but PlatformIO is very much a "Click and Play" development experience

For an absolute beginner PlatformIO is off the beaten path so I'd say skip it to start, but if you have any familiarity with traditional IDEs, PlatformIO is probably 90% as beginner friendly while being more of a traditional development environment.

2.0 being based on Monaco will help bridge the gap, but it's clear that they're still going for a very pared down experience in the Arduino IDE. Other comments comparing it to Notepad are about right... it's very easy to get into Notepad but can be limiting once you get past the initial hump

franga2000 · 3 years ago
For one it's a single install, so you don't need to install VSCode, add the extension, restart, make some changes in the project config .ini... This is a huge deal for hobbyists who are often not computer power users or even fully computer-literate (often children who are just learning this stuff).

Otherwise, you can do anything Arduino 2 can do with VSCode+PIO, it'll just take some setup.

Saris · 3 years ago
It's simple and easy to get started with, if you're already using platform.io then there's not really any advantage to going back.
jon-wood · 3 years ago
If you’re comfortable using platform.io, probably not, you’re not the target audience for the Arduino IDE, which I think is much more focused on people who are just picking up electronics and embedded development.
HeyLaughingBoy · 3 years ago
It's simpler, so if you only want a really quick program, like something you can knock out in 5 minutes, the Arduino IDE is faster to get going. But that's the only advantage I have found.
pjmlp · 3 years ago
No for professional coders, yes for beginners.
marcodiego · 3 years ago
Maybe unrelated, but I must say it again: we need an arduino for the fpga world.
trotFunky · 3 years ago
Well, there's an Arduino FPGA board : the MKR Vidor 4000[0]

However I'm not sure how much people use it and if it really has the simplicity that Arduino brought to tinkering with microcontrollers. I read and hear a lot that the FPGA dev tooling is usually not really great to use and very vendor-specific, but it's something I haven't tinkered with yet so I don't really know much !

[0]: https://store.arduino.cc/products/arduino-mkr-vidor-4000

duskwuff · 3 years ago
> Well, there's an Arduino FPGA board : the MKR Vidor 4000

It's an Arduino with an FPGA on it, yes. But the FPGA is practically a hood ornament: there is no support whatsoever for building gateware in the Arduino IDE, only for using a set of prebuilt demonstration bitstreams, and what little documentation Arduino has provided on using the FPGA (e.g. https://docs.arduino.cc/tutorials/mkr-vidor-4000/vidor-quart...) is extremely vague and is missing a lot of critical information.

(Additionally, some of the product specifications for the board are highly misleading -- for example, some pages refer to the edge connector as "mini PCI Express" and suggest that it can be used "to creat [sic] your own PCI interfaces", but the FPGA on the board does not support PCIe.)

You're much better off with a dedicated FPGA development board. Arduino hasn't brought anything useful to the table here.

ThrowawayR2 · 3 years ago
In what way? The hard part of using FPGAs is all the computer engineering background necessary to design and debug circuits. The janky IDEs are really the least of the hobbyist's problems and cheap student/hobbyist boards (e.g. Digilent Arty series) have been available for years.
jmole · 3 years ago
i think what you mean here is, we need a better IDE for the fpga world.

building a simple hardware dev board is a straightforward exercise.

building an IDE that lets a novice do anything useful on an fpga, outside of a very basic state machine, is an entirely different problem in both scope and structure.

The vast majority of HDL blocks you'd need to make such a thing more useful than a $4 microcontroller are closed source, nontrivial to build, and require careful thought in terms of integrating them into a workable system, not to mention very specific and application dependent PHYs: Things like HDMI, ethernet, USB, etc.

I think what most people would prefer is a fast general purpose CPU with pluggable, low-latency memory mapped peripherals without the hassle of having to know linux systems programming to make it work.

teamonkey · 3 years ago
> building a simple hardware dev board is a straightforward exercise.

I would argue that you can make your own microcontroller dev board easily enough too. An RP2040 or similar, a USB programmer, some kind of voltage converter, etc.

The joy that Arduino bright to microprocessors was that it was a device that was useful for a lot of projects straight out of the box, accessible to those with only high school knowledge of circuits or programming.

MisterTea · 3 years ago
We need sane open source fpga tool chains that can generalize building bitstreams for multiple vendor fpga's. As it stands the idea of programming them isn't that hard (well, to me), it's the damn tooling that is an ugly vendor created and maintained barrier to entry.

I want a gcc or LLVM like compiler ecosystem that can handle multiple vendor backends and language front ends so we can use vhdl, verilog or a new hdl in a project. Let me write portable modularized logic files that let me abstract the underlying hardware so I can target different vendors and devices. Decouple layout and let the community create as many textual or graphical layout tools as needed. Then let me write a makefile to handle the build process. I don't want to worry about switching gigabytes of tooling so I can move from a Xilinx to Lattice or Microchip FPGA or SoC. These tools will be a boon to devs using those awesome FPGA SoC's as you can self-host the toolchain on the SoC itself.

I did a bunch of fpga self learning around 2012 and spent a lot of time fighting with getting ISE to run on Linux. I then tried Altera and then fought with fought with Quartus (though from memory I think it was easier to setup). Then ISE was replaced by vivaldo and I felt discouraged by having to adopt a new IDE contraption with more licensing woes. Then my hard drive died and I've never bothered with wrestling fpgas since. The two fpga boards, a Digilent Nexus 3 and Terasic de0 nano collect dust. I gave up because the tools sucked and i wasnt using them to make money.

Lramseyer · 3 years ago
One of the difficulties of open sourcing bitstream generation of an FPGA is not the fabric itself, but all of the other IPs on the chip. Things like PCIe, Ethernet, memory controllers, SerDes and whatnot are often licensed from external vendors who don't want their register maps out in the open. Some FPGA vendors give you a simulation model, but I'm pretty sure you have to sign an NDA.

Also IPs sometimes have errata in them that need to be worked around. With an FPGA, you can usually fix it in soft logic, but vendors don't like giving that out either.

For some smaller FPGAs without complex IPs, they are starting to open up their bitstream generation algorithms. Though bitstream generation is pretty trivial compared to synthesis and place & route.

pabs3 · 3 years ago
Have you looked at F4PGA? They are working on exactly that.

https://f4pga.org/

moring · 3 years ago
I found the open-soruce toolchain to be a good first step into that direction, that is, not having to jump through hoops to get the vendor toolchain to work.

It's only a first step though. Still needed: an Arduino-like IDE where you can click-and-run your design; examples that match the board you are using; examples to use peripherals(1) without having to resort to vendor IP blackboxes.

We're also eternally stuck with HDLs that are either crappy, niche-only, or add loads of complexity -- but I'm not really sure how bad this is for a beginner. Getting Verilog syntax right is probably only half bad if you have good IDE support.

(1) talking to an SDRAM is easy, getting DDR3 timing right on an ECP5 isn't. A simple "this is how you do it" example would be priceless, not being stuck between blackboxes from Lattice and Migen exception stacktraces.

joshka · 3 years ago
Rather than Arduino, something by the raspberry pi foundation might hit the spot and make this sort of thing ubiquitous. Perhaps call it the "Raspberry Phi"?
worldsayshi · 3 years ago
This feels like a dump question but what is stopping the Arduino from being used as a fgpa?
stjohnswarts · 3 years ago
It's not dumb you're just a little ignorant of the advantages of having dedicated hardware for an FPGA but it reminds me of "would you download a car?" :) . You can emulate an FPGA on the arduino (a really small fpga) but it would be so slow that it would be useless. Imagine simulating a Video Card on your PC, it can be done, but it would be 1000-100000x (more?) slower than the actual GPU.
eric__cartman · 3 years ago
You can't emulate a real FPGA with a microcontroller
dang · 3 years ago
Related:

The Arduino IDE 2.0 beta - https://news.ycombinator.com/item?id=27123410 - May 2021 (120 comments)