It took some effort, but I have a comfortable and efficient development environment for Arduino on ChromeOS. I don’t have the exact steps and screenshots, but here are some notes on how I got it to work. Basically I use IntelliJ run configurations to compile and upload code to my Arduino boards using arduino-cli.
I tried running the Arduino IDE directly and it would run but all of the menu items were grayed out which made it just a glorified text editor. I also tried running VS Code which works great, but the Arduino extension required a working Arduino IDE. I tried to get the extension to just use arduino-cli but it wouldn’t. You can likely create run configurations in VS Code for arduino-cli commands like I’ve done in IntelliJ, but I’m less familiar with VS Code and prefer IntelliJ for the majority of my software development.
General Steps:
- Enable Linux in ChromeOS
- Run the Linux Terminal
- Download, extract, and place arduino-cli in
/usr/bin/
- Setup arduino-cli
arudino-cli core update-index
arduino-cli core install arduino:avr
arduino-cli lib search "<Library>"
arduino-cli lib install "<Whatever Libaries You Need>"
arduino-cli board list (Take note of your USB-Connected Arduino Board device name like /dev/ttyUSB0)
arduino-cli board listall
- Optional: Install minicom (for serial monitoring)
sudo apt-get install minicom
- Download, extract, and run bin/idea.sh for IntelliJ Community Edition
- https://www.jetbrains.com/idea/download/#section=linux
- Create shortcut to IntelliJ using the IntelliJ Tools -> Create Desktop Entry menu
- Optional: Install the Serial Port Monitor IntelliJ Plugin
- Do a git checkout for your arduino ino project or start a new project with an .ino file
- Create an IntelliJ Run ‘Shell Script’ Configuration
- Create a compileAndUpload.sh script:
sudo killall minicom
arduino-cli compile -b arduino:avr:nano
arduino-cli upload -p /dev/ttyUSB0 -b arduino:avr:nano
minicom -D /dev/ttyUSB0 -b 9600
- You can use minicom, putty, or the IntelliJ Serial Port Monitor Plugin to connect to your Arduino board to issue commands or watch logs
- Create a compileAndUpload.sh script:
Other help tricks:
- After you get Linux setup the way you want on ChromeOS, be sure to run ‘Backup Linux apps and files’ so you don’t have to go through all of the setup steps again if you get a new Chromebook or need to reset your system.
- Intellij’s Git client is quite nice since Git GUIs are limited on Chromebooks
- You can install git on the Linux terminal cli if you prefer
- You can install other gnome Linux software with these commands
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install gnome-software gnome-packagekit
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install openjdk-11-jdk
Now I’m curious to see what you develop for your Arduino. I also feel validated to know I’m using your preferred IDE. Thanks for this write-up.