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
@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
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.jsonpackage 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.
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.
Move the folder to some other location on your hard drive (so that you can restore it later if necessary).
Start Arduino IDE.
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:
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.
/*
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)
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
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.