Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrinketHidCombo.getLEDstate() not working #8

Closed
maujabur opened this issue Feb 14, 2015 · 3 comments
Closed

TrinketHidCombo.getLEDstate() not working #8

maujabur opened this issue Feb 14, 2015 · 3 comments

Comments

@maujabur
Copy link

Hi!

When using TrinketHidCombo, the function getLEDstate() seems to be returning always 0, but for TrinketKeyboard it works fine!

test code:

// Adafruit Arduino 1.05 - Win 9-15-14
// trinket 5V

#include <Bounce.h>
#include <TrinketKeyboard.h>
//#include <TrinketHidCombo.h>

#define LED_CAPS 1


void setup() {
  pinMode(LED_CAPS,OUTPUT);
  TrinketKeyboard.begin();
  //TrinketHidCombo.begin();
}

void loop() {
  delay(5);

  TrinketKeyboard.poll();
  digitalWrite(LED_CAPS, (TrinketKeyboard.getLEDstate()&KB_LED_CAPS)?HIGH:LOW);
  //TrinketHidCombo.poll();
  //digitalWrite(LED_CAPS, (TrinketHidCombo.getLEDstate()&KB_LED_CAPS)?HIGH:LOW);
}
@ElectricRCAircraftGuy
Copy link

Same here. getLEDstate() is broken for the TrinketHidCombo library but not for the TrinketKeyboard library. Additionally, there is a bug with the print function. I'll open a new issue for that bug.

Here's the issue for the println problems: #12

@ElectricRCAircraftGuy
Copy link

Please close this issue; it is now fixed. See here: 51f208b

I've tested it and it works now.

@maujabur
Copy link
Author

Thanks! I can't test it right now, but I'll close it anyway, since you tested it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants