Hacker News new | past | comments | ask | show | jobs | submit login
Arduino command line interface (github.com/arduino)
147 points by braxxox on Aug 24, 2018 | hide | past | favorite | 29 comments



In the past I've had a great experience with PlatformIO which has a CLI and a front-end in Atom+VSCode

In contrast to Arduino, I've found it does a great job of handling your dependencies.

https://platformio.org/


The Arduino CLI handles that auto-magically (if you want) by leveraging clang and other tools. Also it's a single binary and doesn't require you to deal with python and other stuff. This was a pain point we got as feedback from a number of users. (Disclaimer: I'm the con-founder of Arduino)


PlatformIO is a great tool for building open-source firmware with dependencies.


I love PlatformIO. I don't even start projects without it nowadays, and Ivan is very responsive.


> Atom+VSCode

Excuse my ignorance, but how can something be in Atom and VSCode? Are there two separate versions?


> Are there two separate versions?

Yes. (The website says "Install for Atom .. or .. Install for VSCode")


This is great! Really like the idea of being able to move a lot of manual IDE setup/usage to a Makefile. After using the IDE for 3 years now, has anyone used a different IDE that boasts a lot of the same features but is a bit more... friendly?

edit: I guess we can use any IDE we want with this CLI, and make tooling around the CLI. I meant the question in past tense :)


You've been able to do that for years[1]. I've been mostly programming my arduinos through headless rpis, because I don't like the idea of my untested electronic designs having any connection with my desktop. Plus it's really way more handy that way, vim + all my keyboard shortcuts etc.

1. https://github.com/sudar/Arduino-Makefile


With all due respect the Arduino CLI is superior to Makefiles and similar tools. it's a single binary (no python or other stuff to install) that uses clang and other tools to automatically deal with dependencies and the process of converting an ino file to a c++ file that can be compiled. it interfaces with the library manager and core manager , downloads all the necessary files etc.. it saves you a ton of time and pain.


I’m using this as well. Works great! Compiles and deploys much faster than the IDE I’ve found.


The PlatformIO IDE and cli tools have really taken off in the last couple of years. This is probably at least in part a response to that. Although the desire to move away from a computer desktop Java code base full of technical debt is probably a large part of this too.

https://platformio.org


I have used the Stino plugin for sublime-text: https://github.com/Robot-Will/Stino


Atmel Studio works well with Arduino. It has an "import from Arduino sketch" project option and can call AVRdude as an external tool.


Arduino co-founder here. Let me know if you have questions and suggestions. We have a lot of features in the making so your suggestions can help us shape the roadmap


This is really exiting to me, I've wanted a native cross platform Arduino toolchain.


Excellent, one of my major gripes with arduino is that you couldn’t upload code remotely on a headless machine. This is a very useful for embedded systems in hard to reach or sealed off places.


You've always been able to do this via avrdude (which is also what this tool uses). The Arduino IDE at its heart is just package manager + a wrapper for various tools, specifically avr-gcc and avrdude for the AVR platform.


Arduino does a bit more than just "wrapping" other tools. otherwise it wouldn't have had the success it has


Right, it's a case of the whole is more than the sum of its parts. The philosophy of making things easy for beginners by automating things like setting up toolchains and managing libraries is a major feature, plus the Arduino libraries and hardware of course. I'm not trying to downplay what it does, just point out that the tools to do what OP wanted have been there the whole time.

Please keep up the good work, I've learned a ton from Arduino!


Boggles my mind how little Arduino has advanced since it was introduced. Just use mBed.


What kind of advancements do you think Arduino should be making?

Hadn’t heard of mbed before, but it looks way more complicated than Arduino to me. Is it easy to setup? Does it run on the same tiny 8-bit micro-controllers?

What I like about Arduino is it’s just me and the very limited hardware. Same reason I haven’t tried Ras-pi yet. I don’t want an OS with threading & security & networking for my little sensor robots. I have all that on my computers & deal with it ad nauseum for my day job. I like only having a tiny C program and some 5v pins to play with and nothing else.


Well the editor is still extremely basic so support for real IDEs would have been nice. That's probably the main thing.

The other thing is that the API is not very well-designed. It is very "my first C library". You could argue stability for not improving it but I feel like people would have tolerated one major update to something well-designed. Especially if you segregate the new API by hardware.

For example enums are totally unused so e.g. pin numbers are not properly typed. HIGH/LOW are just ints not books or enums. There are lots of other things like that but I haven't used Arduino for a while so can't list them off the to off my head.

I get that it isn't meant to be professional, but it's so popular that professionals end up using it.


I respectfully disagree. Arduino has evolved a lot since 2005. We have a ton of boards, features released every week almost. A cloud IDE https://create.arduino.cc , we recently launched our first FPGA board. Just because you aren't informed doesn't mean we are sitting on our butts :)


You can get a good Arduino clone for $4. From what I can tell, mBed boards cost an order of magnitude more.


Or an Arduino Nano clone for half that, even.

https://www.aliexpress.com/item/1pcs-lot-Nano-3-0-controller...


Careful with the exploding Nanos :)


ST mBed boards are about £11 which is far cheaper than official Arduinos (£20 for the Uno!) and they are much more powerful.


Is mbed still encumbered with that bizarre web-based compiler scheme?


No, mbed-cli [1]: `mbed compile --flash`, can use GCC, IAR etc.

[1] https://github.com/ARMmbed/mbed-cli




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: