hi guys, i'm playing with mouse/keyboard emulation on the DUE board (native usb of course), i noticed that those sketches doens't work on my windows7 32bit machine
on mac all just works good, on windows it recognise me the device as "Arduino Due" with this id: USB\VID_2341&PID_003E&REV_0100
even installing drivers nothing changes... doesn't work!!
any clue?
thanks
i'm using exactly the example included in the IDE 1.5
const int upButton = 2;
const int downButton = 3;
const int leftButton = 4;
const int rightButton = 5;
const int mouseButton = 6;
int range = 5; // output range of X or Y movement; affects movement speed
int responseDelay = 10; // response delay of the mouse, in ms
void setup() {
// initialize the buttons' inputs:
pinMode(upButton, INPUT);
pinMode(downButton, INPUT);
pinMode(leftButton, INPUT);
pinMode(rightButton, INPUT);
pinMode(mouseButton, INPUT);
// initialize mouse control:
Mouse.begin();
}
void loop() {
// read the buttons:
int upState = digitalRead(upButton);
int downState = digitalRead(downButton);
int rightState = digitalRead(rightButton);
int leftState = digitalRead(leftButton);
int clickState = digitalRead(mouseButton);
// calculate the movement distance based on the button states:
int xDistance = (leftState - rightState)*range;
int yDistance = (upState - downState)*range;
// if X or Y is non-zero, move:
if ((xDistance != 0) || (yDistance != 0)) {
Mouse.move(xDistance, yDistance, 0);
}
// if the mouse button is pressed:
if (clickState == HIGH) {
// if the mouse is not pressed, press it:
if (!Mouse.isPressed(MOUSE_LEFT)) {
Mouse.press(MOUSE_LEFT);
}
}
// else the mouse button is not pressed:
else {
// if the mouse is pressed, release it:
if (Mouse.isPressed(MOUSE_LEFT)) {
Mouse.release(MOUSE_LEFT);
}
}
// a delay so the mouse doesn't move too fast:
delay(responseDelay);
}
I installed Windows 8 on my desktop and then attempted to install the Arduino Due driver.
Windows 8 refuses to accept the Arduino USB driver because it is "unsigned". The message returned is: "The third party INF does not contain digital signature information".
Previous renditions of Windows allowed you to override the "unsigned" warning and continue, Windows 8 will not allow installation of a driver without the proper digital signature.
Hey razer93, you sketch works perfectly in my laptop but with Windows 7 x64 SP1. Like you, I am using the native USB port.
I wanted to share a couple of things that happened during the first time I connected DUE to my laptop:
Like lynchzilla, I got the red warning about the signature but Windows allowed me to override it.
Windows recognized an 'Arduino Due X' driver but I couldn't make anything work! So I re-booted my laptop and the driver was gone; then, I re-installed the driver making Windows browse the arduino-1.5-windows folder and a 'bossac' driver showed up. Finally (and automatically), after few minutes, the Arduino Due driver (ver. 5.1.2600.0) took over again.
It's not clearly stated, but it appears the BOSSA code only runs after you "erase" the flash. You can try pressing the "ERASE" button then unplug-replug the Native USB port again. It should be detected as a BOSSA programming port.
Yes, Arduino Due device is correctly installed, and it shows up when a sketch is uploaded or when i try to emulate mouse-keyboard... but doesn't work..
Okay, I have confirmed your same issue on the my Due. As a comparison I tried the KeyboardAndMouseControl on my Leonardo and it works fine.
One thing I noticed as I watched the Windows Device Manager when I plugged in my Leonardo it was detected on one COM17 port which is used for the programming, but then after about 5 seconds it re-detects on COM18 which is used for serial comm. But in addition it also installed a USB Human Interface Device.
The Due does not do this. Which leads me to believe the Arduino Due driver is not supporting this feature yet.
Anyone else knows if this is true or not?
Hi hiduino, I tried the sketch posted by razer93 and it works in my Due (my machine is W7 x64). I haven't tried the keyboardcontrol sketch. I'll try to make time tonight and test it.