User Tools

Site Tools


esp32

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
esp32 [2024/09/22 14:05] – created brunoesp32 [2025/03/06 20:28] (current) bruno
Line 1: Line 1:
-=== ESP32 ===+==== Préambule ====
  
-== Les vidéos de Tommy Desrochers ==+Les vidéos de Tommy Desrochers:
  
   * [[https://www.youtube.com/watch?v=zqwnYuOLvsE|ESP32 #1]]   * [[https://www.youtube.com/watch?v=zqwnYuOLvsE|ESP32 #1]]
Line 9: Line 9:
   * [[https://www.youtube.com/watch?v=LkxCr_n3JOw|ESP32 #5]]   * [[https://www.youtube.com/watch?v=LkxCr_n3JOw|ESP32 #5]]
  
-== Install config sous Linux ==+==== 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 <USER>'' + reboot 
 + 
 +Suivi de l'installation proprement dite :
  
-  * [[https://whadda.com/fr/produit/carte-de-developpement-esp32-wpb109/|Hardware : Whadda ESP32 Development Board]] 
   * Download Aduino IDE: [[https://www.arduino.cc/en/software]]   * Download Aduino IDE: [[https://www.arduino.cc/en/software]]
   * Unzip : ''$ unzip arduino[...]''   * Unzip : ''$ unzip arduino[...]''
Line 20: Line 34:
   * Menu Tools -> Port -> /dev/ttyUSB0   * Menu Tools -> Port -> /dev/ttyUSB0
  
-== Test1 ==+==== Test ====
  
   *  Menu File -> example -> ESP32 -> ChipID -> GetChipID   *  Menu File -> example -> ESP32 -> ChipID -> GetChipID
   * Upload: Menu Sketch -> Upload   * Upload: Menu Sketch -> Upload
-  * Error Msg: ''ModuleNotFoundError: No module named 'serial''' => ''# apt install python3-serial'' 
-  * Error msg: ''Failed uploading: no upload port provided'' => ''# /sbin/usermod -aG dialout <USER>'' + reboot 
   * Menu Tools -> Serial Monitor   * Menu Tools -> Serial Monitor
   * Change to 115200 Baud   * Change to 115200 Baud
Line 35: Line 47:
 </code> </code>
  
-  * [[https://gist.github.com/plembo/37e0d4c3cabaead6a150e61d6a8c3035]]+==== Serial Output ==== 
 + 
 +<code c> 
 +void setup() {  
 +  Serial.begin(115200); 
 +  while (!Serial) continue; 
 +  Serial.println("Ready."); 
 +}  
 +void loop() {  
 +
 +</code> 
 + 
 +==== K2000 ==== 
 +[26/09/2014] 
 + 
 +Suite illogique des pins GPIO 
 + 
 +GPIO-1 en OUTPUT -> conflit avec sortie serial 
 +<code c> 
 +#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); 
 +  } 
 +
 +</code> 
  
esp32.1727013909.txt.gz · Last modified: 2024/09/22 14:05 by bruno