Update:
I just tried to call up an example sketch, but it doesn't work. I see the example sketch on Accelstepper, but I can't call it. I then completely uninstalled and reinstalled the IDE and reinstalled accelstepper. I see the example sketches, but cannot access them. All other libraries that I reinstall work, such as Adafruit_VL6180x or PCF8574 library working fine. For all libraries related to AccelStepper, AccelStepper, AccelStepperWithDist. and FastAccelStepper I have the problem
DaveX
February 20, 2024, 11:30am
2
I have a problem pre-sketch: if I go to file/examples/accelstepper/bounce and click it, no sketch opens up.
That is a vague description. Maybe it is the same bug that @DaveX reported:
if I go to file/examples/accelstepper/bounce and click it, no sketch opens up.
I see there is a regression of this bug:
opened 09:58AM - 28 Sep 21 UTC
closed 11:58AM - 20 Feb 24 UTC
topic: code
type: imperfection
### Describe the problem
If the example for a library has `.pde` file extensi… on, Arduino IDE will silently fail to open it.
### To reproduce
1. Use Library Manager to install version "**1.1**" of the "**TimerOne**" library from Library Manager
1. Select **Examples > TimerOne > Interrupt**
🐛 The example doesn't open. There is no communication of a problem.
### Expected behavior
Arduino IDE opens all valid example sketches, regardless of whether they use a deprecated file extension.
### Arduino IDE version
2.0.0-beta.11
### Operating system
- macOS
- Windows
### Operating system version
- Windows 10
- macOS (not stated)
### Additional context
On the [Arduino forum](https://forum.arduino.cc/t/arduino-ide-2-0-beta-silently-fails-if-library-example-has-pde-extension/909565), user [in0](https://forum.arduino.cc/u/in0/summary) has reproduced the error on Windows and provides additional info:
> I can reproduce it. You can see the problem when run from the command line:
>
> ```
> root ERROR Request cloneExample failed with error: ENOENT: no such file or directory, rename 'c:\Users\<user name>\AppData\Local\Temp\.arduinoIDE-unsaved2021827-16716-11heo0w.vdua\Interrupt\Interrupt.pde' -> 'c:\Users\<user name>\AppData\Local\Temp\.arduinoIDE-unsaved2021827-16716-11heo0w.vdua\Interrupt\Interrupt.ino'
> ```
>
> It's trying to rename the sketch in the temporary folder rather than in its true path under the library installation.
>
> I don't have this problem with a standalone sketch using the .pde file extension.
#### Additional Reports
- https://forum.arduino.cc/t/why-some-library-examples-do-not-load-in-arduino-ide-2-0/1104079/1
- https://forum.arduino.cc/t/exmaple-not-loading/1069511
- https://forum.arduino.cc/t/in-version-2-0-0-i-cant-open-accelstepper-examples/1041358
- https://forum.arduino.cc/t/newping-librarys-example-code-wont-open/1036177
- https://forum.arduino.cc/t/ds3231-of-example-frome-custom-libraries-is-not-open/934173
- https://forum.arduino.cc/t/ide-wont-load-sketches/1112447
<a name="workaround"></a>
#### Workaround
Rename the example sketch to use the `.ino` file extension.
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
Thanks for bringing this to our attention!
I'll take care of reporting this to the Arduino IDE developers.
The workaround is:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences " dialog will open.
Take note of the path shown in the "Sketchbook location " field of the dialog.
Click the "CANCEL " button.
The "Preferences " dialog will close.
Select File > Open... from the Arduino IDE menus.
Navigate to the libraries subfolder of the path you saw in the "Sketchbook location " field during step (2) of these instructions.
You will see a list of the installation folders of each of the libraries you have installed. Scroll through the list until you find the library for which you want to open an example sketch.
Open the folder of the library and then the examples subfolder.
There you will see a list of the folders of each of the example sketches provided by the library. Open the folder of the example you want to open.
Select the .ino file in the folder.
Click the "Open " button.
The example sketch will now open in an Arduino IDE window as usual.
Surely you mean open the ".pde" file?
There is no .ino, that is the problem.
That is right. Thanks for the correction! I apologize for any confusion my error has caused.
DaveX
February 20, 2024, 12:39pm
6
Problem remains in 2.3.2.
The workaround works.
I renamed the AccelStepper Random example but not the Bounce Example:
/Users/drf/Documents/Arduino/libraries/AccelStepper/examples/Random/Random.ino
/Users/drf/Documents/Arduino/libraries/AccelStepper/examples/Bounce/Bounce.pde
...and the File/Examples/AccelStepper/Random does open, while the Bounce does not.
The bug is now tracked here:
opened 12:50PM - 20 Feb 24 UTC
topic: code
type: imperfection
### Describe the problem
If the example for a library has `.pde` file extensi… on, Arduino IDE will silently fail to open it.
### To reproduce
1. Use Library Manager to install version "**1.64.0**" of the "**AccelStepper**" library from Library Manager
1. Select **File > Examples > AccelStepper > AFMotor_ConstantSpeed**
🐛 The example doesn't open. There is no communication of a problem.
### Expected behavior
Arduino IDE opens all valid example sketches, regardless of whether they use a deprecated file extension.
### Arduino IDE version
2.3.2
### Operating system
Windows
### Operating system version
11
### Additional context
I see the following in the logs when I try to open the example:
```text
2024-02-20T12:47:15.376Z root ERROR Request cloneExample failed with error: ENOENT: no such file or directory, rename 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' -> 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' Error: ENOENT: no such file or directory, rename 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' -> 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino'
```
I bisected the regression to 074f65445728cb1950bfe1a01017c8227e43aba6 (does not occur with the build for the previous commit 3eef857b4843d33ca96d36f6e8cc2228f8e386ec)
---
This is a regression of https://github.com/arduino/arduino-ide/issues/518
---
Originally reported by @drf5n at:
https://forum.arduino.cc/t/accelstepper-problems-with-arduino-ide-2-3-1/1225842/10
<a name="workaround"></a>
#### Workaround
1. Select **File > Preferences...** (or **Arduino IDE > Settings...** for macOS users) from the Arduino IDE menus.
The "**Preferences**" dialog will open.
1. Take note of the path shown in the "**Sketchbook location**" field of the dialog.
1. Click the "**CANCEL**" button.
The "**Preferences**" dialog will close.
1. Select **File > Open...** from the Arduino IDE menus.
1. Navigate to the `libraries` subfolder of the path you saw in the "**Sketchbook location**" field during step (2) of these instructions.
1. You will see a list of the installation folders of each of the libraries you have installed. Scroll through the list until you find the library for which you want to open an example sketch.
1. Open the folder of the library and then the `examples` subfolder.
1. There you will see a list of the folders of each of the example sketches provided by the library. Open the folder of the example you want to open.
1. Select the `.pde` file in the folder.
1. Click the "**Open**" button.
The example sketch will now open in an Arduino IDE window as usual.
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
DaveX
February 20, 2024, 1:56pm
8
2.3.2 will also have problems with the example sketches for other libraries using .pde extensions. On my machine, these:
find . -name "*.pde" -print
./TinyWireM/examples/Tiny85_Temp_LCD_RTC/Tiny85_Temp_LCD_RTC.pde
./TinyWireM/examples/Tiny85_Temp_LCD/Tiny85_Temp_LCD.pde
./TinyWireM/examples/Tiny85_Temp/Tiny85_Temp.pde
./Adafruit_BMP085_Unified/examples/sensorapi/sensorapi.pde
./AccelStepper/examples/MultipleSteppers/MultipleSteppers.pde
./AccelStepper/examples/AFMotor_MultiStepper/AFMotor_MultiStepper.pde
./AccelStepper/examples/ConstantSpeed/ConstantSpeed.pde
./AccelStepper/examples/Blocking/Blocking.pde
./AccelStepper/examples/ProportionalControl/ProportionalControl.pde
./AccelStepper/examples/AFMotor_ConstantSpeed/AFMotor_ConstantSpeed.pde
./AccelStepper/examples/MotorShield/MotorShield.pde
./AccelStepper/examples/DualMotorShield/DualMotorShield.pde
./AccelStepper/examples/Quickstop/Quickstop.pde
./AccelStepper/examples/MultiStepper/MultiStepper.pde
./AccelStepper/examples/Overshoot/Overshoot.pde
./AccelStepper/examples/Bounce/Bounce.pde
./AFMotorDrawbot/examples/MotorParty/MotorParty.pde
./AFMotorDrawbot/examples/MotorTest/MotorTest.pde
./AFMotorDrawbot/examples/AFMotor_MultiStepper/AFMotor_MultiStepper.pde
./AFMotorDrawbot/examples/AFMotor_ConstantSpeed/AFMotor_ConstantSpeed.pde
./AFMotorDrawbot/examples/StepperTest/StepperTest.pde
./FreqMeasure/examples/Serial_Output/Serial_Output.pde
./FreqMeasure/examples/LCD_Output/LCD_Output.pde
./LiquidCrystal_I2C/examples/HelloWorld/HelloWorld.pde
./LiquidCrystal_I2C/examples/CustomChars/CustomChars.pde
./LiquidCrystal_I2C/examples/SerialDisplay/SerialDisplay.pde
./FrequencyTimer2/examples/Test/Test.pde
./Adafruit_LED_Backpack_Library/examples/custom_character/customgen/customgen.pde
./NXPMotionSense/OrientationVisualiser/OrientationVisualiser.pde
./FreqCount/examples/Serial_Output/Serial_Output.pde
./FreqCount/examples/LCD_Output/LCD_Output.pde
The AccelStepper and LiquidCrystal_I2C look like the most popular examples that folks would try.
I'm happy to report this bug has been fixed:
arduino:main ← arduino:#2377
opened 11:28AM - 22 Feb 24 UTC
### Motivation
Fix the examples opening with the `.pde` main sketch file exte… nsion.
https://github.com/arduino/arduino-ide/assets/1405703/04467b9a-ac07-4d9d-8358-6e3608bd9be4
### Change description
Do not assume the `.ino` extension for the main sketch file when copying a sketch.
### Other information
Closes arduino/arduino-ide#2377
### Reviewer checklist
- [ ] PR addresses a single concern.
- [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-ide/pulls) before creating one)
- [ ] PR title and description are properly filled.
- [ ] Docs have been added / updated (for bug fixes / features)
Since the fix was made after the time of the Arduino IDE 2.3.2 release, it is currently only available when using the latest nightly build of Arduino IDE.
If you like, you can give it a try. The download links for the nightly build are listed here:
https://www.arduino.cc/en/software#nightly-builds
ⓘ The nightly build and the release version of Arduino IDE can coexist on your computer without any problems so there is no need to uninstall the release version if you aren't sure whether you want to switch to using the potentially less stable nightly build exclusively.