DUE appears like "unknown device" in Windows 7

Hi: i have loaded one test sketch in arduino due, for testing use like USB keyboard. When i connect NATIVE USB SAW3X port to my PC it appears like “unknown device”, and Windows unable the device. I have tested in Windows 7 and XP, and it occurs the same.

¿Some idea about this problem? thanks

This is the sketch:

#include <Keyboard.h>

const int upButton = 2;
const int downButton = 3;
const int leftButton = 4;
const int rightButton = 5;
const int mouseButton = 6;

void setup() {
pinMode(upButton, INPUT_PULLUP);
pinMode(downButton, INPUT_PULLUP);
pinMode(leftButton, INPUT_PULLUP);
pinMode(rightButton, INPUT_PULLUP);
pinMode(mouseButton, INPUT_PULLUP);

Keyboard.begin();

}

void loop() {

if (digitalRead(upButton) == LOW) {
Keyboard.write(‘u’);
}
if (digitalRead(downButton) == LOW) {
Keyboard.write(‘d’);
}
if (digitalRead(leftButton) == LOW) {
Keyboard.write(‘l’);
}
if (digitalRead(rightButton) == LOW) {
Keyboard.write(‘r’);
}
if (digitalRead(mouseButton) == LOW) {
Keyboard.write(‘m’);
}

}

Hello jorezener,

Which IDE version are you using?

-p

Hi.

I use IDE is 1.6.7, but maybe i have no explained the problem well.

The PC where i connect DUE it´s not running Arduino IDE. I want connect DUE to this PC and i want this PC recognize DUE like a keyboard.

Obviously DUE will be loaded with the complete sketch ( the sketch i have posted is only a test sketch), but i need the PC recognize the DUE like a keyboard before all.

thanks

jorezener:
Hi.

I use IDE is 1.6.7, but maybe i have no explained the problem well.

The PC where i connect DUE it´s not running Arduino IDE. I want connect DUE to this PC and i want this PC recognize DUE like a keyboard.

Obviously DUE will be loaded with the complete sketch ( the sketch i have posted is only a test sketch), but i need the PC recognize the DUE like a keyboard before all.

thanks

I just tested your code and it is running ok with my Due. I used IDE 1.5.8. I assume you did load your code without problem. If your pc doesn't recognize your Due (native USB) , then your problem is related to the driver. I'd recommend you to try to update the driver via Windows device manager, update driver software, etc..

-p