And by Linux, I mean my own Ubuntu Desktop 18.04 LTS workstation. I barely understand how it works. Consider this a diary entry by a neophyte embedded experimenter.
The hardware used was a Lolin/WeMos D1 Mini compatible development board manufactured by ACEIRMC. It is based on the ESP-12F (ESP-8266MOD) SoC and the CH340G USB to UART interface. Order here on Amazon (listing is for a package of 5 boards and an assortment of pins). These boards have 4 MB (that's MegaBytes, not GigaBytes) of programmable memory, so they are definitely more challenging to work with than "higher-end" Beagles or the Raspberry Pi. But they are small, low power, controllers that can fit in places those other boards can't -- and they are avaiable now, at or below the original MSRP (unlike every Raspberry Pi model I've seen in the last few years).
- Download from https://www.arduino.cc/en/software to your computer. I chose the binary tarball for 64-bit Linux.
- Extract and copy to ~/.local/arduino,
tar xJf arduino*xz; mv arduino*9 ~/.local/arduino
. - Change into that directory and run
./install.sh
. Ignore the errors. - Symlink the arduino binary to ~/.local/bin,
ln -s ~/.local/arduino/arduino ~/.local/bin/arduino
. - Once again in the .local/arduino directory, run
./arduino-linux-setup.sh
, and follow the prompts. Reboot.
That last command will add the user to the dialout, tty, uucp and plugdev groups, and set up device rules, so they will will have permission to connect with the device using the IDE.
Connect the D1 Mini to your computer using a USB cable (the D1 Mini has a female USB Micro connector).
- Launch the IDE using the desktop icon.
- Go to File... Preferences and set Sketchbook location (mine is "/home/myuser/Projects/Arduino").
- Add ESP8266 Board Manager by entering this url in Additional Boars Manager URLs: https://arduino.esp8266.com/stable/package_esp8266com_index.json
- Select Tools... Board... Boards Manager, search for ESP8266 and Install.
- Then select Tools... Board... ESP8266 Boards... LOLIN(WEMOS) D1 R2 & mini.
- Select Tools... Port... /dev/ttyUSB0 (or the serial device your device is connected to).
Test the IDE by connecting a D1 Mini board to the computer using a USB cable (the D1 Mini has a female USB micro connector) and upload a sketch.
- Re-launch the IDE.
- Select File... Examples... Built-in Examples... 91-Basics... Blink.
- Click the Upload button (the second round button from the left, with a right-facing arrow).
The sketch will be uploaded and the board's status light should start blinking.