Noob with Arduino and ATtiny85

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! :partying_face:

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.

Nice !

As I said...

Sometimes in life we do things that help others while asking for nothing in return. This is one of those cases whereby after the fact I'd like to offer help in return. Both @red_car and @killzone_kid helped me resolve my problems just by being nothing more than good people offering advice.

I don't know what you guys do, but I am a private design engineer and would like to offer you both FREE of charge, my ability to create the PCB files required to have 1 professional PCB made for any project you may have. 100mm x 100mm PCB's cost $5USD + shipping (more for larger PCB's) to have manufactured. You'd only need to supply me with your schematic diagram and proposed layout (by hand drawings if need be).

I am very grateful for your help in this instance as it has helped me to complete a MUCH larger project.

Cheers,
Mort.

Cheers mate... I may take you up on that offer. I have a few projects on the horizon. :slight_smile:

Further advancement regarding this topic... How can I load my program for the ATtiny85 into the UNO so I can essentially connect an ATtiny85, provide power to the UNO and have it "automatically" (without having to connect it to the PC) program the ATtiny85?

I can only assume this would be possible, but how to go about it I wonder?

Cheers,
Mort.