Come fare arrivare 9v a led?

Salve, scusate la domanda stupida ma sono nuovo in questo campo e non molto pratico
Riprendendo il circuito per far lampeggiare il led,

 int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

ho bisogno che la tensione del pin sia 9v invece che i 5v automatici
Consigli?

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Switch the higher voltage thru a transistor controlled by the digital ouput pin of the arduino.

Thanks a lot!! How did you understand that?

is Australian. smart people

:stuck_out_tongue_closed_eyes:

If you did not expect a reply, why did you post in the English section? :wink:

Puoi semplicemente usare un transistor come "interruttore", connettendolo in questo modo:

Dove:
1.) Rb, è la resistenza di base da 1K
2.) Il transistor è un bc547, o equivalente
3.) la Rl (resistor Load) sarebbe il tuo carico da pilotare, che, nel caso in cui fosse induttivo (piccoli motori DC) necessita in parallelo di un diodo di protezione (solitamente un 1n4007)...ma dato che ti interessa pilotare dei LED non inserirlo.
4.) La Vs è la tua alimentazione (in questo caso i +9V)
5.) 0V è il ground della tua alimentazione esterna, che deve essere in comune con il ground di Arduino.

Per una maggiore sicurezza io ti consiglierei di collegare il tutto attraverso un optoisolatore, ottenendo in questo modo una "separazione" fisica dei due circuiti.