Arduino Micro

Hello,

I have bought a arduino micro, and programmed it (on my own computer) as a keyboard. But now i want to use the arduino on another computer, but nothing happens when i push a button. How can i fix this?

Greetings

Give more information for a start.

Weedpharma

weedpharma:
Give more information for a start.

Weedpharma

I will try to set the situation. I have bought a adruino micro. And downloaded the arduino software on computer 1. On this computer i uploaded a sketch so that when i press a button the computer thinks that the button A is pushed on the keyboard. It works on computer 1, so when i push the button the computer writes an 'A'. When i plug the arduino micro in to computer 2 and push the button, then nothing happens.

I hope this is enough information?

Greetings

Have you loaded the Arduino software onto computer 2?

Weedpharma

weedpharma:
Have you loaded the Arduino software onto computer 2?

Weedpharma

No i havent installed the arduino software on computer 2. I thought that i just could program the arduino board on one computer, and then use it on other computers without installing the arduino software. Or is this not possible?

Greetings

What program are you using on PC1 and PC2 to read the input?

Please supply the code, put it in its own window as seen in other posts. This can be done by placing     [code] and [/code]  around the code. This makes it easier for others to read.

Weedpharma

weedpharma:
What program are you using on PC1 and PC2 to read the input?

Please supply the code, put it in its own window as seen in other posts. This can be done by placing

[code] and [/code]

around the code. This makes it easier for others to read.

Weedpharma

Here is the code i used:

int buttonPin = 9;  // Set a button to any pin

void setup()
{
  pinMode(buttonPin, INPUT);  // Set the button as an input
  digitalWrite(buttonPin, HIGH);  // Pull the button high
}

void loop()
{
  if (digitalRead(buttonPin) == 1)  // if the button goes low
  {
    Keyboard.write('a');  // send a 'a' to the computer via Keyboard HID
    delay(50);  // delay so there aren't a kajillion z's
  }
}

But my question is if i can use my arduino micro on a computer that doesn't have the arduino software?

Greetings

How are you connecting to the PCs?

What program are you using to read the input?

Have you confirmed that the correct port is in use on the second PC?

Weedpharma

weedpharma:
How are you connecting to the PCs?

What program are you using to read the input?

Have you confirmed that the correct port is in use on the second PC?

Weedpharma

I have the board connected through the mini usb. I dont have a program to read the input, because i thought the arduino micro would work as a HID keyboard. And i dont know if the correct port is used on the second pc. I'm sorry i dont have much experience with this, but i thought it is all plug and play.

Greetinggs

Exactly how are you reading the output on PC1? You simply say it works with no information on how you test it.

Exactly how are you testing it on PC2?

Weedpharma

weedpharma:
Exactly how are you reading the output on PC1? You simply say it works with no information on how you test it.

Exactly how are you testing it on PC2?

Weedpharma

On PC1 (with the arduino software installed) i plugin the arduino board and push the button that i have installed to PIN = 9. Then the computer writes an A. I tested it in google chrome and word, that when i push the button the computer writes an A. On PC2 (without the arduino software) i plugin the arduino board. The computer recognizes the board, but when i push the button the computer dont write and A.

On the second computer, are the correct drivers installed?

I don't see a "keyboard.begin()", which is almost certainly necessary for the Micro to emulate a keyboard.

Once the micro is emulating a keyboard, a PC should NOT require any special drivers...

westfw:
I don't see a "keyboard.begin()", which is almost certainly necessary for the Micro to emulate a keyboard.

Once the micro is emulating a keyboard, a PC should NOT require any special drivers...

I have added the keyboard.begin(), code and now its working. Thanks!