Closed enty8080 closed 4 years ago
Do you expect code written for Arduino to run without it?
no, no... I mean:
#include "DigiKeyboard.h"
int main(void) {
DigiKeyboard.println("hello, world!");
}
I don't know how to make DigiKeyboard work not only with IDE
Is there any way to do this?
You can not use Arduino libraries etc. without Arduino Core!!! You must compile all the Arduino files from the core like e.g. wiring.c, Print.c and use all include files! Or you create your own core or substitute the functions, the DigiKeyboard requires.
Do you know any keyboard/mouse HID libraries that works not only with Arduino IDE?
No
I can’t believe that there is no way to program DigiSpark without Arduino :(
Use the Atmel tools or Gcc with your own startup code. Or google for ATtiny85 programs maybe even in Github. BTW, what is wrong with Arduino, it is mainly the startup code and the initialization of the millis() timer.
Ok. And the last question: how can I execute Arduino ide without GUI from terminal with specified programmer (Micronucleus)?
I mean something like this:
./arduino -input sketch.ino -bootloader micronucleus
Arduino-cli
Do you know how to do something like this:
./arduino -input sketch.ino -bootloader micronucleus
from Arduino CLI?
What does the -bootloader
parameter do? Given your earlier question, do you mean programmer
? i.e. is that the equivalent GUI function?
For the arduino-cli
, the nearest to what I think you're after is the upload command... especially since which the digistump board support package you don't need to specify micronucleus
as the programmer, since it is the platform default. You just use the normal upload
command.
Perhaps something like:
arduino-cli upload -b digistump:avr:digispark-tiny /path/to/Sketch
How to install digistump to arduino-cli?
But what should I do if I want to define my own programmer in arduino-CLI?
https://arduino.github.io/arduino-cli/commands/arduino-cli_core_install/
You currently can't use a programmer... according to the documentation.
OK. thank you
Can I use DigiMouse with DigiKeyboard?
I can compile code for attiny digispark via avr-gcc / avr-g++, but when I include DigiKeyboard.h, avr-gcc or avr-g++ returns me a lot of errors. And also it uses Arduino.h((