Problem with DigiKeyboard liblary

Hi i have problem with liblary named ,,DigiKeyboard" i tried to solve it for like 2 hours witouth any results this is the error:

In file included from c:\Users\filip\Documents\Arduino\libraries\DigisparkKeyboard/DigiKeyboard.h:16:0,
from G:\Aplikacje\hnyvwbgt\sketch\sketch.ino:1:
c:\Users\filip\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\filip\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\filip\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\filip\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\filip\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\filip\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\filip\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 G:\Aplikacje\hnyvwbgt\sketch\sketch.ino:1:0:
c:\Users\filip\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 */
^

exit status 1

Compilation error: exit status 1

if someone know what is wrong and how to fix it i will be very greatfull for information because i run out of ideas how to fix it

Hi @fawoorki. Please reply here to tell us the exact name of the board you have selected from the Tools > Board menu in Arduino IDE.

i selected Digispark (Default - 16.5mhz) sorry i forgot to add that and model of the board is ,,attiny85"

I see that you manually installed the DigisparkKeyboard to your sketchbook. That is unnecessary because the library comes bundled with the "Digistump AVR Boards" platform of the Digispark board when you install it using the Arduino IDE Boards Manager.

I just tried compiling that platform bundled library for the "Digispark (Default - 16.5mhz)" board definition and didn't experience any errors so I think the problem is that the version of the library you installed manually is incompatible in some way.

Please delete the folder at the following path to remove that problematic installation of the library you made:

c:\Users\filip\Documents\Arduino\libraries\DigisparkKeyboard

:warning: Please be careful when deleting things from your computer. When in doubt, back up!

After deleting the folder, try compiling your sketch again. Hopefully this time the error will no longer occur.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.