digistump / digistumparduino Goto Github PK
View Code? Open in Web Editor NEWFiles to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.5+)
Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.5+)
There are compile issues if SPI.h get's included (directly or over a library).
I noticed first a warning at the beginning
WARNING: Category '' in library SPI is not valid. Setting to 'Uncategorized'
The following is a example output from rf24ping85 sample code but the same happens with other code as well. For reproduction it is enough to create a empty sketch and put #include "SPI.h"
at the top.
On the same machine (using OSX) a parallel run of Arduino IDE 1.6.5 (Sharing libs and settings) the same sketch compiles fine.
In file included from
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In member function 'void SPISettings::init_AlwaysInline(uint32_t, uint8_t, uint8_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:146:16: error: 'SPE' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:146:27: error: 'MSTR' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:146:65: error: 'DORD' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::beginTransaction(SPISettings)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:203:5: error: 'SPCR' was not declared in this scope
SPCR = settings.spcr;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:204:5: error: 'SPSR' was not declared in this scope
SPSR = settings.spsr;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static uint8_t SPIClass::transfer(uint8_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:209:5: error: 'SPDR' was not declared in this scope
SPDR = data;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:217:14: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ; // wait
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:217:25: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ; // wait
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static uint16_t SPIClass::transfer16(uint16_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:223:11: error: 'SPCR' was not declared in this scope
if (!(SPCR & _BV(DORD))) {
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:223:22: error: 'DORD' was not declared in this scope
if (!(SPCR & _BV(DORD))) {
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:224:7: error: 'SPDR' was not declared in this scope
SPDR = in.msb;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:226:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:226:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
Multiple libraries were found for "RF24.h"
Used: /users/**/Documents/Arduino/libraries/RF24
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
Not used: /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/RF24
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:230:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:230:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:233:7: error: 'SPDR' was not declared in this scope
SPDR = in.lsb;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:235:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:235:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:239:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:239:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::transfer(void*, size_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:247:5: error: 'SPDR' was not declared in this scope
SPDR = *p;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:250:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:250:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:255:14: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:255:25: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::setBitOrder(uint8_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:292:31: error: 'SPCR' was not declared in this scope
if (bitOrder == LSBFIRST) SPCR |= _BV(DORD);
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:292:43: error: 'DORD' was not declared in this scope
if (bitOrder == LSBFIRST) SPCR |= _BV(DORD);
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:293:10: error: 'SPCR' was not declared in this scope
else SPCR &= ~(_BV(DORD));
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:293:24: error: 'DORD' was not declared in this scope
else SPCR &= ~(_BV(DORD));
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::setDataMode(uint8_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:298:5: error: 'SPCR' was not declared in this scope
SPCR = (SPCR & ~SPI_MODE_MASK) | dataMode;
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::setClockDivider(uint8_t)':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:303:5: error: 'SPCR' was not declared in this scope
SPCR = (SPCR & ~SPI_CLOCK_MASK) | (clockDiv & SPI_CLOCK_MASK);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:304:5: error: 'SPSR' was not declared in this scope
SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((clockDiv >> 2) & SPI_2XCLOCK_MASK);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:309:42: error: 'SPCR' was not declared in this scope
inline static void attachInterrupt() { SPCR |= _BV(SPIE); }
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:309:54: error: 'SPIE' was not declared in this scope
inline static void attachInterrupt() { SPCR |= _BV(SPIE); }
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:0:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:310:42: error: 'SPCR' was not declared in this scope
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:310:55: error: 'SPIE' was not declared in this scope
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
^
In file included from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/pins_arduino.h:31:0,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:13,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp: In static member function 'static void SPIClass::begin()':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:32:37: error: 'SS' was not declared in this scope
uint8_t port = digitalPinToPort(SS);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:32:20: note: in expansion of macro 'digitalPinToPort'
uint8_t port = digitalPinToPort(SS);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:33:39: error: 'SS' was not declared in this scope
uint8_t bit = digitalPinToBitMask(SS);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:33:19: note: in expansion of macro 'digitalPinToBitMask'
uint8_t bit = digitalPinToBitMask(SS);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:39:20: error: 'SS' was not declared in this scope
digitalWrite(SS, HIGH);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:45:13: error: 'SS' was not declared in this scope
pinMode(SS, OUTPUT);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:50:5: error: 'SPCR' was not declared in this scope
SPCR |= _BV(MSTR);
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:50:17: error: 'MSTR' was not declared in this scope
SPCR |= _BV(MSTR);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:51:17: error: 'SPE' was not declared in this scope
SPCR |= _BV(SPE);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:59:13: error: 'SCK' was not declared in this scope
pinMode(SCK, OUTPUT);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:60:13: error: 'MOSI' was not declared in this scope
pinMode(MOSI, OUTPUT);
^
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp: In static member function 'static void SPIClass::end()':
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:74:5: error: 'SPCR' was not declared in this scope
SPCR &= ~_BV(SPE);
^
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h:38,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/WProgram.h:8,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/cores/tiny/Arduino.h:4,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.h:17,
from /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:14:
/users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI/SPI.cpp:74:18: error: 'SPE' was not declared in this scope
SPCR &= ~_BV(SPE);
^
Using library RF24 at version 1.1.5 in folder: /users/**/Documents/Arduino/libraries/RF24
Using library SPI at version 1.0 in folder: /users/**/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/SPI
exit status 1
Error compiling.
When compiling DigisparkLCD
-> BasicUsage
example on OS X using Arduino IDE - Digistump Release 1.5.8B
I get the following error:
In file included from BasicUsage.ino:17:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigisparkLCD/LiquidCrystal_I2C.h:14:52: fatal error: Wire.h: No such file or directory
#include <Wire.h> // original lib include
^
compilation terminated.
Error compiling.
"Arduino IDE - Digistump Release 1.5.8C.app" is damaged and can't be opened. You should move it to the trash.
System: Mac Air OS X 1.9.5 8G
1.5.8B has same problem. Is this no longer the IDE to use with the Digisparks?
Let me know what other info is required.
/tools/micronucleus-2.0a4-linux64.tar.gz
is supposed to be 64-bit but actually contains a 32-bit binary, as you can see when you run file micronucleus-2.0a4/launcher
:
launcher: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=4de23b7931a126b710dca8463647dd931937030c, not stripped`
This results in:
java.io.IOException: Cannot run program
"/root/.arduino15/packages/digistump/tools/micronucleus/2.0a4/launcher":
error=2, No such file or directory
when trying to upload, hence entirely making the Linux 64-bit build unusable.
OS: El Capitain.
Plug in device now... (will timeout in 60 seconds)
Please plug in the device ...
Press CTRL+C to terminate the program.
Device search timed out
16.5Mhz picked from devices menu after installing board support through Arduino IDE 1.6.8.
Please advise.
When I try to install your hardware with the Arduino Boardmanager I get the following ERROR :
CRC doesn't match. File is corrupted.
java.lang.RuntimeException: java.lang.Exception: CRC doesn't match. File is corrupted.
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$24(ContributionManagerUI.java:170)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: CRC doesn't match. File is corrupted.
at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:77)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:110)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$24(ContributionManagerUI.java:164)
... 1 more
In 1.6.6 the DigisparkMouse and DigisparkJoystick examples fail with
[...]\hardware\tools\avr\avr\include\avr\sleep.h:634:6: error: #error "No SLEEP mode defined for this device."
A problem like this is discussed (and solved?) elsewhere: SpenceKonde/ATTinyCore#31
So it's something about
#if defined(__AVR_ATtiny84__)
but a simple #define __AVR_ATtiny84__
in the sketch did not do the trick for me.
Can someone please look into that issue?
Hi, I just got a DigiSpark got the blinking example to work. I wanted to go ahead and try the keyboard example as well for being able to debug my real project. Unfortunately the Arduino IDE won't compile it. I hope you can help me out.
Here is how I run into the error:
-Board is set to DigiSpark Default 16.5 MHz
-Blinking example does compile, upload and work
-When trying to compile the keyboard example I get the following error messages
/Applications/Arduino Digispark/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: {archive_file_path}(abi.cpp.o): Relocations in generic ELF (EM: 40)
/Applications/Arduino Digispark/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: {archive_file_path}(abi.cpp.o): Relocations in generic ELF (EM: 40)
/Applications/Arduino Digispark/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: {archive_file_path}(abi.cpp.o): Relocations in generic ELF (EM: 40)
/Applications/Arduino Digispark/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: {archive_file_path}(abi.cpp.o): Relocations in generic ELF (EM: 40)
/Applications/Arduino Digispark/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld: {archive_file_path}(abi.cpp.o): Relocations in generic ELF (EM: 40)
{archive_file_path}: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Thank you for helping out :)
In tiny core there's no implementation for pin input mode with pull-up enabled like it is in standard core. I don't see any reason for this to be not implemented and I had proposed the patches for this in pull requests. Is there any reason to not implement this or can you please merge? Thanks.
I am using digispark tiny board on ubuntu 14.04, with platformio.
If i include "DigiKeyboard.h" my project doesn't compile anymore
Steps to reproduce this issue using platformio:
mkdir tmp
cd tmp
platformio init --board digispark-tiny
src/main.ino
#include "DigiKeyboard.h"
void setup() {
// don't need to set anything up to use DigiKeyboard
}
void loop() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.println("Hello Digispark!");
DigiKeyboard.delay(5000);
}
Error output
19:22 $ platformio run
[Sun Jan 10 19:22:38 2016] Processing digispark-tiny (platform: atmelavr, board: digispark-tiny, framework: arduino)
--------------------------------------------------------------------------------------------------------------------------
scons: *** Multiple ways to build the same target were specified for: /home/dchapkine/Desktop/digispark-tiny/tmp/.pioenvs/digispark-tiny/DigisparkKeyboard/usbdrvasm.o (from ['/home/dchapkine/Desktop/digispark-tiny/tmp/.pioenvs/digispark-tiny/DigisparkKeyboard/usbdrvasm.S'] and from ['/home/dchapkine/Desktop/digispark-tiny/tmp/.pioenvs/digispark-tiny/DigisparkKeyboard/usbdrvasm.asm'])
File "/usr/local/lib/python2.7/dist-packages/platformio/builder/tools/platformio.py", line 201, in BuildLibrary
============================================== [ ERROR ] Took 0.20 seconds ==============================================
Note that if i am using any other example, like the mouse example, it works:
#include <DigiMouse.h>
void setup() {
DigiMouse.begin();
}
void loop() {
DigiMouse.moveY(-20); //up 20
DigiMouse.delay(500);
DigiMouse.moveX(20); //right 20
DigiMouse.delay(500);
DigiMouse.moveY(20); // down 20
DigiMouse.delay(500);
DigiMouse.moveX(-20); //left 20
DigiMouse.delay(500);
}
But as soon as i include DigiKeyboard, it refuses to compile with the error above
As title suggest, in one of my project I need to detect status of Caps Lock button on host machine in digispark.
Currently, DigiKeyboard library doesn't implement such functionality. I am newbie in USB stuff so not aware how to implement such functionality.
I think it is something related to "USBRQ_HID_SET_REPORT"
Arduino: 1.6.4 (Linux), Board: "Digispark (Default - 16.5mhz)"
Cannot run program "{runtime.tools.avr-gcc.path}/bin/avr-g++" (in directory "."): error=2, No such file or directory
In .arduino15/packages/digistump/hardware/avr/1.6.7/platform.txt
I've changed compiler.path
to /usr/bin/
, but now I get
/usr/bin/avr-ar: {archive_file_path}: Permission denied Error compiling.
Where archive_file_path
is defined?
A recent change in 1.6.6 hourly caused compile failures of the DigiSpark Platform. I reported it and it has been resolved.
arduino/arduino-builder#42 (comment)
Where the recent compile has the following warning prints
Warning: platform.txt from core 'Digistump AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'Digistump AVR Boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{archive_file_path}" "-L{build.path}" -lm. Consider upgrading this core.
DigiIrDump sketch results in USB errors. Other sketches using USB do not do this.
[ +9,521976] usb 10-1: new low-speed USB device number 108 using uhci_hcd
[ +0,139662] usb 10-1: New USB device found, idVendor=16d0, idProduct=0753
[ +0,000006] usb 10-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ +4,904381] usb 10-1: USB disconnect, device number 108
[ +2,705949] usb 10-1: new low-speed USB device number 109 using uhci_hcd
[ +0,113002] usb 10-1: device descriptor read/64, error -71
[ +0,214003] usb 10-1: device descriptor read/64, error -71
[ +0,202997] usb 10-1: new low-speed USB device number 110 using uhci_hcd
[ +0,113000] usb 10-1: device descriptor read/64, error -71
[ +0,214001] usb 10-1: device descriptor read/64, error -71
[ +0,202997] usb 10-1: new low-speed USB device number 111 using uhci_hcd
[ +0,408003] usb 10-1: device not accepting address 111, error -71
[ +0,102001] usb 10-1: new low-speed USB device number 112 using uhci_hcd
[ +0,407996] usb 10-1: device not accepting address 112, error -71
[ +0,000023] usb usb10-port1: unable to enumerate USB device
Tested in Arduino 1.6.8 2016/01/19 using the Digi core from the Boards Manager.
In DigistumpArduino/digistump-avr/libraries/DigisparkMouse/DigiMouse.h the definitions of leftClick(), rightClick() and middleClick() are all the same!
When I execute the following code, weverything works normal:
Input
#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.println("Test1");
DigiKeyboard.println("Test2");
DigiKeyboard.println("Test3");
DigiKeyboard.println("Test4");
}
void loop() {}
Output
Test1
Test2
Test3
Test4
But when there is a longer string to print, it messes everything up:
Input
#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.println("Test1");
DigiKeyboard.println("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.");
DigiKeyboard.println("Test3");
DigiKeyboard.println("Test4");
}
void loop() {}
Output
m. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
t clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Test3
Test4
I know that is a little bit tricky, but we have serious limitations using some other keyboard layouts like AZERTY. Please consider adding support to that or at least write a script which converts between azerty and qwerty. Thanks!
Arduino-1.6.8.201601190826
IRhashdecode:24: error: 'IRdecodeHash' does not name a type
IRdecodeHash My_Hash_Decoder;
^
/root/.arduino15/packages/digistump/hardware/avr/1.6.5/libraries/DigisparkIRLib/examples/IRhashdecode/IRhashdecode.ino: In function 'void loop()':
IRhashdecode:37: error: 'My_Hash_Decoder' was not declared in this scope
My_Hash_Decoder.copyBuf(&My_Decoder);//copy the results to the hash decoder
^
exit status 1
'IRdecodeHash' does not name a type
I'm having a issue with VirtualWire that has been solved in the latest master branch, but there's no way to use it with the standard procedure as it only refers to the old 1.6.5 release. How can one download the latest libraries without having to copy the Github files?
I've been trying to compile some code using the Digispark IRLib, but so far have been getting the following error message.
Got this same one with the AVR libraries 1.6.7 and 1.6.5A, in IDE versions 1.6.9 and 1.6.5-r5.
IRsendDemo:11: error: 'IRsend' does not name a type
IRsend My_Sender;
^
C:\Users\Me\Documents\Arduino\libraries\DigisparkIRLib\examples\IRsendDemo\IRsendDemo.ino: In function 'void loop()':
IRsendDemo:22: error: 'My_Sender' was not declared in this scope
My_Sender.send(SONY,0xa8bca, 20);
^
Multiple libraries were found for "IRLib.h"
Used: C:\Users\Me\Documents\Arduino\libraries\DigisparkIRLib
Not used: C:\Users\Me\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkIRLib
exit status 1
'IRsend' does not name a type
every time i try to install DigiStump Avr i get the error below. i have looked for a way to download in zip format but i can not find anything.
Warning: non trusted contribution, skipping script execution (C:\Users\Wayne\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4\post_install.bat)
After selecting in the boardmanager Digistump support for AVR Boards (install) it starts downloading. While downloading it throws an error CRC-Error "File is damaged"
Digistump SAM-Boards-support installs without problems.
Installing Oak-Support was not tested.
Hi, I added the board definition URL for the board manager and I can get the definitions of the Digistup boards. But when I try to compile I get this warning:
Invalid library found in /Users/gertsanders/Library/Arduino15/packages/digistump/hardware/avr/1.6.5/libraries/Digispark_Examples
My Arduino IDE is version 1.6.7 (so not 1.6.5). I also do not see any board when connecting the USB cable, probably again because the board manager link is for the older IDE.
Is there an update for Arduino.cc IDE 1.6.7 ?
I'm using a Mac on OSX 10.11.2
This library contains the following line in at least two places:
#if defined(__AVR_ATtiny85__) || (__AVR_ATtiny2313__) || (__AVR_ATtiny167__)
I believe this is missing defined
on the second and third part. It probably works because either undefined variables resolve as 0 / false, or perhaps because this library is only used on attiny devices in practice.
DPinst64.exe fails to install Digistump LLC (usbser) Ports (08/162014 1.1.0.0) | Install failed
Using DigiSerial.inf fails:
Install Error:
"The hash for the file is not present in the specified catalog file. The file is Likely corrupt or the victim of tampering."
Get-FileHash .\Digistump.Drivers.zip -Algorithm SHA1
A1D36DF70125BF1BDCD579BFCE64105BC1728F4D
Get-FileHash .\digiserial.cat -Algorithm SHA1
74D50FFB989DE07CCA8028899743863E4F659DCD
Get-FileHash .\DigiSerial.inf -Algorithm SHA1
69C3409E9D6D13B15A7962F92036EFCA30DC9C2C
digiserial.cat file lists the sha1 for DigiSerial.inf as being:
4DA6FDC07A46FA211FFF1D2621FB5C4AECCF361F
The hashes don't match.
pls
Hello I can't seem to get the digispark with digikeyboard library to press the start button to bring up the menu but it works if I used MOD_GUI_LEFT + KEY R.
I've tried used the keyboards on page 59 of the USB HID manual here : http://www.usb.org/developers/hidpage/Hut1_12v2.pdf and entering various codes such as 128,231,227
any help or suggestions would be great as I would like my digispark to open the start menu when plugged in
I know this topic must be the daily bread among you guys, but if I try to automate some commands with my usb some things like ALT+F4 fail.
Where can I find support for this ?
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 ?
Downloaded the 64-bit release from below URL and tried using it to compile code; https://github.com/digistump/DigistumpArduino/releases/download/v1.5.8C/DigistumpIDE1.5.8C-linux64.tar.gz
The compilation failed and complained about micronucleus missing despite the binary being present in the correct path (hardware/digistump/avr/tools/). I tried changing permissions, but to no result. I managed to sort it out by downloading micronucleus with git and recompiling (requiring the libusb-dev
package on debian) it and replacing the micronucleus binary.
It all seems to work now but I reckon that if you fix this it should save other folks some time.
https://github.com/adafruit/TinyWireM
Adafruit's version fleshes out the API a bit to add a couple of missing features and also create aliases of the send()
& recieve()
methods to match the Wire library's method write()
& read()
names.
This, in turn, grants easier compatibility with a number of other adafruit libraries.
I believe it's fully backwards compatible, although I've only done light testing (with the LCD module).
I can send a PR if you want, but I have to get clearance from my boss first, so it might take a day or two.
Im trying to get the Example to work
Here is the Output after "checking" it
Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Uno"
In file included from C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:13:0,
from C:\Users\IchSkill\Documents\Arduino\sketch_jan05a\sketch_jan05a.ino:1:
c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\delay.h:36:2: warning: #warning "This file has been moved to <util/delay.h>." [-Wcpp]
#warning "This file has been moved to <util/delay.h>."
^
In file included from C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:16:0,
from C:\Users\IchSkill\Documents\Arduino\sketch_jan05a\sketch_jan05a.ino:1:
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:479:26: error: variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of 'attribute((progmem))'
char usbDescriptorDevice[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:485:33: error: variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of 'attribute((progmem))'
char usbDescriptorConfiguration[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:491:29: error: variable 'usbDescriptorHidReport' must be const in order to be put into read-only section by means of 'attribute((progmem))'
char usbDescriptorHidReport[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:497:27: error: variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of 'attribute((progmem))'
char usbDescriptorString0[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:503:31: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of 'attribute((progmem))'
int usbDescriptorStringVendor[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:509:31: error: variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of 'attribute((progmem))'
int usbDescriptorStringDevice[];
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/usbdrv.h:515:37: error: variable 'usbDescriptorStringSerialNumber' must be const in order to be put into read-only section by means of 'attribute((progmem))'
int usbDescriptorStringSerialNumber[];
^
In file included from C:\Users\IchSkill\Documents\Arduino\sketch_jan05a\sketch_jan05a.ino:1:0:
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:40:73: error: variable 'usbDescriptorHidReport' must be const in order to be put into read-only section by means of 'attribute((progmem))'
PROGMEM char usbHidReportDescriptor[USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH] = { /* USB report descriptor */
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '161' from 'int' to 'char' inside { } [-Wnarrowing]
};
^
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '224' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '231' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '149' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '129' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '149' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '129' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:59:1: warning: narrowing conversion of '192' from 'int' to 'char' inside { } [-Wnarrowing]
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,
from sketch\sketch_jan05a.ino.cpp:1:
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/scancode-ascii-table.h:6:48: 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\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:17:0,
from C:\Users\IchSkill\Documents\Arduino\sketch_jan05a\sketch_jan05a.ino:1:
C:\Users\IchSkill\Documents\Arduino\libraries\DigisparkKeyboard/scancode-ascii-table.h:6:21: note: 'const unsigned char ascii_to_scan_code_table [119]' previously defined here
const unsigned char ascii_to_scan_code_table[] PROGMEM = {
^
exit status 1
It is not possible to compile a sketch that is using the latest FastLED library for the original Digispark boards.
FastLED.cpp:133:9: error: 'yield' was not declared in this scope
yield();
^
Using library FastLED at version 3.1.3
Arduino IDE v1.6.13....and Digistump AVR Boards v1.6.7.
I recently recieved a few of these devices, apparently, they are clones, without bootloaders.
Looking over the wiki, i noticed it is almost completely outdated. In particular, just about all of the information is based on the now antiquated 1.6x IDE.
While it might be possible for people to wrangle the particulars for using the new IDE, and burning the bootloader, and fuses on a bare attiny85, etc. from elsewhere. It seems that people like me, who were gifted unfinished, or dodgy parts, there doesn't seem to be much recourse for "fixing" it.
In my particular case, i received those rev3 clones, and one of them works, but the other 4 do not.
The working board appears to have the 1.6 (assuming 1.06) bootloader on board, however, it won't accept any sketches. The output of the IDE console states the sketch was uploaded successfully with the pretty "thank you" message at the end, but it didn't. I changed the standard "start" file so the blink would be 1000ms on, 50ms off, clicked upload, plugged in the digistump when prompted, uploaded the sketch, the console says it was successful, however, the blink that was already on board does not change.
The non-working 4 appear to not have been programmed at all, and appear to have the stock fuses set for 8mhz external crystal, so i would need to pull the IC off and hit it with a high-voltage programmer to reset the fuses.
At this point, we arrive at the wiki once again, where little to no up-to-date information is available for actually doing this. Everything assumes you have a working digistump. everything assumes you have bootloader onboard already. There's litteraly nothing about burning the bootloader to a factory fresh attiny85.
It's for these reasons, and i'm sure many others i haven't encountered yet, i think it would be nice for the wiki to be updated.
Thank you.
Libraries under core directory looks branch of old version of Arduino core library and it's out of date now.
For example,
String class doesn't support progmem (String(__FlashStringHelper* str) constructor).
https://github.com/digistump/DigistumpArduino/blob/master/digistump-avr/cores/tiny/WString.h
https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/WString.h
Is there any way to upgrade to latest one?
when i download digistump avr board by didistump it always
http://github.com/digistump/digistumparuduino//release/download/1.65a/micronucleus-2.0a4-win.zip
is error
I cant download the digistump avr boards because "CRC doesn't match, file is corrupted. It may be a temporary problem, please try again later". i am running windows 10 but when i boot into ubuntu it downloads and works correctly. how can i fix the windows issue?
Not sure where the DigisparkCDC project "lives", so posting this here.
I keep getting (lots of) "BOGUS urb xfer, pipe 3 != type 1" in dmesg on Linux.
When running the DigisparkCDC > Print
sketch, then the characters on the pseudo-serial console are often garbled, the output looks like
TEST!
TEST!
TT
!T!
TTEST!
TEST!
TEST!
TESTS
S
S!
TEST!
TT
S!TET
!TEST!
TEST!
T
STT
!SS
Possibly this is caused by something crashing the kernel module?
me@host:~$ uname -a
Linux host 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
me@host:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.10"
VERSION_ID="15.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
me@host:~$ dmesg
[ +0.001853] ------------[ cut here ]------------
[ +0.000005] WARNING: CPU: 0 PID: 0 at /build/linux-AxjFAn/linux-4.2.0/drivers/usb/core/urb.c:450 usb_submit_urb.part.6+0x142/0x550()
[ +0.000002] usb 10-1: BOGUS urb xfer, pipe 3 != type 1
[ +0.000001] Modules linked in: cdc_acm dell_wmi sparse_keymap gpio_ich video dcdbas snd_hda_codec_analog snd_hda_codec_generic coretemp kvm_intel snd_hda_codec_hdmi snd_hda_intel kvm snd_hda_codec snd_usb_audio serio_raw snd_hda_core snd_usbmidi_lib snd_hwdep cm109 snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi input_leds snd_seq usblp snd_seq_device snd_timer lpc_ich snd mei_me mei 8250_fintek soundcore shpchp mac_hid parport_pc ppdev lp parport autofs4 hid_apple squashfs overlay nls_utf8 isofs nls_iso8859_1 jfs xfs libcrc32c reiserfs dm_mirror dm_region_hash dm_log uas usb_storage hid_generic usbhid hid amdkfd amd_iommu_v2 radeon firewire_ohci psmouse i2c_algo_bit ttm firewire_core drm_kms_helper crc_itu_t ahci libahci wmi e1000e ptp drm pps_core pata_acpi [last unloaded: hid_apple]
[ +0.000042] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 4.2.0-16-generic #19-Ubuntu
[ +0.000001] Hardware name: Dell Inc. OptiPlex 780 /0C27VV, BIOS A15 08/06/2013
[ +0.000003] 0000000000000000 c856fe507f31ed24 ffff8802b7c03b38 ffffffff817e8c09
[ +0.000002] 0000000000000000 ffff8802b7c03b90 ffff8802b7c03b78 ffffffff8107b3c6
[ +0.000003] 0000000000000000 ffff88027e2f8300 0000000000000003 ffff880293890000
[ +0.000002] Call Trace:
[ +0.000001] <IRQ> [<ffffffff817e8c09>] dump_stack+0x45/0x57
[ +0.000005] [<ffffffff8107b3c6>] warn_slowpath_common+0x86/0xc0
[ +0.000003] [<ffffffff8107b455>] warn_slowpath_fmt+0x55/0x70
[ +0.000002] [<ffffffff815df312>] usb_submit_urb.part.6+0x142/0x550
[ +0.000002] [<ffffffff815df782>] usb_submit_urb+0x62/0x70
[ +0.000004] [<ffffffffc054420b>] acm_submit_read_urb+0x3b/0x80 [cdc_acm]
[ +0.000003] [<ffffffffc0544e39>] acm_read_bulk_callback+0xd9/0x170 [cdc_acm]
[ +0.000002] [<ffffffff815dbf75>] __usb_hcd_giveback_urb+0x85/0x130
[ +0.000002] [<ffffffff815dc05d>] usb_hcd_giveback_urb+0x3d/0xf0
[ +0.000002] [<ffffffff81614771>] uhci_giveback_urb+0xb1/0x290
[ +0.000003] [<ffffffff811cc6cf>] ? dma_pool_free+0x9f/0xc0
[ +0.000002] [<ffffffff81616537>] uhci_scan_schedule.part.31+0x4b7/0xbd0
[ +0.000003] [<ffffffff81616ffe>] uhci_irq+0xde/0x190
[ +0.000002] [<ffffffff815db636>] usb_hcd_irq+0x26/0x40
[ +0.000002] [<ffffffff810d41d4>] handle_irq_event_percpu+0x74/0x180
[ +0.000002] [<ffffffff810d4329>] handle_irq_event+0x49/0x70
[ +0.000002] [<ffffffff810d737a>] handle_fasteoi_irq+0x9a/0x150
[ +0.000002] [<ffffffff81017295>] handle_irq+0x25/0x40
[ +0.000003] [<ffffffff817f25ef>] do_IRQ+0x4f/0xe0
[ +0.000002] [<ffffffff817f056b>] common_interrupt+0x6b/0x6b
[ +0.000001] <EOI> [<ffffffff8101f3ac>] ? mwait_idle+0x8c/0x140
[ +0.000005] [<ffffffff8101f94f>] arch_cpu_idle+0xf/0x20
[ +0.000002] [<ffffffff810bd3ea>] default_idle_call+0x2a/0x40
[ +0.000002] [<ffffffff810bd729>] cpu_startup_entry+0x2c9/0x320
[ +0.000003] [<ffffffff817dd16c>] rest_init+0x7c/0x80
[ +0.000004] [<ffffffff81d50025>] start_kernel+0x48b/0x4ac
[ +0.000002] [<ffffffff81d4f120>] ? early_idt_handler_array+0x120/0x120
[ +0.000002] [<ffffffff81d4f339>] x86_64_start_reservations+0x2a/0x2c
[ +0.000002] [<ffffffff81d4f485>] x86_64_start_kernel+0x14a/0x16d
[ +0.000002] ---[ end trace 7d80c581b767159f ]---
me@host:~$ sudo lsusb -v -s10:6
Bus 010 Device 006: ID 16d0:087e MCS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x16d0 MCS
idProduct 0x087e
bcdDevice 1.00
iManufacturer 1 digistump.com
iProduct 2 Digispark Serial
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 1.10
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
While java 8 is the recommended java version for OSX 10.10, the IDE requires a java 6 runtime
To open “Arduino IDE - Digistump Release 1.5.8B” you need to install the legacy Java SE 6 runtime.
After uploading the sketch from File → Examples → DigiCDC → Print
, reconnecting the original DigiSpark, and attempting to attach the Arduino Serial Monitor, the following error message is printed in the Arduino error window:
Error opening serial port '/dev/cu.usbmodem1421'. (Port busy)
Looking at the device tree:
▶ ls /dev/*usbmodem*
/dev/cu.usbmodem1421 /dev/tty.usbmodem1421
But lsof | grep "/dev/cu.usbmodem1421"
outputs nothing.
How the device appears in System Information:
Arduino 1.6.12
▶ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12
BuildVersion: 16A323
▶ sysctl hw.model
hw.model: MacBookPro12,1
e.g. "digispark-tiny.upload.maximum_data_size=512"
This entry is necessary to show the used RAM like:
"Minimum Memory Usage: 268 bytes (52% of a 512 byte maximum)"
when compiling a sketch.
Edit: It's "board.txt" not "boards.txt"
Trying to compile the DigiUSB
-> Echo
example but I get the following error messages:
Arduino: 1.5.8B (Mac OS X), Board: "Digispark Pro (Default 16 Mhz)"
Build options changed, rebuilding all
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:70:14: error: variable 'usbDescriptorString0' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM char usbDescriptorString0[] = { /* language descriptor */
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:70:14: error: conflicting types for 'usbDescriptorString0'
In file included from /Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:12:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.h:515:6: note: previous declaration of 'usbDescriptorString0' was here
char usbDescriptorString0[];
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:80:14: error: variable 'usbDescriptorStringVendor' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM int usbDescriptorStringVendor[] = {
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:80:14: error: conflicting types for 'usbDescriptorStringVendor'
In file included from /Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:12:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.h:521:5: note: previous declaration of 'usbDescriptorStringVendor' was here
int usbDescriptorStringVendor[];
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:89:14: error: variable 'usbDescriptorStringDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM int usbDescriptorStringDevice[] = {
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:89:14: error: conflicting types for 'usbDescriptorStringDevice'
In file included from /Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:12:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.h:527:5: note: previous declaration of 'usbDescriptorStringDevice' was here
int usbDescriptorStringDevice[];
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:111:14: error: variable 'usbDescriptorDevice' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM char usbDescriptorDevice[] = { /* USB device descriptor */
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:111:14: error: conflicting types for 'usbDescriptorDevice'
In file included from /Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:12:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.h:491:6: note: previous declaration of 'usbDescriptorDevice' was here
char usbDescriptorDevice[];
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:142:14: error: variable 'usbDescriptorConfiguration' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
PROGMEM char usbDescriptorConfiguration[] = { /* USB configuration descriptor */
^
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:142:14: error: conflicting types for 'usbDescriptorConfiguration'
In file included from /Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.c:12:0:
/Users/.../Downloads/Arduino IDE - Digistump Release 1.5.8B.app/Contents/Resources/Java/hardware/digistump/avr/libraries/DigiUSB/usbdrv.h:497:6: note: previous declaration of 'usbDescriptorConfiguration' was here
char usbDescriptorConfiguration[];
^
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Environment: Win7 x64; Arduino IDE 1.6.7; Digistump AVR Boards v1.6.7
Board: Digispark (Default - 16.5mhz)
From the specification sheet http://www.atmel.com/devices/attiny85.aspx, ATTiny85 has 512 bytes of EEPROM memory; the forum thread https://digistump.com/board/index.php?topic=1132.0 shows that this is accessible using the functions provided through the EEPROM.h include. However, it appears that that include cannot be found during the build process.
Sample program (blank program, plus the include):
#include "EEPROM.h"
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Error produced:
fatal error: EEPROM.h: No such file or directory
#include <EEPROM.h>
^
compilation terminated.
exit status 1
Error compiling.
By now, scancode-ascii-table.h is just supporting the us qwerty keyboard layout. When inserting a DigiSpark using the DigiKeyboard lib into a computer with qwertz, "y" changes to "z" for example.
There should also be an option for qwerty and azerty keyboards. I would love to do it myself, but I don't really get the idea of how it is working.
Having trouble understanding what's missing. My sketch appears to upload just fine, but since the DigiStump USB driver is a "stripped down" version, the "Port" selector is grayed out because Arduino never finds the port.
How does the IDE know which <arduino.h> to grab? I see in my Project Folder, it makes a TinySoftwareSerial.cpp.o so I think it's including the CPP filesbut from where?
What else do I need to install to allow Serial.println("Hello World); ?
Thanks.
When compiling a sketch using U8x8 library for OLED displays for Digispark ATTiny85, an error occurs that the Digistumps write function is of void type and conflicts with U8x8libs write function:
Arduino: 1.8.2 (Windows 7), Board: "Digispark (Default - 16.5mhz)"
In file included from C:\Users\ikusan\Desktop\sketch_jul23a\sketch_aug17a\sketch_aug17a.ino:3:0:
C:\Users\ikusan\Documents\Arduino\libraries\U8g2\src/U8x8lib.h:237:12: error: conflicting return type specified for 'virtual size_t U8X8::write(const uint8_t*, size_t)'
size_t write(const uint8_t *buffer, size_t size) {
^
In file included from C:\Users\ikusan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\ikusan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\ikusan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\ikusan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from sketch\sketch_aug17a.ino.cpp:1:
C:\Users\ikusan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
exit status 1
Error compiling for board Digispark (Default - 16.5mhz).
The compilation is successful if selected board is i.e. Adafruit Trinket.
Could this be checked if it's the correct behavior in the Digispark package?
Here it says that it can be overridden but it doesn't seem to be the case.
Hello. I've just purchased 12 Digispark Pros' in the hope of communicating with a LIN transceiver via the onboard ATTiny167 UART. Is the UART attached to PA0/PA1 implemented as Serial or Serial1 in this Arduino core implementation? I do not want to use a SoftwareSerial solution, as it will not be as reliable. I am struggling to find information regarding this issue. I also do not want to use the USB+/- pins. Thank you.
EDIT: After further study, the Serial object is attached to PA0/PA1 (pins 6 and 7) and is a hardware UART.
The "DigisparkKeyboard" library is based off of somewhat working but incorrect example code from somewhere out on the internet.
The USBRQ_HID_GET_REPORT request in usbFunctionSetup() should set usbMsgPtr to the report buffer and return the size of the report buffer, returning 0 (which is what the code does now) returns no report when the host asks for one.
There are 2 schools of thought here, either make an empty report buffer, so if the host requests a report when the interrupt buffer is empty we tell it make sure you're not doing anything, or 2 send the last report (which is more risky without support code so hey don't do it)
The sendKeyStroke method is stalling with poll loops (and large delays) waiting for the previous interrupt to be cleared by the host, and to make sure that you don't get repeat keys it does this twice per call, attempting to send an empty report. This breaks all kinds of things when your code becomes complex, and it only works if you don't try to do too much to fast. In fact, its a straight code copy and paste from an example online where the poster says "this works but its not that simple and you shouldn't do it this way"
The proper way to handle it is to store states, and in the update() check if the interrupt is ready, if it is check the state, if the state says to send something send it, then go to a clear state. Then again in update if the interrupt is ready, and you're in clear state, you send that empty report and go into a waiting state.
when you send a key, you just set the report, then set the state to sending, and call update.
This fixes adding meaningless delays to your code that affect everything. Its possible to loose key strokes only if you don't call update() frequently enough, but since the usb specification says it should be called at least every 50ms that shouldn't be a problem anyway.
If the HID descriptor logical maximum was bumped up beyond 101, say to 255. There are other keyboard keys that would work, keys with codes above 101 like keyboard copy/paste ect.
I wrote a library that I'll get along to posting eventually, that is a consumer control device, that allows the digispark to be a very responsive volume knob, but it took a lot of research to find that most of the code in the existing keyboard library is copied from another example that took a lot of liberties. It does work, as long as you aren't doing much of anything else. But as soon as your code gets complicated, it breaks down.
My ide is missing programmer parameters,any help would be great.does it work with 1.8.1 or 1.6.5?
With Arduino IDE 1.8.0 compiling does not work because esptool2 is installed to
.../packages/digistump/tools/esptool2/0.9.1/0.9.1/esptool2
instead of
.../packages/digistump/tools/esptool2/0.9.1/esptool2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.