AnswerBun.com

Using an ATTiny85 and DigiKeyboard.h, can I detect when USB HID is connected?

Arduino Asked by Bobby Tables on January 4, 2022

I am building a project to send HID keystrokes to a computer with an ATTiny85. I want to detect when the USB communication is working, in order to turn on a LED saying that everything is good. If USB stops working, I want a watchdog to turn the LED off. Ideally it would also attempt to reconnect automatically.

DigiUSB has the DigiUSB.available() method, but DigiKeyboard does not, and I can’t seem to use both headers in the same program because of conflicts. How can I do this without DigiUSB?

Add your own answers!

Related Questions

AsyncWebServer giving wdt reset

1  Asked on September 14, 2020 by java-bee

         

serial 1 was not declared in the scope

1  Asked on July 30, 2020 by mian-yasir-shah

 

How can I set a timer?

2  Asked on July 24, 2020 by damon-swart

 

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP