Sorry for the delayed response. This forum prevented me from making more than 20 posts on my first day. Not really sure how anyone would see limiting the benefit of this forum to newcomers to be a good thing.
Ok. My problem has been completely resolved by switching to ATTinyCore.
Essentially as suggested by @red_car, by using the UNO code I posted in POST#1 and programming the ATTiny85 with that code.
#include <Wire.h> is required at the beginning of the program instead of #include <TinyWire.h> and instead of TinyWire.begin etc. commands, I now use Wire.begin etc. as per the UNO sketch.
Also to my misunderstanding the #include line vs a Board Manager are essentially unrelated. I previously thought the combination of both was required, such as #include <ATTinyCore.h> but this doesn't appear to be the case.
Being from PICAXE land and personally writing ALL code without the aid of any #include *.h AKA other people's code, for me it's all unfamiliar territory.
Doing this has completely resolved all and any issues I was having and I have now had the ATtiny85-20SF performing it's task repeatedly every 200ms for about 12 hours now with flawless operation just the same as the UNO.
So a "MASSIVE THANKS!!!" I am stoked! ![]()
For the benefit of forum readers, the resolution of this problem:
Arduino IDE:
Under FILE>PREFERENCES>Additional Boards Manager URLs:
http://drazzy.com/package_drazzy.com_index.json
Use ATTinyCore by Spence Konde. (Under TOOLS>Board:>Boards Manager)
For ATtiny85-20SF I used:
TOOLS>Board:>ATTinyCore>ATtiny25/45/85 (No bootloader)
Filter your search to: ATTinyCore
INSTALL: ATTinycore by Spence Konde
note: My IDE says I have installed v1.5.2, however when compiling it shows as v2.0.0 (Dunno why this is).
At this stage I don't actually know why I had this I2C problem using another ATTiny board manager (ATtiny microcontrollers>ATtiny 25/45/85), but that was clearly what was causing the issue relating to this entire thread. I am guessing it is something to do with the #include <TinyWire.h>. Maybe an Arduino guru can chime in here with some expert knowledge on this topic.
WOW! What a learning curve for something so simple that I needed.
Cheers,
Mort.
