Look at https://www.arduino.cc/en/guide/linux
tar -xvf arduino-1.8.15-linux64.tar.xz
cd arduino-1.8.15/
sudo ./install.sh
Adding ESP32 boards
- Add https://dl.espressif.com/dl/package\_esp32\_index.json to additional board manager URLs
- Install esp32 by Expressif Systems by going to
Tools>Boards>Boards Manager
Open CombinedOpt.ino - Atmega Code. This has no external libraries and should compile with no issues.
- WebSockets by Markus Sattler (https://github.com/Links2004/arduinoWebSockets)
- Adafruit SSD1306 libary. This also installs the dependent libraries. (https://github.com/stblassitude/Adafruit_SSD1306_Wemos_OLED)
- Adafruit GFX
- Adafruit Bus IO
Issue with compiling for ESP32 on Ubuntu. pyserial: module not found
.
sudo apt install python-is-python3
sudo apt install python3-pip
pip install pyserial
Serial port permissions
ls -l /dev/ttyUSB0
sudo usermod -a -G dialout <username>
Then log out and log in
- Plug in your ESP32, select the correct COM PORT and select the board as
DOIT ESP32 DEVKIT V1
WARNING : This is designed to work alongside ATmega328P programmed with CombinedOpt.ino
-
Connect your laptop to a Wi-Fi network.
-
Run
ipconfig
(orifconfig
) on the command prompt and get your laptop's IP address -
Update the following lines of esp32-websocket.ino with your WiFI SSID, password and IP address.
const char* ssid = "wifi"; // update wifi SSID const char* password = "pSW"; // enter password const char* ip = "192.168.1.8"; // enter the IP address
-
Program esp32-websocket.ino to ESP32. Select the board eg:
DOIT ESP32 DEVKIT V1
(shown below). Select the port eg: COM4.
@TODO