What is status of ATTinyCore?

I'm encountering various inconsistent errors in my attempts to re-program my cheap Tiny 88 boards. I successfully did so in May 2023 and even posted a detailed step-by-step on how to do it In post #4 of this thread
https://forum.arduino.cc/t/problem-loading-attinycore/1241472/4
but I now fail to reprogram my Tiny 88 boards.

Researching, I'm confused about the status of Spencer Konde's core. Is it broken? The licence apears to have expired two days ago. And trying to open the URL
http://drazzy.com/package_drazzy.com_index.json

results in this:

In post #4 of this thread

@ptillisch said:
"If we had a copy of the micronucleus-cli-2.5-azd1b-i686-mingw32.zip file, I could provide instructions for a workaround to the problem."

Is that guidance now available please? FWIW I do have that file
C:\Users\terry\AppData\Local\Arduino15\staging\packages\micronucleus-cli-2.5-azd1b-i686-mingw32.zip

I also posted the above on github:

https://github.com/SpenceKonde/ATTinyCore/issues/861

You can try using this workaround

That worked fine last time when the certificate expired.

I believe DrAzzy has some other real life priorities causing him to put his cores on the backburner.

Hi @Terrypin.

There is nothing wrong with ATTinyCore itself. The problem is that SpenceKonde/DrAzzy didn't renew the SSL certificate for their drazzy.com website.

This is a problem for the users of ATTinyCore because DrAzzy hosts the package_drazzy.com_index.json package index file on drazzy.com. The package index file provides the Arduino IDE Boards Manager with the information it needs to install ATTinyCore. For security reasons, Arduino IDE refuses to download files via SSL when the host's SSL certificate is expired.

DrAzzy hosts files on two different websites:

  • drazzy.com is used to host the package index file
  • azduino.com is used to host the archive files for the tool dependencies that are installed along with ATTinyCore

When you experienced the problem previously, it was the SSL certificate on azduino.com that was expired. So the ATTinyCore was failing when Arduino IDE couldn't download the tool archive. Fortunately the SSL certificate on azduino.com has been renewed since that time so we don't have any problem with downloading the tool archive files.

The only problem is with downloading the package index file. The workaround suggested by @hmeijdam allows you to download that package index file from an alternative source which has a valid SSL certificate.

My thanks to both you and @hmeijdam for your help.

I used the ‘descartes json’, replacing the original via Preferences. Plus some rather wild file shuiffling. I appear to have recovered the ability to upload sketches to my Tiny 88 board.

I was at one stage seeing four versions of the ATtiny core, as a result of dragging files for versions 1.4.1, 1.5.0 and 1.5.2 into my \Hardware folder. I’ve now got just the one called ATtiny, no suffix. How can I determine what version that is?

So I now thankfully seem to have recovered some stability. However It appears I was naive in assuming that most sketches I successfully upload to my board will run correctly. Not so unfortunately. My relatively simple project sketch flashing and pausing a couple of LEDs and sounding a buzzer for a brief period after a garden gate is opened does not. No delay() s, all millis() based. Obviously a fresh topic, but any thoughts welcomed please.

This is generally a bad idea.

  1. Close all Arduino IDE windows if it is running
  2. Move the folder to some other location on your hard drive (so that you can restore it later if necessary).
  3. Start Arduino IDE.
  4. Use Boards Manager to install ATTinyCore again.

You will now know exactly which version of ATTinyCore you have installed, and also know that you have the standard installation rather than one that might have unknown modifications.

You can check the pinout diagram here to make sure you are using the correct pin numbers in the sketch for the pins the LED and buzzer are connected to:

https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/avr/extras/ATtiny_x8.md

The numbers in the blue boxes in the first diagram on that page are the Arduino pin numbers you can use in your sketch.

1 Like

Thanks, I’ll follow your steps about identifying my version.

MY 88 is a board, not the chip. I’m confident about the pins I’m using. As mentioned, some sketches work OK.

I’m wondering if it’s some timing/clock/frequency issue. I’ll be way tomorrow, Saturday, but starting on Sunday afternoon I’ll begin methodically trying successively more ‘complex’ programs.

Here's the code of the misbehaving sketch:

/*
  Sat 1 Jun 2024 09:25;
  Runs correctly in Uno, Nano & Pro Mini, but fails on Tiny88
  Yet other sketches OK.
*/
#define reed 2 // N/O reed, so goes HIGH when gete opened
#define greenLed 3 // Green LED, on only when gate closed
#define redLed 4 // Red LED, blinks in bursts whenever gate open
#define buzzer 5 // Blue LED, emulates buzzer, on initially 30 s

bool reedState = LOW; // Gate closed
bool prevReedState = LOW; // Used to detect low edge
bool redLedState;
bool blink; // the state that will be applied to redLed
unsigned long currentMillis;
const unsigned long buzzerTime = 5000; // 5000 for testing
// const unsigned long buzzerTime = 30000; // 5000 for testing
unsigned long buzzerTimerStart;
// const long buzzerTime = 30000;
bool buzzerTimerRunning = false;
const unsigned long redLedInterval = 100;
unsigned long prevRedLedMillis = 0;
int blinkCount;
unsigned long pauseTime = 500;
unsigned long startPauseTime;
////////////////////////////////////////////////////////////
void setup()
{
  // All debug printing removed as Tiny has no Serial.
  //  Serial.begin(115200);
  //  delay(200);
  pinMode(reed, INPUT_PULLUP);// wht bb wire (pair, other to Gnd).
  pinMode(greenLed, OUTPUT); // grn LED, grn bb wire
  //  digitalWrite(greenLed, HIGH); // On by default
  pinMode(redLed, OUTPUT); // red LED, yel bb wire
  pinMode(buzzer, OUTPUT); // blue LED (emulates buzzer)
  currentMillis = 0;
}
////////////////////////////////////////////////////////////
void loop()
{
  currentMillis = millis();
  reedState = digitalRead(reed);
  blinkWithPauses();
  manageGate();
  manageBuzzerTimer(); // manage the buzzer turn off
}
////////////////////////////////////////////////////////////
void manageGate()
{
  // Test if gate has JUST opened
  if (reedState == HIGH && prevReedState == LOW)
  {
    Serial.println("Gate just opened");
    Serial.println("");

    prevReedState = HIGH;
    // Blink the red Led, 100ms (but pauses after every 8).
    digitalWrite(greenLed, LOW);

    // Start red LED (buzzer)
    digitalWrite(buzzer, HIGH);
    // And also start buzzer timer
    buzzerTimerStart = currentMillis;
    // And set a flag to show timer is running
    buzzerTimerRunning = true;
  }

  // Test if gate is closed
  if (reedState == LOW)
  {
    digitalWrite(greenLed, HIGH);
    digitalWrite(redLed, LOW);
    digitalWrite(buzzer, LOW);
    buzzerTimerRunning = false;
    prevReedState = LOW;
  }
}
////////////////////////////////////////////////////////////
void manageBuzzerTimer()
// check if delay buzzerTime has timed out
{
  if (buzzerTimerRunning && ((currentMillis - buzzerTimerStart) >= buzzerTime))
  {
    buzzerTimerRunning = false; // timed out
    digitalWrite(buzzer, LOW); // Turn off red LED (buzzer)
    // No need to reset delayStart
  }
}
////////////////////////////////////////////////////////////
void blinkWithPauses()
{
  if ( currentMillis - prevRedLedMillis >= redLedInterval)
  {
    prevRedLedMillis = currentMillis;
    blinkCount++;

    if ( blinkCount < 25)  // Experimented
    {
      // Toggle redLed
      blink = !blink;
      digitalWrite(redLed, blink ? HIGH : LOW);
    }
    if (blinkCount == 30)
    {
      blinkCount = 0;      // reset the variable
    }
  }
}
////////////////////////////////////////////////////////////

As reported earlier, several other sketches (like Blink, BlinkWithoutDelay, a fading LED, an 16x02 LCD using I2C, etc) run OK on this same Tiny 88. Tried it with various changes to 'Clock
Source...' apart from the default '8 MHz (Internal)', but no success.
Correct behaviour should be:

  • after power up green LED on if gate is closed
  • when gate opened:
    --- red LED starts its flashing with pauses, which continues until gate closed
    --- blue LED (emulating eventual buzzer) comes on for set period (5s in this test version)
  • when gate closed, only green LED remains on

Try a different pin than 2 for your reed switch. e.g. try 15

(pin 2 is PD2 and connected to USB-)

1 Like

Thanks, will do, first thing when I get back to PC Sunday morning.

You're a star Hans, thanks! Tiny 88 now ready for final casing etc.

Uno being used for programming so used pin 6 (allowing convenient grouping of dupont connectors 3, 4, 5, 6) .

@ptillisch: Re "I’m confident about the pins I’m using. As mentioned, some sketches work OK." ...plainly unjustified confidence :slightly_smiling_face:
I haven't methodically tested, but I'm guessing just about any pins other than 2 would also be OK?


Excuse my going slightly OT. The remaining problem I have with these ATtiny 88 boards is their lack of support for Serial. Anyone have advice on how to add it? At least to support debugging.

You need a separate USB<>Serial adapter or use your Arduino UNO's serial adapter, after loading an empty sketch to it.

Then you can connect the TX pin (PD6) of the MH-Tiny to the TX Pin of your UNO.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.