Rtttl with T88 Tiny

Verify the pin you use for tones. I used my passive buzzer with the ATtiny88, and the code I posted. I do not remember the freq (you show 16.0MHz) in my IDE. I do not remember if I had an output in my Serial Monitor... I should have removed the Serial.print();

I recently clobbered my IDE and Arduino environment, so I can not verify anything now.
I will try to re-create it. My buzzer is still connected to my tiny88, so once I get the IDE going again, I will see what I can do.

"It works" so I'm guessing it is a setting I had, and need to find.

Check your IDE is set to IDE >> TOOLS >> PROGRAMMER >> MICRONUCLEUS

(update)

I plugged in my ATtiny88, and it ran the "A-team" RTTTL.

The length of "song" can be a problem. Pick short songs.

(update to the update)

Now that I had to reload my code... it the "song" just fluttered and rebooted my tiny88... so... I need to find where my years-old MHETtiny88 settings should be... brb.

(update 4 June)

I think tinycore clobbered whatever MH-ET had working. I now can't get any of my tiny88 to work with RTTTL (I think we see the same thing). The difference between a week ago when RTTTL worked on my tiny88s and now is my IDE removal, along with every resident core (they are never uninstalled), then re-install of the IDE and AVR, ESP32 and MHET core/BSP... then tinycore library.

(update 4 June)

ATtinyCore 1.5.2 by Spence Konde (@DrAzzy) is not installing due to file... and ATtinyCore 2.0 does not install (due to "not a library") so I will wait for that to be back online. Following this (very old) video: https://www.youtube.com/watch?v=AeqCEFF68QM

@xfpd Just to make sure you know if you didn't already, I did not have timer errors with your code; it uploaded with no issues (other than music not playing). The timer error was only with the code ZX80 posted a link for. Thank you for all of your updates. I am learning a lot about things I can try. I wonder if the RTTTL worked before because you were using older libraries for TinyRTTTL.h. I have had older libraries work and new ones not for Arduino Kit projects that used IR remotes.

I did try using pin 2 in my code like you had and connected the positive speaker pin to pin 2 and also tried changing the code to use pin 0, pwm pins, and others, but never got music out. I may start trying some different songs to see if I can get something to work. Like you said, it could be different notes that are breaking it.

The programmer I have been using is called Micronucleus, so it sounds like we had the same board manager downloaded unless you had an older version before that worked better.

Here is the link I used to download the programmer that could be the problem.

https://raw.githubusercontent.com/MHEtLive/arduino-boards-index/master/package_mhetlive_index.json

In the attached photo, this is my setup to program the board, and it works when programming buttons and LED's; the pins match 1 to 1 for what it says in the code and what the board uses (pin 2 in the code will blink an LED when connected to pin 2 on the board). But I have seen other board managers to download that could be used to program the T88 Tiny. I will probably look into that next.

That is the same link I use, and it looks like the link I used before re-installing my IDE.

I agree... I just don't understand how the "old" libraries were not over-written with updates. So... I am trying to find an old Hindi video (with links) that I first followed to get my first tiny88 to work. I hope the answer is not this "outdated library" but rather learning to use ATtinyCore (in the video link in the previous post it shows selecting tiny88 from ATtinyCore in board manager).

If I found the answer once, I can find it again.