on off con attiny85

In questi giorni mi arriva l'attiny85 intanto seguendo le vostre indicazioni ho inerito il mosfet sul circuito, ho inserito un mosfet smd che mi sopporti la corrente necessaria sempre logic-level spero di aver fatto giusto

il software per poi far andare il tutto metto questo, secondo voi va bene:

#include <avr/sleep.h>

int led = 0;
boolean On = 1;
int Power __attribute__ ((section (".noinit")));

void PowerDown () {
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
ADCSRA &= ~(1<<ADEN);       // Turn off ADC to save power
sleep_enable();
sleep_cpu();
}

void setup() {
Power = !Power;
if (!Power) PowerDown();
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, On = !On);  // Toggle the LED
delay(1000);                  // Wait for a second

Schematic_New-Project_Sheet-1_20180526163726.pdf (35.7 KB)