j_astra
September 5, 2024, 4:50am
1
Running PlatformIO via VSCode on MacMiniM2.
I’ve just installed the servo library (1.2.2) into my project folder, the one with .pio, .vscode, and src sub folders etc. Building a simple code causes the compiler to throw hundreds of ‘Stray ###’ errors
Uninstalling the library resolves the problem.
I’ve experimented with different ways to install the library:
Using PIO’s Libraries function to Add to Project
Updating platformio.ini with lib_deps = arduino-libraries/Servo@^1.2.2
Command line pio pkg install --library “arduino-libraries/Servo@^1.2.2”
Nothing so far has helped. Have not tried other libraries.
Complete noob here, what did I do wrong?
Thanks
j_astra
September 5, 2024, 6:26am
2
[RESOLVED]
Here’s what I did. Hopefully this will help someone out there:
Re-installing different versions of Servo.h libraries did not work (all the way back to 1.0.0).
Manually copying the files from different sources (GitHub, Arduino.cc, Platformio.org ) did not work
It seemed like the problem was related to the source file. Like if the text was copied from MS word (i.e. a bunch of invisible extraneous characters).
Removing the project folder and creating a new folder did not work.
This was very surprising to me. Because of the nature of Stray ## errors, one would think there was some reading error on the files.
[SOLUTION] Re-creating a project folder on the Mac Mini’s internal HDD worked.
Originally, the project folder was on an external 1TB SSD. Somehow reading off the external storage was the issue. I don’t know how to explain it.
BTW, the issue was ONLY happening for the Servo library. It didn’t replicate on Stepper, IR, and several other ‘less supported’ libraries.
Maybe MM might read this and figure something about the way Macs communicate with external mass storage… or perhaps even VSCode?