Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. const int transistorPin = 9;    // pin donde se conecta la base para el transistor
  2.  
  3. void setup() {
  4.  
  5.    // colocar el pin de el transitor en salida
  6.     pinMode(transistorPin, OUTPUT);
  7. }
  8.  
  9. void loop() {
  10.    //enciende y tiempo a encender el motor  
  11.    digitalWrite(transistorPin, HIGH);
  12.    delay(1000);
  13.    //tiempo a apagar el motor
  14.    digitalWrite(transistorPin, LOW);
  15.    delay(1000);
  16. }