Comments (15)
I ended up using the official Arduino CLI and implementing some toolbar commands launched in a terminal plugin. Not bad: Arduino CLI is a very nice piece of software, my Atom integration is a little clumsy, but I'm happy with it.
If someone is interested, I will spend some minutes to share my setup.
from arduino-upload.
So, here's my setup.
First thing, I installed Arduino CLI and followed the getting started guide to make sure it runs fine from the command line.
Then, these are the Atom packages to install for toolbar and terminal:
flex-tool-bar
language-arduino
terminal-commands
tool-bar
x-terminal
This is the configuration for the terminal package:
"x-terminal":
spawnPtySettings:
projectCwd: true
terminalSettings:
colors:
selection: "#ffffff"
defaultOpenPosition: "Split Down"
leaveOpenAfterExit: false
runInActive: true
title: "Terminal"
xtermAddons: {}
This is the terminal-commands.json
file:
{
"arduino-cli:compile": [
"direnv allow \"${project}\"",
"arduino-cli compile -b \"$ARDUINO_FQBN\" \"${dir}\""
],
"arduino-cli:upload": [
"direnv allow \"${project}\"",
"arduino-cli compile -b \"$ARDUINO_FQBN\" -u -p \"$ARDUINO_PORT\" \"${dir}\" && echo \"Done uploading.\""
],
"arduino-cli:board-list": [
"test -f \"${project}/.envrc\" && atom \"${project}/.envrc\"",
"arduino-cli board list"
],
"arduino-cli:serial-monitor": [
"screen $ARDUINO_PORT"
]
}
I use direnv
to store and change $ARDUINO_FQBN
and $ARDUINO_PORT
at will. It's optional, since those variable can be replaced by actual fixed values in terminal-commands.json
(if so, remove all direnv allow
commands from it). If used, here's an example .envrc
file:
export ARDUINO_FQBN=arduino:avr:nano
export ARDUINO_PORT=/dev/ttyUSB0
Finally, here's the toolbar.cson
:
[
{
type: "button"
icon: "check"
callback: ["window:save-all", "arduino-cli:compile"]
tooltip: "Arduino: Save all and Compile"
}
{
type: "button"
icon: "arrow-right"
callback: ["window:save-all", "arduino-cli:upload"]
tooltip: "Arduino: Save all and Upload"
}
{
type: "button"
icon: "terminal"
callback: "arduino-cli:serial-monitor"
tooltip: "Arduino: Serial monitor"
}
{
type: "button"
icon: "plug"
callback: "arduino-cli:board-list"
tooltip: "Arduino: List connected boards"
}
{
type: "spacer"
}
{
type: "url"
icon: "circuit-board"
url: "https://www.arduino.cc/reference/en/"
tooltip: "Open: Arduino reference"
}
{
type: "spacer"
}
{
type: "button"
icon: "tools"
callback: "settings-view:view-installed-packages"
tooltip: "Atom packages settings"
}
{
type: "button"
icon: "gear"
callback: "flex-tool-bar:edit-config-file"
tooltip: "Edit Toolbar"
}
]
from arduino-upload.
The same happened here. The only solutions was to reinstall Atom...
from arduino-upload.
The installation of the package causes the Atom Editor to simply crash. When it happened the first time, I thought some configuration of mine caused the editor to crash, so I removed the install as well cleared all the configuration files. Then, after I reinstalled Atom from scratch, I downloaded the package again, and again the editor simply crashes every time I try to load the application.
same here. delete the package folder fix the crashes.
from arduino-upload.
Funny thing is it kept on crashing even after I did that. So any help as to why it happened or what I could do to remedy it would be appreciated.
from arduino-upload.
In my case I couldn't wait for a fix and went with platformIO plugin, it works great for my arduino project. (upload, monitor and more..)
from arduino-upload.
I tried the new official beta 2.0 IDE, but it's absolutely underwhelming compared to Atom (but still better than the legacy one, of course).
Did anyone tried to downgrade Atom? Could that work?
from arduino-upload.
Same issue here, none of the tools worked at any point, kept crashing atom once installed. Fix for the crashes was running apm disable arduino-upload
.
Really wish this worked at the moment, would have saved me a lot of time.
from arduino-upload.
I’d love to know the setup, as mine currently is just the beta IDE, which as described before is underwhelming.
from arduino-upload.
In my case I couldn't wait for a fix and went with platformIO plugin, it works great for my arduino project. (upload, monitor and more..)
PlatformIO is great, but the thing I want something truly lightweight.
from arduino-upload.
Sounds good. Thanks for giving the setup, I’ll try it when I get the chance to do so.
from arduino-upload.
Got the same result - totally trashed my entire Atom set up!!!!!!!!!!
Thanks for that....
Never had a problem with other Atom extensions.
from arduino-upload.
still crashing...
For Ubuntu (and most Linux systems) run this command in a terminal;
apm uninstall arduino-upload
That is using Atom's package manager to remove the broken package, without having to re-install Atom.
Atoms Flight Manual
from arduino-upload.
So, here's my setup.
First thing, I installed Arduino CLI and followed the getting started guide to make sure it runs fine from the command line.
Then, these are the Atom packages to install for toolbar and terminal:
flex-tool-bar language-arduino terminal-commands tool-bar x-terminal
This is the configuration for the terminal package:
"x-terminal": spawnPtySettings: projectCwd: true terminalSettings: colors: selection: "#ffffff" defaultOpenPosition: "Split Down" leaveOpenAfterExit: false runInActive: true title: "Terminal" xtermAddons: {}This is the
terminal-commands.json
file:{ "arduino-cli:compile": [ "direnv allow \"${project}\"", "arduino-cli compile -b \"$ARDUINO_FQBN\" \"${dir}\"" ], "arduino-cli:upload": [ "direnv allow \"${project}\"", "arduino-cli compile -b \"$ARDUINO_FQBN\" -u -p \"$ARDUINO_PORT\" \"${dir}\" && echo \"Done uploading.\"" ], "arduino-cli:board-list": [ "test -f \"${project}/.envrc\" && atom \"${project}/.envrc\"", "arduino-cli board list" ], "arduino-cli:serial-monitor": [ "screen $ARDUINO_PORT" ] }I use
direnv
to store and change$ARDUINO_FQBN
and$ARDUINO_PORT
at will. It's optional, since those variable can be replaced by actual fixed values interminal-commands.json
(if so, remove alldirenv allow
commands from it). If used, here's an example.envrc
file:export ARDUINO_FQBN=arduino:avr:nano export ARDUINO_PORT=/dev/ttyUSB0
Finally, here's the
toolbar.cson
:[ { type: "button" icon: "check" callback: ["window:save-all", "arduino-cli:compile"] tooltip: "Arduino: Save all and Compile" } { type: "button" icon: "arrow-right" callback: ["window:save-all", "arduino-cli:upload"] tooltip: "Arduino: Save all and Upload" } { type: "button" icon: "terminal" callback: "arduino-cli:serial-monitor" tooltip: "Arduino: Serial monitor" } { type: "button" icon: "plug" callback: "arduino-cli:board-list" tooltip: "Arduino: List connected boards" } { type: "spacer" } { type: "url" icon: "circuit-board" url: "https://www.arduino.cc/reference/en/" tooltip: "Open: Arduino reference" } { type: "spacer" } { type: "button" icon: "tools" callback: "settings-view:view-installed-packages" tooltip: "Atom packages settings" } { type: "button" icon: "gear" callback: "flex-tool-bar:edit-config-file" tooltip: "Edit Toolbar" } ]
Is it worth creating a package that uses android-cli
? I'm planning of creating one.
from arduino-upload.
Is it worth creating a package that uses
android-cli
? I'm planning of creating one.
I don't know 🤷♂️ I still think it's better fixing this issue. My setup works, but IMHO it has too many dependencies to make a package out of it (not only arduino-cli
, but also multiple toolbar and terminal packages); it also has some annoyances I found later, such as: it won't work if you launch the commands while the terminal tab has focus, instead of the editor tab with your sketch...
But, if you're thinking of creating a package that relies on arduino-cli
only, that implements all the rest itself, yeah, that would be definitely great. arduino-cli
works great, it's well engineered, and I think it's in fact the officially suggested approach: as they say, it "contains all you need to easily build applications around the Arduino ecosystem".
from arduino-upload.
Related Issues (20)
- Can't open serial monitor HOT 4
- cant select com port HOT 3
- Arduino Debugger Could Not Be Spawned HOT 2
- Commands not found HOT 1
- cant change executable path HOT 3
- Failed to install on Atom 1.39 HOT 6
- arduino-upload not installing HOT 3
- Install Issues on windows 10 machine
- getting error upon opening
- Failed to load the arduino-upload package HOT 1
- code references opening empty files
- Upload doesn't do anything HOT 1
- Build error without information HOT 1
- Doesn't Install Again
- nullPointerExeption
- none of the buttons on the toolbar are working idk what to do
- Weird unexpected newline in serial monitor
- [Feature request] Add compilation database support
- Uncaught TypeError: serialport.list is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-upload.