Arduino Leonardo won't be seen by windows 10.

Hi, I am becoming extremely frustrated with my project. I had a bit of code that when it uploaded, typed a phrase over and over and after a long time of trying to upload an empty code to stop it from typing so I could fix it I finally got the code uploaded. Although when I went to upload the fixed code, I found out that the device wasn't being picked up by the computer, or any computer for that matter, not a thing on device manager either.
Any help would be appreciated, thanks.

edit: it does recognise it when I reset it but only recognises it while it in the reset stage, when it finishes it no longer sees it

Did you try the "quickly double tap reset"

Also there are drivers in the driver folder for the IDE but you should UNZIP them as they are in the "OLDDRIVERS" zip file.

Also AVOID USB 3.0 ports !

Thanks for the reply, and no I haven't tried the quick double re-tap. I don't use USB 3.0 and I shall try the IDE thing.

How do I install the drivers and how do I double tap? Thanks…

Okay, so what I did was quickly upload a blank code in the time it was resetting and afterwards, the device is now being seen, so I am somewhat curious to know whether or not it is my code.

This is the code:

#include "Keyboard.h"

const int buttonPin = 4;          // input pin for pushbutton
int previousButtonState = HIGH;   // for checking the state of a pushButton
int counter = 0;                  // button push counter]
int x = 2;

void setup() {
  // make the pushButton pin an input:
  pinMode(buttonPin, INPUT);
  // initialize control over the keyboard:

int main(){
  int buttonState = digitalRead(buttonPin);
 while ( x > 1) {
  while (buttonState == LOW) {
    // read the pushbutton:
    // if the button state has changed,
    if ((buttonState != previousButtonState)
       // and it's currently pressed:
       && (buttonState == HIGH)) {
      // increment the button counter
     // type out a message
     Keyboard.println(" times.");
   // save the current button state for comparison next time:
   previousButtonState = buttonState;

Simple answer...Yes !

Some of the sketches for the LEO's will emulate other things and seem to take it offline.
Its usually not offline but pretending to be something else.

In your case a keyboard.

If you read up on what that sketch does it will explain a little better.

Glad you got it back inline.