I'm developing a keyboard emulator using Digispark Pro (based on Arduino) which uses USB port as the keyboard interface. I haven't programmed it yet because I doubt how should I recognize the chip to Arduino IDE again using USB port after programming the board.
So my question is, how to reprogram Arduino if USB port is already recognized as keyboard HID?
-
Is the Arduino running with it's bootloader, or it is programmed with the target app only?Eugene Sh.– Eugene Sh.2016年11月07日 17:09:03 +00:00Commented Nov 7, 2016 at 17:09
-
@EugeneSh. I haven't programmed it yet. Digispark Pro has Arduino bootloader by itself.joware– joware2016年11月07日 17:15:56 +00:00Commented Nov 7, 2016 at 17:15
-
@joware you can make low speed USB keyboard host in software mainly with arduino ng oe betterDat Han Bag– Dat Han Bag2016年11月07日 17:54:22 +00:00Commented Nov 7, 2016 at 17:54
-
1If I'm correct, after a reset, it will first enumerate as an Digispark in the bootloader. Then after a timeout, it will run the main program and enumerate as a keyboard. The only problem might be that you'd have to manually press the reset button when you want to program the chip.Gerben– Gerben2016年11月07日 18:20:13 +00:00Commented Nov 7, 2016 at 18:20
-
1@Gerben Thank you, this is what I'm asking. So after programming the chip, for reprogramming it, I must connect it to PC and then press reset button and before reaching timeout (about 5 secs I think), I must program it again?joware– joware2016年11月07日 18:30:48 +00:00Commented Nov 7, 2016 at 18:30
1 Answer 1
https://digistump.com/wiki/digispark/tutorials/connectingpro It is suggested that in order to upload using the Arduino IDE you must:
Add the repository
http://digistump.com/package_digistump_index.json
in Preferences> Additional Boards Manager URLsInstall Digistump from the boards manager.
select the DigiSpark in Tools> Boards.
Then this is perhaps the important bit "You do not need to plug in your Digispark Pro before invoking upload" So hit upload before connecting the Digispark.
Then connect the Digispark when prompted by the Arduino IDE.