I thought this was going to be easy, but I seem to be struggling with the basics. I want to use the keyboard.printlnf command to send keystrokes to an open notepad on my PC - like a simple console. I have my photon connected to my PC over USB and have loaded this code for testing. I can see by the color change on the status LED when I have hit the input, but the keypoard.print command doesn’t seem to do anything. :
int button = D7;
STARTUP(Keyboard.begin());
void setup() {
pinMode(button, INPUT_PULLDOWN);
delay(2000);
}
void loop() {
if(digitalRead(button) == HIGH){
RGB.control(true);
RGB.brightness(64);
RGB.color(255, 0, 0); //red
Keyboard.printlnf("Test", millis());
delay(1000);
RGB.control(false);
}
while(digitalRead(button) == HIGH) {
delay(500);
}
}
I have loaded the Photon 1.4.4 firmware and I am running Windows10 on my PC . What am I doing wrong?