Code Monkey home page Code Monkey logo

digisparkarduinointegration's People

Contributors

christopherpoole avatar jorgerivera avatar percentcer avatar rc-navy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digisparkarduinointegration's Issues

How to Flash

How can i flash this Digispark Attiny85. Any one answer me please

ATtiny1616

does this library supports I2C for ATtiny1616 chip as a master?

No Fxx keys beyond F12.

Hello. Seeing the header file for the keys F1-F12 I would assume it would be easy to implement the F13-F29 keys also.
Is this a possibility?

Undefined reference to usb16Crcdappend

I manually added, library to ArduinoDriod and compiled the .ino file which includes DigiKeyboard.h library, then I'm getting this error.

Note: complied from Android device.

Cannot compile USB Keyboard based program

I try to compile this:

#include "DigiKeyboard.h"

#define PIN_RADIO_IN 2
#define PIN_RADIO_GND 1
#define MIN_DURATION_LEADIN 4000
#define MAX_DURATION_LEADIN 5000

void setup() {
  pinMode(2, INPUT);
  pinMode(1, OUTPUT);
  digitalWrite(1, LOW);
  digitalWrite(2, LOW);
}

// type something in to the computer using the keyboard input
void type_string(char* string) {
  byte idx = 0;
  while (string[idx] != 0) {
    byte chr = string[idx];
    byte key = KEY_SPACE;
    byte mod = 0;

    if (chr == '0') {
      key = KEY_0;
    } else if (chr >= '1' && chr <= '9') {
      key = KEY_1 + (chr - '1');
    } else if (chr >= 'a' && chr <= 'z') {
      key = KEY_A + (chr - 'a');
    } else if (chr >= 'A' && chr <= 'Z') {
      key = KEY_A + (chr - 'A');
      mod = MOD_SHIFT_LEFT;
    } else if (chr == ' ') {
      key = KEY_SPACE;
    } else if (chr == '\n') {
      key = KEY_ENTER;
    }

    DigiKeyboard.sendKeyStroke(key, mod);

    idx++;
  }
}

void loop() {
  unsigned int pulse = pulseIn(PIN_RADIO_IN, LOW);

  if (pulse >= MIN_DURATION_LEADIN && pulse <= MAX_DURATION_LEADIN) {
    unsigned int pulses[30];
    byte idx = 0;
    byte toggle = HIGH;
    pulse = 0;

    while (pulse < 1000) {
      pulse = pulseIn(PIN_RADIO_IN, toggle);
      pulses[idx] = pulse;
      toggle = !toggle;
      idx++;
    }

    byte length = idx;
    idx = 0;
    type_string("code ");
    while (idx < length) {
      char message[15] = "";
      sprintf(message, " %d", pulses[idx]);
      type_string(message);
      idx++;
    }
    type_string("\n");
  }

  usbPoll();
}

with tinycore and it has this error:

unknown MCU 'digispark' specified
Known MCU names:
   avr2
   at90s2313
   at90s2323
   at90s2333
   at90s2343
   attiny22
   attiny26
   at90s4414
   at90s4433
   at90s4434
   at90s8515
   at90c8534
   at90s8535
   avr25
   attiny13
   attiny13a
   attiny2313
   attiny24
   attiny44
   attiny84
   attiny25
   attiny45
   attiny85
   attiny261
   attiny461
   attiny861
   attiny43u
   attiny48
   attiny88
   at86rf401
   avr3
   at43usb320
   at43usb355
   at76c711
   avr31
   atmega103
   avr35
   at90usb82
   at90usb162
   attiny167
   avr4
   atmega8
   atmega48
   atmega48p
   atmega88
   atmega88p
   atmega8515
   atmega8535
   atmega8hva
   at90pwm1
   at90pwm2
   at90pwm2b
   at90pwm3
   at90pwm3b
   avr5
   atmega16
   atmega161
   atmega162
   atmega163
   atmega164p
   atmega165
   atmega165p
   atmega168
   atmega168p
   atmega169
   atmega169p
   atmega32
   atmega323
   atmega324p
   atmega325
   atmega325p
   atmega3250
   atmega3250p
   atmega328p
   atmega329
   atmega329p
   atmega3290
   atmega3290p
   atmega406
   atmega64
   atmega640
   atmega644
   atmega644p
   atmega645
   atmega6450
   atmega649
   atmega6490
   atmega16hva
   at90can32
   at90can64
   at90pwm216
   at90pwm316
   atmega32m1
   atmega32c1
   atmega32u4
   atmega32u6
   at90usb646
   at90usb647
   at94k
   avr51
   atmega128
   atmega1280
   atmega1281
   atmega1284p
   at90can128
   at90usb1286
   at90usb1287
   avr6
   atmega2560
   atmega2561
   avrxmega4
   atxmega64a3
   avrxmega5
   atxmega64a1
   avrxmega6
   atxmega128a3
   atxmega256a3
   atxmega256a3b
   avrxmega7
   atxmega128a1
   avr1
   at90s1200
   attiny11
   attiny12
   attiny15
   attiny28
DigisparkOOK.cpp:1: error: MCU 'digispark' supported for assembler only
In file included from DigisparkOOK.ino:2:
/Users/bluebie/Documents/Arduino/libraries/DigisparkKeyboard/DigiKeyboard.h: In constructor 'DigiKeyboardDevice::DigiKeyboardDevice()':
/Users/bluebie/Documents/Arduino/libraries/DigisparkKeyboard/DigiKeyboard.h:133: error: 'TIMSK' was not declared in this scope
/Users/bluebie/Documents/Arduino/libraries/DigisparkKeyboard/DigiKeyboard.h:133: error: 'TOIE0' was not declared in this scope
/Users/bluebie/Documents/Arduino/libraries/DigisparkKeyboard/DigiKeyboard.h:135: error: 'DDRB' was not declared in this scope

or with MIT High-Low:

/Applications/Digispark Ready - Arduino 1.03.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o: In function `__vector_default':
(.vectors+0xa): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_5' defined in .text.__vector_5 section in core.a(wiring.c.o)
/Applications/Digispark Ready - Arduino 1.03.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in /Applications/Digispark Ready - Arduino 1.03.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25/libgcc.a(_exit.o)
core.a(main.cpp.o): In function `main':
/Applications/Digispark Ready - Arduino 1.03.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:15: relocation truncated to fit: R_AVR_13_PCREL against undefined symbol `serialEventRun()'

The R_AVR_13_PCREL problem seems to be solvable by updating the version of avr-gcc in the IDE to a newer release, says some googling. Don't have any clue what's going on with the tinycore board.

Cannot combine SoftSerial with DigiKeyboard

i get an error:

libraries\DigisparkKeyboard\usbdrvasm.S.o: In function `__vector_2':

C:\...\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard/usbdrvasm165.inc:41: multiple definition of `__vector_2'

libraries\DigisparkTinyPinChange\TinyPinChange.cpp.o:C:\...\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkTinyPinChange/TinyPinChange.cpp:57: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

When I try to use both SoftSerial and DigiKeyboard.

#include <SoftSerial.h>
#include "DigiKeyboard.h"

SoftSerial mySerial(2, 3); // RX, TX

I guess the __vector_2 is defined in both libraries, but how can I fix that?

Unable to do Press and Release in following sequence.

I want to mimic Alt+ Tab behaviour. This is like this..

-> Hold Key - LEFT ALT
-> delay 1000
-> Press and Release Key - TAB
-> delay 1000
-> Press and Release Key - TAB
-> delay 1000
-> Press and Release Key - TAB
-> delay 1000
-> Press and Release Key - TAB
-> Release Key - LEFT ALT

I am unable to do it, because when I use sendStroke for pressing TAB, it release LEFT ALT key too..
In other words, How can we release multiple keys and send instruction to release particular keys ?

Help me, also, give me idea, what coding i need it for this behaviour ?

With a raspberryPI with raspbian

In file included from /usr/lib/gcc/avr/4.7.2/../../../avr/include/util/delay.h:44:0,
from /usr/lib/gcc/avr/4.7.2/../../../avr/include/avr/delay.h:37,
from /home/pi/sketchbook/hardware/digispark/cores/tiny/wiring_private.h:32,
from /home/pi/sketchbook/hardware/digispark/cores/tiny/WInterrupts.c:37:
/usr/lib/gcc/avr/4.7.2/../../../avr/include/math.h:426:15: error: expected identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.7.2/../../../avr/include/math.h:426:15: error: expected ‘)’ before ‘>=’ token

Not working unless its in windows/OS

Would a digispark, acting as a keyboard start doing its job as soon as it has power or does it need some kind of OS level initialisation before it starts?

I ask because I bought one to press F1 constantly to bypass bios errors in my server, but even though the light comes on to show power, it doesnt seem to be doing what it should be doing. Plugging it into my windows PC I can see the button being pressed correctly.

Weird double output with DigiKeyboard.h

Hi, I have a really weird problem, I don't know if it is my code or it is a bug. When I use DigiKeyboard.sendKeyStroke or DigiKeyboard.print it always prints the output a second time after a second or two. Also when I upload the code onto the digispark, disconnect it, and connect it again it just randomly prints the output.

An example: (I am trying to open Spotify using macropad)
DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT); DigiKeyboard.delay(1000); DigiKeyboard.print("spotify"); DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(KEY_ENTER);

It prints "spotify" twice, and also when I plug in the digispark. It is so random.
Thanks in advance.

stop loop to overwrite

I tried digisparkkeyboard and it works fine. Now I want to ovewrite with another payload. But everytime I plug in the Digispark it starts to type text automatically, so I can not upload another payload to the Digispark anymore. How can I proceed?

Error exit status 1 with DigiKeyboard

_"error: redefinition of 'const unsigned char ascii_to_scan_code_table []'
const unsigned char ascii_to_scan_code_table[] PROGMEM = {
^
In file included from C:\Users\Intelbras\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard/DigiKeyboard.h:17:0,

             from C:\...\sketch_nov26a\sketch_nov26a.ino:1:

C:....\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard/scancode-ascii-table.h:6:21: error: 'const unsigned char ascii_to_scan_code_table [119]' previously defined here

const unsigned char ascii_to_scan_code_table[] PROGMEM = {
^
Usando biblioteca DigisparkKeyboard na pasta: C:\Users\Intelbras\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkKeyboard (legacy)
exit status 1"_

Help me, please :/

Keyboard Layout Problems

Would it be possible to provide a "scancode-ascii-table.h" file for other languages?
In my case, with a German keyboard layout for example:

DigiKeyboard.println("echo -----------------");

prints: "echo ßßßßßßßßßßßßßßßßß"

I'm not quite sure how to understand the table in scancode-ascii-table.h so that I could translate it myself.

issue with MOD_GUI_LEFT

When i send a sendKeystroke(MOD_GUI_LEFT) the response i get is a letter "E" typed over and over again.
I went to usb.org to check the key codes and i found that the code for the Left GUI key is 227. When i enter the code into sendKeyStroke(227), nothing happens. what can i do???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.