Esp32-c3 super mini - probleme compilation

Bonjour

Lorsque je telecharge ce sketch sur une carte Arduino uno la compilation se déroule bien
Mais lorsque j'essaye de le compiler en choisissant la carte ESP32-C3 super mini j'ai cette erreur de compilation

/Users/abc/Documents/Arduino/libraries/SoftwareSerial/SoftwareSerial.cpp:41:10: fatal error: avr/interrupt.h: No such file or directory
41 | #include <avr/interrupt.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

Voici le sketch :


#include <SoftwareSerial.h> 

 
char inchar; // Will hold the incoming character from the GSM shield
 #include <SoftwareSerial.h>

SoftwareSerial mySerial(7,8); // 7=TX 8=RX

void setup()
{
  mySerial.begin(9600);   // Setting the baud rate of GSM Module  
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
  delay(100);

 // if (Serial.available()>0)
 // {
      mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
     delay(1000);  // Delay of 1 second
     mySerial.println("AT+CMGS=\"+32474611688\"\r"); // Replace x with mobile number
     delay(1000);
     mySerial.println("Technolab creation");// The SMS text you want to send
     delay(100);
     mySerial.println((char)26);// ASCII code of CTRL+Z for saying the end of sms to  the module 
      //                delay(5000);
  }

  void loop()
  {
}

Bonsoir

Normal, la bibliothèque SofwareSerial que tu cherches à utiliser n'est pas compatible avec ta carte, elle fait appel à une spécificité des micro-controlleurs AVR

fatal error: avr/interrupt.h

ah ok .. merci

Cette bibliotheque fonctionne peur être

remarque : les ESP32-C3 ayant deux UARTS ça offre 3 ports série disponibles en comptant l'USB,
le recours à un port série logiciel se justifie rarement

Merci mais ça ira .. je prendrai une carte de la série AVR

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.