Two days ago I just updated Arduino IDE to version 2.3.5. There are some things that are disappointing, namely:
There are several Sketches that previously worked on version 2.3.4 now do not work on version 2.3.5.
I cannot open several different sketch files at one time. The file that is currently open is always opened, even though I want to compare between 2 different sketches
Why does this happen? Please immediately report it to the developer who made the update.
PS : Please, how can I go back to the previous version of the IDE?
What do these sketches have in common?
Did you only update the IDE or did you also update one or more board packages (especially "dangerous" for ESP32).
This bug has already been fixed, but the fix was made after the time of the 2.3.5 release. Until the 2.3.6 release comes out, the fix will only be available when using the nightly build of Arduino IDE. If you like, you can get the nightly build from the download links here:
As I mentioned above, the bug with opening additional sketches has already been reported and resolved.
As for the "Sketches that previously worked on version 2.3.4 now do not work on version 2.3.5." bug, it would be impossible to address based on so little information. If you can provide more information then I will be happy to perform an investigation into the matter.
I got it too. Windows 10. Clicking 2 times on any .ino archive on its directory reopens the last opened sketch. Doing it multiple times with different archives opens multiple copies of the same skecth.
/*====================================================================
MENGIRIM PESAN EMAIL DARI MODUL ESPX
Pada praktikum ini belum digunakan sensor
Email otomatis terkirim setelah upload atau setelah tombol EN ditekan
----------------------------------------------------------------------
Catatan : Pengiriman email belum ditrigger oleh Sensor
====================================================================*/
String teksPesan; //variabel menyimpan pesan email
#if defined(ESP32) //deteksi modul ESPx yang digunakan
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
//--------------------------------------------------------------------
/* Pendefinisian nama SSID dan Password dari WiFi yang tersedia */
#define WIFI_SSID "WIFI-C545A5DC" //nama SSID dari WiFi yg tersedia
#define WIFI_PASSWORD "batukali" //password akses WiFi
/* Definisi Nama Akun dan Password email di GMAIL */
#define AUTHOR_EMAIL "my_account@gmail.com" //nama akun email
#define AUTHOR_PASSWORD "xxxx xxxx xxxx xxxx" //password 16 karakter
#include <ESP_Mail_Client.h> //deklarasi library untuk client email
/* Pendefinisian Nama Host SMTP, penulisan menggunakan GMAIL */
#define SMTP_HOST "smtp.gmail.com"
#define SMTP_PORT 465
/* deklarasi nama objek Session SMTP utk pengiriman email */
SMTPSession smtp;
/*==================================================================*/
void send_Email() {
ESP_Mail_Session session;//deklarasi "session"
/* Kumpulan sessi konfigurasi */
session.login.email = AUTHOR_EMAIL;
session.login.password = AUTHOR_PASSWORD;
session.server.host_name = SMTP_HOST;
session.server.port = SMTP_PORT;
//session.login.user_domain = "";
//--------------------------------------------------------------------
SMTP_Message message; //deklarasi class "message" untuk Header
/* ------------------ Kumpulan header message --------------------*/
message.sender.name = F("ESP Mail"); //deklarasi nama pengirim
message.sender.email = AUTHOR_EMAIL; //akun email
message.subject = F("Pembangkit #1"); //deklarasi judul subjek email
message.addRecipient(F("Rudi_Ops-1"), F("SENDER_EMAIL@gmail.com"));
// ------------------
message.text.content = teksPesan; //pesan teks di dalam email
message.text.charSet = F("us-ascii"); //setting us-ascii
message.text.transfer_encoding = Content_Transfer_Encoding::enc_7bit;
/*Send HTML message*/
//String htmlMsg = "<div style=\"color:red;\"><h1>Warning : Area B </h1><p>- dikirim dari Pembangkit #1 </p></div>";
//message.html.transfer_encoding=Content_Transfer_Encoding::enc_7bit;
//message.text.charSet = "us-ascii";
//message.html.content = htmlMsg.c_str();
/* -Konek ke SMTP Server dg konfigurasi session yg sdh dilakukan -*/
if (!smtp.connect(&session)) return;
/* ------ Memulai kirim email dan tutup session ------*/
if (!MailClient.sendMail(&smtp, &message))
Serial.println("Error sending Email, " + smtp.errorReason());
ESP_MAIL_PRINTF("Free Heap: %d\n", MailClient.getFreeHeap());
}
/*==================================================================*/
void setup() {
Serial.begin(115200);
/* --------------- Koneksi ke jaringan WiFi lokal ----------------*/
Serial.print("Koneksi ke Akses Point WiFi");
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while(WiFi.status() != WL_CONNECTED) {
Serial.print("."); //waiting connection
delay(300);
}
Serial.println("WiFi terkoneksi."); Serial.print("Alamat IP : ");
Serial.println(WiFi.localIP()); Serial.println("-------------");
smtp.debug(1); //untuk menampilkan proses pengiriman email
}
/*==================================================================*/
void loop() {
teksPesan="Warning : Objek terdeteksi di area B"; //set pesan email
send_Email(); //kirim email dengan pesan yg sdh diset
WiFi.disconnect(); //hentikan pengiriman email, hanya 1x kirim
while(1);
}
In the sketch above, the error that occurs is unable to connect to WiFi. Before I updated the IDE to version 2.3.5, the program ran as expected. Strangely, I copy-pasted the sketch above and saved it with a different name, the sketch ran normally again.
I think @Brazilino already explained it, but just in case it wasn't clear I'll provide instructions you can follow to reproduce the fault:
Start Arduino IDE.
Open a sketch via the Arduino IDE GUI.
I'll refer to this sketch as "sketch X".
Now open a different sketch either via file association, or if you don't have .ino files associated with Arduino IDE 2.3.5 then you can open the sketch by invoking Arduino IDE from the command line and the path of the sketch as a command line argument.
I'll refer to this sketch as "sketch Y".
After performing step 3, instead "sketch Y" opening in a new Arduino IDE window as expected, the new window contains "sketch x". So you now have "sketch x" open in two Arduino IDE windows.
The bug only affects opening additional sketches via file association or command line argument, so, as you pointed out, the workaround is to open sketches via the Arduino IDE GUI.
Just asking, is this a sketch that you sync using Arduino Cloud from the IDE?
Because sometimes kind of things like this happen to me
For example in your project if you have several files .cpp and .h, and you choose to rename one, then you have to manually delete the folder of the sync sketch, make a pull and then it will compile. Otherwise it tells you that some declarations have already been or whatever (really not enjoying this tho, is I can take this opportunity to submit a request to solve this at the same time)
This is just an example of some "bugs" that working on a sketch sync on Arduino Cloud could bring.
The incident of the sketch file not running (the process of connecting to local Wifi) occurred when I had just finished updating the IDE from 2.3.4 to 2.3.5.
And the incident of not being able to open a different sketch file via Window Explorer also occurred after I updated to IDE version 2.3.5