You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
isConnected() always seems to return 0, no matter what. This function seems to be broken in both the TrinketKeyboard and the TrinketHidCombo libraries.
So I'm wrong about isConnected()....sort of. It actually does work, though its implementation in the example sketch does not.
Replace this:
while (TrinketKeyboard.isConnected() == 0); // wait until connection
with this:
//wait until connected to USB before continuing
//-note that isConnected() will change to true at that point
while (TrinketHidCombo.isConnected() == false)
{
TrinketHidCombo.poll(); //The poll function must be called at least once every 10 ms, or you must command a keystroke. Otherwise, the computer may think that the device has stopped working, and give errors.
}
isConnected() always seems to return 0, no matter what. This function seems to be broken in both the TrinketKeyboard and the TrinketHidCombo libraries.
This means also that this example sketch is broken, as it gets stuck in the while loop where isConnected() is called: https://github.com/adafruit/Adafruit-Trinket-USB/blob/master/TrinketKeyboard/examples/TrinketKeyboardPrank/TrinketKeyboardPrank.ino
The text was updated successfully, but these errors were encountered: