Arduino

From XennisWiki
Jump to: navigation, search

Installation

Arch Linux

Install the Arduino IDE

pacman -S arduino arduino-avr-core

Add the user starting the IDE to the groups uucp and lock.

Debian

Using Snappy

snap install arduino

Add the user to dialout

usermod -a -G dialout <user>

Arduino CLI

see Arduino CLI

NodeMCU

Expressif ESP32 DevKitC V4

Further information: ESP32-DevKitC V4 Getting Started Guide

Install the board

  • File > Preferences
  • Add to the comma separated list Additional Boards Manager URLs the URL from the Arduino core for the ESP32
  • Next go to Tools > Boards > Boards Manager > search for esp32 and install esp32 by Expressif Systems

To select the board: Tools > Board > ESP32 Dev Module

Hello world

void setup() {
  Serial.begin(9600); 
  Serial.println("Hello World!");
}

void loop() {
}

Errors and problems

Arch Linux: NullPointerException onBoardOrPortChange on startup

Error message
java.lang.NullPointerException
	at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
	at processing.app.Base.onBoardOrPortChange(Base.java:1313)
	at processing.app.Base.<init>(Base.java:276)
	at processing.app.Base.main(Base.java:145)
Solution

Install the arduino-avr-core package.

ImportError: No module named serial

Error message
ImportError: No module named serial
Solution

Install the missing module via pip: pip install pyserial

See also

External links