Préambule
Les vidéos de Tommy Desrochers:
- [[https://www.youtube.com/watch?v=zqwnYuOLvsE|ESP32 #1]]
- [[https://www.youtube.com/watch?v=U4GaKrsXlPc|ESP32 #2]]
- [[https://www.youtube.com/watch?v=J557GmCArrc|ESP32 #3]]
- [[https://www.youtube.com/watch?v=DDMQbqPUliY|ESP32 #4]]
- [[https://www.youtube.com/watch?v=LkxCr_n3JOw|ESP32 #5]]
Installation
Install config sous Linux
Sous Debian 12, lors du 1er test, j'ai reçu ces deux messages d'erreur:
- Error Msg: ''ModuleNotFoundError: No module named 'serial'''
- Error msg: ''Failed uploading: no upload port provided''
On va donc, d'abord:
- ''# apt install python3-serial''
- ''# /sbin/usermod -aG dialout
'' + reboot
Suivi de l'installation proprement dite :
Téléchargement :
- Download Aduino IDE: [[https://www.arduino.cc/en/software]]
- Unzip : ''$ unzip -d arduino arduino[...]''
- Launch : ''$ cd arduino'', ''$ ./arduino-ide''
ou
- Télécharger AppImage et le chmod +x for all
Configuration pour ESP32 :
- Menu File -> Preferences -> Additional boards manager URLs: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Menu Tools -> Board -> Board Manager... -> search with ESP32, select de most recent version of ESP32 by Espressif Systems, and Install
- Menu Tools -> Board -> Esp32 -> ESP32 Dev Module
- Menu Tools -> Port -> /dev/ttyUSB0
Test
- Menu File -> example -> ESP32 -> ChipID -> GetChipID
- Upload: Menu Sketch -> Upload
- Menu Tools -> Serial Monitor
- Change to 115200 Baud
ESP32 Chip model = ESP32-D0WDQ6 Rev 101
This chip has 2 cores
Chip ID: 11493932
Stop language server
[[https://forum.arduino.cc/t/how-to-disable-language-server-in-arduino-ide-2-3-2/1291420/2]]
Serial Output
void setup() {
Serial.begin(115200);
while (!Serial) continue;
Serial.println("Ready.");
}
void loop() {
}
K2000
[26/09/2014]
Suite illogique des pins GPIO
GPIO-1 en OUTPUT -> conflit avec sortie serial
#include <math.h>
const float pi = 3.14159;
const int ledPin[7] = {5,18,19,21,3,22,23};
void setup() {
for (int i=0; i<7; i++) {
pinMode (ledPin[i], OUTPUT);
}
}
void loop() {
for (float ang=-pi; ang<pi; ang=ang+(2*pi/700)) {
int led = (1+std::sin(ang))*7/2;
digitalWrite (ledPin[led], HIGH);
delay(1);
digitalWrite (ledPin[led], LOW);
}
}