how to install <avr/sleep.h>

Hi all, where do I find the libary <avr/sleep.h> ? should it install with the IDE download ?

It is part of the IDE install. You don't need to install anything.

Keep in mind that this is an AVR-specific library, so it won’t be available if you’re compiling for a board of an architecture other than AVR. The AVR boards are Uno, Mega, Nano, Leonardo, Micro, etc. Examples of non-AVR boards are Zero, MKR, ESP8266, ESP32.

mrodas:
Sorry, I have the IDE 1.8.12 installed
#include <avr / sleep.h> when compiling it gives me the error
exit status 1
avr / sleep.h: No such file or directory
I do not understand how it says that it is installed by default

For which board are you compiling (see reply #2)? If it’s an AVR based board, please post your full error message (use the “copy error messages” button that pops up at the right hand side above the output window) and your sketch.

andymouse:
Hi all, where do I find the libary <avr/sleep.h> ? should it install with the IDE download ?

You have to install the board attiny.
in Tools select the Attiny “xx”
From there, if I will recognize it without problems

mrodas: You have to install the board attiny. in Tools select the Attiny "xx" From there, if I will recognize it without problems

From where do you get that OP is using an attiny?

The IDE comes standard with the sleep library so for AVR processors it should compile without problems. On my windows system, C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\include\avr\sleep.h.