Where am I?
At the end of my last Blog, I had a semi-functional Arduino IDE/ESP8266 development environment. It would sometimes compile a sketch correctly and sometimes it would fail to compile the same, unchanged sketch, usually with errors relating to (untrue) multiple library references. I have wasted hours attempting to sort this out and failed miserably.
However, because the environment would sometimes behave, I decided to satisfy my desire to make some progress with development of a couple of sketches.
I have done that and I am now ready to start climbing out of the Hole!
Assembling my Ladder
On the basis that it is easier to upgrade a system than it is downgrade one, I decided that it would be sensible to build another Arduino/ESP8266 environment from older versions on a different PC.
I do 95% plus of my work on a trusty Windows 7 desktop system (it will have to change after christmas!). I also have Windows 10 laptop which had become so slow that I did a Windows "factory reset" and then brought Windows OS back up to date; I resolved at the time to only install applications as I needed them. I hadn't needed the Arduino IDE, so it wasn't there, nor was there any trace of it!
I decided, to install selected versions of the Arduino IDE and the ESP8266 package on to the laptop, in the hope of establishing a stable environment - ie one which I can't "break" with my current and immediate future ESP8266 sketches!
Fortunately, my Arduino Sketch folder, along with a load of other stuff, is synchronised between the desktop and the laptop, via Dropbox. So, once I have a development environment established, I have access to all my sketches.
My Choices for the Environment
According to the Arduino website, when I eventually found the information, the release dates of the Arduino IDE over the last year were:
- 1.8.10 - 20190913 - my current setup
- 1.8.9 - 20190315
- 1.8.8 - 20181207
Looking at various file creation dates, etc, it would appear that I started work with my first ESP8266 around March 2018. I'm confident that I upgraded the IDE happily, between then and the start of 2019, so I decided to install Arduino IDE 1.8.8. After editing the preferences to point to my sketches, I was able to compile and run Arduino only sketches perfectly.
According to the Arduino/ESP8266 website: https://arduino-esp8266.readthedocs.io/en/latest/index.html , the release dates of the stable versions of the ESP8266 package over the last year or so are:
- 2.6.2 - 20191128
- 2.6.1 - very recent - my current setup
- 2.6.0 - very recent
- 2.5.2 - 20190520
- 2.5.1 - 20190511
- 2.5.0 - 20190206
- 2.4.2 - 20180803
Again, based on the approximate date when I started work, 2.4.2 looks like a good candidate. (It's a bit of a frustration that neither website lists the version release dates in an easily accessible fashion!)
In the Arduino IDE, I used the preferences window to load up the github pointer for the stable releases of the ESP8266 package, as per the instructions, and then installed version 2.4.2 from the boards manager.
In the Arduino IDE Libraries manager, I installed the same versions of the Dallas Temperature and OneWire libraries that I had rolled back to in the desk top environment. This seemed a reasonable thing to do, because I was getting compile failures due to multiple library references in sketches that didn't include those libraries.
I also Installed Python 3.2 3.7.2 - the same version that is active on my desktop - although I had installed 3.8 on the desktop, as part of the hole digging exercise, it wasn't active. because the environment variable Path was still pointing to Python3.7! I have since removed 3.8 from the desktop.
Did it Work?
A bit of light relief - the first compile of an ESP8266 sketch failed, because the board type in the IDE was still set to UNO!!!
A quick switch to Wemos d1 mini and the temperature monitoring sketch compiled perfectly. I connected the board, set the port and uploaded. It worked perfectly.
I have since worked through half a dozen or so existing ESP8266 sketches, involving multiple ESP8266 libraries and all of them compile, upload and run perfectly!
I have also carried out some further ESP8266 development work in this stable environment. The only compile errors I have generated have been caused by my own syntax errors - mostly semi-colons! The new and modified sketches are, of course, available to me in the desktop environment, courtesy of Dropbox.
Where do I go from Here?
In any area of "maintenance", there is always a conflict between Planned Preventative Maintenance and "If it aint broke, don't fix it!"
Although the combination of Arduino 1.8.8 and Esp8266 2.4.2 appears to be stable and everything I've tried so far has complied and worked, there are always, hopefully, sound reasons why software gets upgraded. In some cases the upgrades are of no benefit to the user of an older version - they fix things you aren't using anyway, but, of course, you might in the future! In other cases, they can result in a "break" as I have already experienced.
In between there are the upgrades that make something you are using more efficient or more reliable or faster. There are also upgrades that introduce a new feature that lets you do something you couldn't do before.
I guess I need to upgrade the environment on the laptop, step by step, testing it hard after each step, until it "breaks". I think I'll do a bit more sketch development first!
Look out for Part III, when hopefully, I will fill in the !hole".
Edited - Python 3.2 changed to 3.7.2