Arduino ide linux как установить
Перейти к содержимому

Arduino ide linux как установить

  • автор:

Arduino ide linux как установить

To check if you have Java installed, open a terminal and enter the command: java

Checking Java Installation

If you see the above message, you do not have Java installed and you will need to install it. To install the Java package, enter the command: sudo apt-get install default.jre

Installing the Java Runtime Environment

You may be prompted to enter your user password.

Get the latest Arduino IDE.

  1. On the USB key: downloads → Linux → edison_media
  2. Based on your Linux operating system (32 bit or 64 bit), copy arduino-[version]-linux32.tar.xz or arduino-[version]-linux64.tar.xz to your computer.

Navigate to the folder where you copied the Arduino IDE .txz file and double-click it to open the archive.

You can decompress the file from the command line. To do so, use xz by entering the following command: unxz arduino-1.6.5-linux64.txz

If you don’t have xz installed, install it by entering one of the following commands:
* For Ubuntu or other Debian-based machines: sudo apt-get install xz-utils
* For Red Hat, Fedora, CentOS, or similar machines: sudo yum install xz

Click Extract and navigate to the directory where you would like to unzip the Arduino IDE. In this example, we will leave it in the Download directory. Click Extract.

The extracted folder should contain a file named arduino, as well as several folders.

Extracted Arduino IDE

Open up a new Terminal window.

Navigate to the Arduino IDE folder. In in this example, the command will be cd Downloads/arduino-x.x.x/ , where x.x.x is the Arduino IDE version number you downloaded. Note: When you start typing in cd Downloads/arduino, you can press Tab to auto-complete the folder path.

Downloads Directory

To run Arduino with administrator privileges, enter the command: sudo ./arduino . If prompted, enter your password.

Arduino IDE on Linux

The Arduino IDE opens.

In a serial communication window, check the availability of /ttyACM port by entering the following command: ls /dev/ttyACM*

Note: If the /ttyACM* port is not available, here are several reasons why:

The modem manager is using the port. When the port becomes active, the modem manager can claim the port, blocking the IDE’s access to the port. The exact command to remove it will depend on your Linux distribution. For example, the command sudo apt-get remove modemmanager may work.

The /ttyACM port was not created automatically when you plugged in your board. To add the port, do the following:

  • Create a file: etc/udev/rules.d/50-arduino.rules
  • Add the following to the file: KERNEL==»ttyACM[0-9]*», MODE=»0666″

Restart udev by entering the following command: sudo service udev restart
If you are using a virtual machine (VM), you may need to reboot Linux within the VM.

To save on internet bandwidth, install the “Intel i686 Boards” toolchain manually to your Arduino IDE installation.

  1. On the USB key: downloads → Linux → edison_media
  2. Copy IntelArduinoToolChain_linux.gz to your computer and unarchive it.
  3. Copy the uncompressed Intel folder and its contents to /home/[YOUR_USER_NAME]/.arduino15/packages on your computer.

Restart the Arduino IDE.

When you are using a more reliable internet connection, you can use the method below to update the Arduino boards list:

Choose Tools > Board > Boards Manager to open the Boards Manager.

Boards Manager - Windows

In the list of boards, select Intel i686 Boards which includes the Intel® Edison board.

Как установить Arduino IDE на linux

На данный момент у меня стоит Linux 20.04 и Arduino IDE у меня получилось поставить только версии 1.8.15 — почему? — расскажу далее.

Мои неудачные попытки установки Arduino IDE на linux

На официальном сайте https://www.arduino.cc/en/software имеется дистрибутив. Всё отлично, скачал его, распаковал. Но вот беда: исполнительный фаил не открывается.
Начал разбираться — совет был переустановить Java JDK — но ходил по кругу, т.к. Java JDK у меня устанавливается с ошибкой.

Хорошо, следующая мысль — надо обновить Linux до версии 21.XX или даже 22.XX — нашел «Мурзилку» по обновлению, сделал все подготовительные операции: судо апэтэ апдейт, апргрейд и т.п., но смутила фраза «сделать бекап» . Читаю комменты — у многих ничего не получилось — и такой вариант меня вообще не устраивает.

Теперь пришла мысль: так, линукс версия у меня старая, почему бы не поставить старую версию Arduino IDE?

Как я поставил Arduino IDE на linux

Выполняем все подготовительные операции Апдейт и Апгрейд:
sudo apt update && sudo apt upgrade

Скачиваем пакет с Arduino IDE версии 1.8.15:
wget https://downloads.arduino.cc/arduino-1.8.15-linux64.tar.xz

Находим наш скачанный архив и распаковываем его:
Тут я действовал просто: правой кнопкой мыши — распаковать «тут»

Проваливаемся в распакованные папки:
arduino-1.8.15-linux64 / arduino-1.8.15 / install.sh

Видим фаил install.sh но не торопимся его кликать. Несколько попыток прокликать его не увенчались успехом — в левом верхнем углу крутилось колесико «Загрузка» несколько секунд, затем пропадало и просто ничего не происходило. Ну всё. накипело до предела. тут же (в этой же папке) открываю консоль (правой кнопкой / терминал) и ввожу команду
sudo ./install.sh

Заходим в «Приложения» — сразу заметил по последней странице, что что-то прибавилось, что-то тут новенькое появилось — ищу — да . вот она .

Name already in use

docs-content / content / software / ide-v2 / tutorials / getting-started / 01.ide-v2-downloading-and-installing / ide-v2-downloading-and-installing.md

  • Go to file T
  • Go to line L
  • Copy path
  • Copy permalink
  • Open with Desktop
  • View raw
  • Copy raw contents Copy raw contents

Copy raw contents

Copy raw contents

Downloading and Installing the Arduino IDE 2.0

In this tutorial, we will show how to download and install the Arduino IDE 2.0 on your Windows, Mac, or Linux computer.

You can easily download the editor from the Arduino Software page.

  • Windows — Win 10 and newer, 64 bits
  • Linux — 64 bits
  • Mac OS X — Version 10.14: «Mojave» or newer, 64 bits

The Arduino IDE 2.0

The Arduino IDE 2.0 is an open-source project. It is a big step from its sturdy predecessor, Arduino IDE 1.x, and comes with revamped UI, improved board & library manager, debugger, autocomplete feature and much more.

Download the Editor

Downloading the Arduino IDE 2.0 is done through the Arduino Software page. Here you will also find information on the other editors available to use.

To install the Arduino IDE 2.0 on a Windows computer, simply run the file downloaded from the software page.

Running the installation file.

Follow the instructions in the installation guide. The installation may take several minutes.

Instructions for installing the IDE 2.0

You can now use the Arduino IDE 2.0 on your Windows computer!

To install the Arduino IDE 2.0 on a macOS computer, simply copy the downloaded file into your application folder.

Installation on macOS.

You can now use the Arduino IDE 2.0 on your macOS computer!

To install the Arduino IDE 2.0 on Linux, first download the AppImage 64 bits (X86-64) from the Arduino Software page.

Before we can launch the editor, we need to first make it an executable file. This is done by:

  • right-click the file,
  • choose Properties,
  • select Permissions tab,
  • tick the Allow executing file as program box.

You can now double click the file to launch the Arduino IDE 2 on your Linux machine.

Install the Arduino IDE

To get us up and running with Arduino, we are going to install the Arduino IDE, a program that will help us write code for the Arduino, and run our code on the board.

What you’ll learn

  • How to install the Arduino package from a tarball
  • How to add a user to a group (here, the dialout group)

What you’ll need

  • Ubuntu 16.04 (and above) Desktop
  • An Arduino board, and included mini-USB cable
  • Some basic command-line knowledge (including how to use cd to change directories)

2. Installing via a tarball

We can download the latest version of the Arduino IDE from the Arduino website (here) as a tarball. A tarball is a type of compressed folder, like a .zip file, commonly used to distrubute software in Linux; its file extension is usually .tar.xz (or .tar.gz , if it uses Z compression. We’ll get to this later).

In order to extract the files we need from the tarball, we can open a terminal, cd to where the downloaded tarball is, then run

where FILENAME is the name of the download (typically arduino-(version number)-linux64.tar.xz).

The command can be read as * eXtract from an archive… * Verbosely (meaning it prints the name of every file it finds)… * from a file given by FILENAME .

When the command finishes, run ls again; tar should have created a new folder named arduino-(version number).

cd into the folder; there will be a file named install.sh in the folder. To install the IDE, execute install.sh with

If the script executes correctly and outputs done! at the end of its output, the IDE was installed correctly! Let’s try to launch it in the next step.

Installing via apt
While there is a package for the Arduino IDE on current APT repositories, it has not been updated for a while. As such, while it is still possible to install the IDE by running sudo apt install arduino , it is not recommended to do so, as asking for support when using outdated software is more difficult.

3. First Launch

Before launching the IDE, connect your Arduino board to your computer with a USB cable.

Arduino should be available in the (Unity menu?); if not, it can be launched from the command line by running arduino .

Permissions checker

The first time we launch Arduino, a window will pop up asking to add us to the dialout group:

Dialogue asking to add us to the dialout group

We will get back to what this means later, but for now just click on Add .

The editor

After that, we should see the IDE’s main editor window.

Editor

The IDE comes with example files that we can use to test if everything works. Let’s try open one such file: Under File > Examples > 01.Basics, choose Blink.

Try running the code on your Arduino by clicking Upload (the right arrow along the top).

We should get an error:

But if we try following the suggestion in the error above, the Serial Port menu is greyed out and can’t be entered.

Greyed out serial port menu

4. The dialout group

This is happening because the IDE doesn’t have sufficient permissions to access the Arduino device.

Permissions

We can look at the Arduino device by running

in a terminal. The output looks mostly like this:

The ‘0’ at the end of ‘ACM’ might be different, and multiple entries might be listed, but the parts we need to focus on are the string of letters and dashes in front, and the two names root and dialout .

The first name root is the owner of the device, and dialout is the owner group of the device.

The letters and dashes in front, starting after ‘c’, represent the permissions for the device by user: — The first triplet rw- mean that the owner ( root ) can read and write to this device — The second triplet rw- mean that members of the owner group ( dialout ) can read and write to this device — The third triplet — means that other users have no permissions at all (meaning that nobody else can read and write to the device)

In short, nobody except root and members of dialout can do anything with the Arduino; since we aren’t running the IDE as root or as a member of dialout , the IDE can’t access the Arduino due to insufficient permissions.

Adding yourself to the dialout group

But wait! Earlier, when we were launching the IDE, we did add ourselves to the dialout group!

Dialogue prompting to add user to the dialout group

So why does the IDE still not have permission to access the Arduino?

The changes that the prompt makes don’t apply until we log out and log back in again, so we have to save our work, log out, and log back in again.

After you log back in and launch the Arduino IDE, the Serial Port option should be available; change that, and we should be able to upload code to the Arduino.

Serial port option available

5. That’s all folks!

Congratulations, you made it!

You’ve just installed the Arduino IDE on your computer; you’ve also learned how permissions and groups work in Linux!

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *