attiny85 upload error

hello guys,
Sorry if i'm in the wrong section

i'm using an arduino nano and the arduino IDE to program an attiny85 (this is my frist experience with attiny)
connections are correct, i'm using the capacitor, and i sucessfully uploaded the blink code
then i uploaded a simple code to try a piezzo buzzer with tone(), and it also worked ok

however, i'm having throuble uploading new codes (i'm trying to test diferent tones combination, for diferent alarm types), it indicates that the upload is ok, but then it execute the previous code instead of the one i just uploaded

can you guys help me?

i'm using this core: GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8

This is the right place for this issue.

The upload process includes a verification step where it reads back the contents of the flash and makes sure it matches what was uploaded. (If you enable verbose upload output, which everyone should do, you can see it do this) So if it says it was uploaded successfully, the new code is there.

Usually when people report that code uploads successfully, but th es sketch behavior doesnt change, the problem is actually that the changes they made to the sketch arent working due to a problem in their code, rather than any upload issue (we also occasionally see people who were "verifying" code, rather than uploading it)

enable verbose upload output

man this is great
didn't know about it. for every newbie reading this post, this is a must (enable verbose upload output on your arduino IDE)

i found an article stating that when using arduino as a programmer you need to press shift key before click upload, and it worked like a charm

thanks DrAzzy for your enlightenment

You shouldn't need to hold shift unless you selected an Opitboot board definition, in which case normal upload would try to upload via serial expecting to talk to an optiboot bootloader.

If programming via ISP, use the attiny 25/45/85 ( no bootloader )

ok
i'll test it again

One error that I do over and over again is that even when not using a booloader you have to write it to the attiny85 AT LEAST ONCE in order to set the fuses, as far as I know there is no other way to write the fuses in the arduino ide.