Page 2 sur 4

Re: Montages ESP32 S3 WROOM

Posté : 24 juil. 2026, 08:59
par likiki
:PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg:

Re: Montages ESP32 S3 WROOM

Posté : 24 juil. 2026, 11:31
par patrice_b
Beau travail, ca me laisse rêveur.
:bienv: :bienv:

Re: Montages ESP32 S3 WROOM

Posté : 27 juil. 2026, 21:00
par Clem68
J'ai bidouillé un support pour adapter sur le breadboard
supesp2.jpg
@+

Re: Montages ESP32 S3 WROOM

Posté : 27 juil. 2026, 21:03
par likiki
Voilà une chose qui est bonne. :bienv: :bienv:

Re: Montages ESP32 S3 WROOM

Posté : 27 juil. 2026, 21:15
par C2Vues-BricoTrain
:bienv: :bienv:

Une façon pour ne pas se faire "shield" avec un support...

:hhhaaaa: :hhhaaaa: :hhhaaaa:

Re: Montages ESP32 S3 WROOM

Posté : 28 juil. 2026, 11:51
par Clem68
Une façon pour ne pas se faire "shield" avec un support
Ce n'est pas bien de copier sur Patrick :hhhaaaa: :hhhaaaa:

Bon, j'ai revisité mon support ce n'était pas top. Donc j'ai enlevé les 2 " barrettes du milieu "

Avant:
supesp2.jpg
Après:
supesp3.jpg
@+

Re: Montages ESP32 S3 WROOM

Posté : 28 juil. 2026, 14:04
par likiki
Ha oui, c'est mieux comme ça (puisque tu le dit).

:tire langue

Re: Montages ESP32 S3 WROOM

Posté : 28 juil. 2026, 22:19
par Clem68
En fin de compte après différents essais je reviens à la base, je suivrai le tuto. Sur Fritzing il manque toujours quelque chose, du moins en ce qui concerne l'extension. Et on ne peut pas modifier le bredboard.

Exercice n°2: Allumage d'une led par appui sur un bouton:

Le tuto: https://docs.freenove.com/projects/fnk0 ... 6_LED.html
ex2.1.jpg
Sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : ButtonAndLed
  Description : Control led by button.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
#define PIN_LED    2
#define PIN_BUTTON 13
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin PIN_LED as an output.
  pinMode(PIN_LED, OUTPUT);
  pinMode(PIN_BUTTON, INPUT);
}

// the loop function runs over and over again forever
void loop() {
  if (digitalRead(PIN_BUTTON) == LOW) {
    digitalWrite(PIN_LED,HIGH);
  }else{
    digitalWrite(PIN_LED,LOW);
  }
}


@+

Re: Montages ESP32 S3 WROOM

Posté : 29 juil. 2026, 06:41
par likiki
:PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg:

Re: Montages ESP32 S3 WROOM

Posté : 29 juil. 2026, 07:21
par bunny94
:bienv: :bienv:

Re: Montages ESP32 S3 WROOM

Posté : 29 juil. 2026, 18:19
par Clem68
:merciiii: à vous!

Exercice 2.1: Allumage d'une led par bouton poussoir avec une fonction d'interrupteur

Le câblage est identique à l'exercice précédent, juste le Sketch qui change

Le tuto: https://docs.freenove.com/projects/fnk0 ... 6_LED.html

Sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : TableLamp
  Description : Control led by button.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
#define PIN_LED    2
#define PIN_BUTTON 13
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin PIN_LED as an output.
  pinMode(PIN_LED, OUTPUT);
  pinMode(PIN_BUTTON, INPUT);
}

// the loop function runs over and over again forever
void loop() {
  if (digitalRead(PIN_BUTTON) == LOW) {
    delay(20);
    if (digitalRead(PIN_BUTTON) == LOW) {
      reverseGPIO(PIN_LED);
    }
    while (digitalRead(PIN_BUTTON) == LOW);
    delay(20);
    //while (digitalRead(PIN_BUTTON) == LOW);
  }
}

void reverseGPIO(int pin) {
  digitalWrite(pin, !digitalRead(pin));
}



@+

Re: Montages ESP32 S3 WROOM

Posté : 30 juil. 2026, 17:22
par Clem68
Exercice N°3: Allumage d'une barre à led ( chenillard pour certains... )
ex03.1.jpg
10 résistances de 220 Ohms
ex03.jpg
Le tuto: https://docs.freenove.com/projects/fnk0 ... D_Bar.html

Le sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : FlowingLight
  Description : Using ledbar to demonstrate flowing lamp.
  Auther      : www.freenove.com
  Modification: 2022/10/20
**********************************************************************/
byte ledPins[] = {21, 47, 48, 38, 39, 40, 41, 42, 2, 1};
int ledCounts;

void setup() {
  ledCounts = sizeof(ledPins);
  for (int i = 0; i < ledCounts; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  for (int i = 0; i < ledCounts; i++) {
    digitalWrite(ledPins[i], HIGH);
    delay(100);
    digitalWrite(ledPins[i], LOW);
  }
  for (int i = ledCounts - 1; i > -1; i--) {
    digitalWrite(ledPins[i], HIGH);
    delay(100);
    digitalWrite(ledPins[i], LOW);
  }
}


@+

Re: Montages ESP32 S3 WROOM

Posté : 30 juil. 2026, 20:47
par likiki
:PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg:

Il me semble qu'il y a une led qui ne fonctionne pas.

Re: Montages ESP32 S3 WROOM

Posté : 30 juil. 2026, 23:38
par Clem68
En effet, je m'en suis aperçu une fois publiée sur Youtube.

J'ai refait le montage en coupant les pattes des résistances, ce qui est plus propre et supprime les mauvais contacts.

Revoir la vidéo ci-dessus :merciiii:

@+

Re: Montages ESP32 S3 WROOM

Posté : 31 juil. 2026, 07:42
par likiki
:yess: :yess: :yess:


:PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg:

Re: Montages ESP32 S3 WROOM

Posté : 05 août 2026, 21:44
par Clem68
Pour ceux qui veulent suivre les explications en Français j'ai joint le 1er fichier. Le tuto complet comprend 4 fichiers.
C'est plus simple que d'avoir recours au navigateur
C_Tutorial-1-150-1.pdf
@+

Re: Montages ESP32 S3 WROOM

Posté : 06 août 2026, 15:36
par Clem68
Exercice n°4: Allumage et extinction d'une led progressivement
Ex4 1.jpg
1 résistance de 220 Ohms
Ex4 2.jpg
Le sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : BreathingLight
  Description : Make led light fade in and out, just like breathing.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
#define PIN_LED   2     //define the led pin
#define CHN       0     //define the pwm channel
#define FRQ       1000  //define the pwm frequency
#define PWM_BIT   8     //define the pwm precision
void setup() {
  ledcAttachChannel(PIN_LED, FRQ, PWM_BIT, CHN);  //attach the led pin to pwm channel
}

void loop() {
  for (int i = 0; i < 255; i++) { //make light fade in
    ledcWrite(PIN_LED, i);
    delay(10);
  }
  for (int i = 255; i > -1; i--) {  //make light fade out
    ledcWrite(PIN_LED, i);
    delay(10);
  }
}


@+

Re: Montages ESP32 S3 WROOM

Posté : 07 août 2026, 08:39
par Clem68
Exercice N° 4.1

8 résistances de 220 Ohm

C'est une variante du chenillard précédent avec seulement 8 leds. Éclairage plus fluide.
ex 4.1 1.jpg
Le sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : FlowingLight2
  Description : More cool flowing light.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
const byte ledPins[] = {21, 47, 38, 39, 40, 41, 42, 2};    //define led pins
const byte chns[] = {0, 1, 2, 3, 4, 5, 6, 7};             //define the pwm channels
const int dutys[] = {0, 0, 0, 0, 0, 0, 0, 0, 
                     1023, 512, 256, 128, 64, 32, 16, 8,
                     0, 0, 0, 0, 0, 0, 0, 0
                    };      //define the pwm dutys
int ledCounts;    
int delayTimes = 50;  //flowing speed ,the smaller, the faster
void setup() {
  ledCounts = sizeof(ledPins);    //get the led counts
  for (int i = 0; i < ledCounts; i++) {   //setup the pwm channels
    ledcAttachChannel(ledPins[i], 1000, 10, chns[i]);
  }
}

void loop() {
  for (int i = 0; i < 16; i++) {        //flowing one side to other side
    for (int j = 0; j < ledCounts; j++) {
      ledcWrite(ledPins[j], dutys[i + j]);
    }
    delay(delayTimes);
  }
  for (int i = 0; i < 16; i++) {      //flowing one side to other side
    for (int j = ledCounts - 1; j > -1; j--) {
      ledcWrite(ledPins[j], dutys[i + (ledCounts - 1 - j)]);
    }
    delay(delayTimes);
  }
}


@+

Re: Montages ESP32 S3 WROOM

Posté : 07 août 2026, 08:52
par likiki
:PetitPoucejpg: :PetitPoucejpg: :PetitPoucejpg:

Re: Montages ESP32 S3 WROOM

Posté : 08 août 2026, 19:06
par Clem68
:merciiii:

Exercice n°5


Allumage de 3 couleurs avec une led rgb
ex 5.jpg
Le sketch:

Code : Tout sélectionner

const byte ledPins[] = {38, 39, 40};    //define red, green, blue led pins
const byte chns[] = {0, 1, 2};        //define the pwm channels
int red, green, blue;
void setup() {
  for (int i = 0; i < 3; i++) {   //setup the pwm channels,1KHz,8bit
    ledcAttachChannel(ledPins[i], 1000, 8, chns[i]);
  }
}

void loop() {
  red = random(0, 256);
  green = random(0, 256);
  blue = random(0, 256);
  setColor(red, green, blue);
  delay(200);
}

void setColor(byte r, byte g, byte b) {
  ledcWrite(ledPins[0], 255 - r); //Common anode LED, low level to turn on the led.
  ledcWrite(ledPins[1], 255 - g);
  ledcWrite(ledPins[2], 255 - b);
}



@+

Re: Montages ESP32 S3 WROOM

Posté : 08 août 2026, 19:13
par likiki
:bienv: :bienv: :bienv:

Re: Montages ESP32 S3 WROOM

Posté : 08 août 2026, 21:38
par Clem68
:merciiii: !

Exercice 5.1

Le câblage est le même que précédemment, juste la luminosité qui est plus agréable. Bon, les leds en vidéo, ce n'est pas terrible.
L'insertion des résistances dans le breadbord est une vrai galère. J'ai soudé les résistances sur des pin(s).

Le sketch:

Code : Tout sélectionner

const byte ledPins[] = {38, 39, 40};    //define led pins
const byte chns[] = {0, 1, 2};        //define the pwm channels

void setup() {
  for (int i = 0; i < 3; i++) {   //setup the pwm channels
    ledcAttachChannel(ledPins[i], 1000, 8, chns[i]);
  }
}

void loop() {
  for (int i = 0; i < 256; i++) {
    setColor(wheel(i));
    delay(20);
  }
}

void setColor(long rgb) {
  ledcWrite(ledPins[0], 255 - (rgb >> 16) & 0xFF);
  ledcWrite(ledPins[1], 255 - (rgb >> 8) & 0xFF);
  ledcWrite(ledPins[2], 255 - (rgb >> 0) & 0xFF);
}

long wheel(int pos) {
  long WheelPos = pos % 0xff;
  if (WheelPos < 85) {
    return ((255 - WheelPos * 3) << 16) | ((WheelPos * 3) << 8);
  } else if (WheelPos < 170) {
    WheelPos -= 85;
    return (((255 - WheelPos * 3) << 8) | (WheelPos * 3));
  } else {
    WheelPos -= 170;
    return ((WheelPos * 3) << 16 | (255 - WheelPos * 3));
  }
}



@+

Re: Montages ESP32 S3 WROOM

Posté : 09 août 2026, 23:17
par Clem68
Exercice N° 6

Clignotement LEDPixel rouge, vert, bleu, blanc
ex 6.jpg
Le sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : NeoPixel
  Description : Basic usage of LEDPixel, 
                Make the strip light up in different colors gradually.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
#include "Freenove_WS2812_Lib_for_ESP32.h"

#define LEDS_COUNT  8  // The number of led
#define LEDS_PIN	  48  // define the pin connected to the Freenove 8 led strip
#define CHANNEL		  0  // RMT module channel

Freenove_ESP32_WS2812 strip = Freenove_ESP32_WS2812(LEDS_COUNT, LEDS_PIN, CHANNEL, TYPE_GRB);

int m_color[5][3] = { {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 255}, {0, 0, 0} };
int delayval = 100;

void setup() {
	strip.begin();
	strip.setBrightness(10);	
}
void loop() {
	for (int j = 0; j < 5; j++) {
		for (int i = 0; i < LEDS_COUNT; i++) {
			strip.setLedColorData(i, m_color[j][0], m_color[j][1], m_color[j][2]);// Set color data.
			strip.show();   // Send color data to LED, and display.
			delay(delayval);// Interval time of each LED.
		}
		delay(500);       // Interval time of each group of colors.
	}
}


@+

Re: Montages ESP32 S3 WROOM

Posté : 10 août 2026, 07:54
par likiki
:bienv: :bienv: :bienv: :bienv:

Re: Montages ESP32 S3 WROOM

Posté : 10 août 2026, 22:02
par Clem68
:merciiii:

Exemple 6.2

Façon Arc en ciel

Le sketch:

Code : Tout sélectionner

/**********************************************************************
  Filename    : RainbowLight
  Description : Make the strip light up in rainbow colors.
  Auther      : www.freenove.com
  Modification: 2024/06/18
**********************************************************************/
#include "Freenove_WS2812_Lib_for_ESP32.h"

#define LEDS_COUNT  8
#define LEDS_PIN	48
#define CHANNEL		0

Freenove_ESP32_WS2812 strip = Freenove_ESP32_WS2812(LEDS_COUNT, LEDS_PIN, CHANNEL, TYPE_GRB);

void setup() {
  strip.begin();
}

void loop() {
  for (int j = 0; j < 255; j += 2) {
    for (int i = 0; i < LEDS_COUNT; i++) {
      strip.setLedColorData(i, strip.Wheel((i * 256 / LEDS_COUNT + j) & 255));
    }
    strip.show();
    delay(5);
  }  
}


@+