Trying to run a simple example and cant even get the compiler to ok it.
Not sure if i have done something wrong.
I have searched for the platform.h file and it does exist.
I am using a Mac w/ OX10.9.5 and IDE Arduino 1.5.8.
// use this option for OSX:
char ctrlKey = KEY_LEFT_ARROW;
// use this option for Windows and Linux:
// char ctrlKey = KEY_LEFT_CTRL;
void setup() {
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
// initialize control over the keyboard:
Keyboard.begin();
}
void loop() {
while (digitalRead(2) == HIGH) {
// do nothing until pin 2 goes low
delay(500);
}
delay(1000);
// new document:
Keyboard.press(ctrlKey);
Keyboard.press('n');
delay(100);
Keyboard.releaseAll();
// wait for new window to open:
delay(1000);
}
AND I RECIEVE THIS ERROR:
sketch_nov20b.ino:9:22: fatal error: platform.h: No such file or directory
compilation terminated.
Error compiling.
Was worried someone would say that. The thread I was following used a firmware update and new bootloader to remedy that. I am using an Uno R3. But if that is the case I guess I am moving up.
Now will this allow the leonardo to be programmed on my computer and then run as a keyboard on any computer as well? or will my programmed leonardo only work on my computer?
ImmersionGT:
Trying to run a simple example and cant even get the compiler to ok it.
Not sure if i have done something wrong.
I have searched for the platform.h file and it does exist.
I am using a Mac w/ OX10.9.5 and IDE Arduino 1.5.8.
I had the same issue on Windows 8.1 x64, the latest IDE Arduino 1.5.8. and the board is Arduino Micro. Uninstalling IDE 1.5.8. and installing version 1.0.6 instead resolved the problem. Now compiles without errors.