Weird error I cant find an answer for? [solved]

I am using the attiny85 to create a rickroll but I am having many many errors some of which include
Error compiling for board Digispark (Default - 16.5mhz).
C:\Users\my name\Documents\ArduinoData\packages\digistump\hardware\avr\1.6.7\cores\tiny/Keyboard."h": Invalid argument

and others that I have fixed, the error codes for them go as follows.

C:\Users\\my name\Documents\ArduinoData\packages\digistump\hardware\avr\1.6.7\cores\tiny/Keyboard."h": Invalid argument


Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Digispark (Default - 16.5mhz)"





















blink_test:2:24: fatal error: C:\Users\my name\Documents\ArduinoData\packages\digistump\hardware\avr\1.6.7\cores\tiny/Keyboard."h": Invalid argument

 #include <Keyboard."h">

                        ^

compilation terminated.

exit status 1

C:\Users\my nameDocuments\ArduinoData\packages\digistump\hardware\avr\1.6.7\cores\tiny/Keyboard."h": Invalid argument



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and my other error code being


Error compiling for board Digispark (Default - 16.5mhz).


Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Digispark (Default - 16.5mhz)"





















In file included from C:\Users\my name\Documents\Arduino\sketch_sep26a\sketch_sep26a.ino:1:0:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\libraries\Keyboard\src/Keyboard.h:25:17: fatal error: HID.h: No such file or directory

 #include "HID.h"

                 ^

compilation terminated.

exit status 1

Error compiling for board Digispark (Default - 16.5mhz).



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I have 2 sets of code, an attempt at the rickroll itself and a test code in which the second error happens.

#include <Keyboard.h>

void setup() {
  // put your setup code here, to run once:

DigiKeyboard.delay(5000) ;
}

 void loop() {
  // put your main code here, to run repeatedly:

        DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
        DigiKeyboard.delay(100);
        DigiKeyboard.println("chrome");
        DigiKeyboard.delay(500) ;
        DigiKeyboard.sendKeyStroke(KEY_ENTER);
        DigiKeyboard.delay(500) ;
        DigiKeyboard.print("https://www.youtube.com/watch?v=xvFZjo5PgG0") ;
        DigiKeyboard.sendKeyStroke(KEY_ENTER) ;
        DigiKeyboard.delay(500) ;
}

#include <Keyboard."h">

void setup()  {


 }void loop()
 {
     DigiKeyboard.sendKeyStroke(0)
        
 }

I have no clue what these mean or how to fix them but all the fixes I have found have not worked, I am very new to Arduino products so I have no idea what I'm doing. please keep your answers simple/easy to understand.
thanks

  • Gaston
    (I know I removed the name from the errors and am contradicting that by putting my name here but its not my full name like in the error codes)

why is the 'h' in quotes?

if Keyboard.h is a library file it should be

#include <Keyboard.h>

if local, it should be

#include "Keyboard.h"

i don't see an #include "HID.h" in the code you posted. same rules as above apply

I honestly have no clue what keyboard.h is or does it is just in every bit of code I have found or in every answer I have seen. I already have 1 working model but I lost the original code for it. it definitely used digikeyboard.sendkeystroke when I didn't it and it didn't use keyboard.h.
after removing the quotes it has stopped the first issue I have no idea what to do about the second though. it seems I cant do anything with the attiny85 until the issue is fixed because it is across all the attempts I have made.

Where did you get the library and does it work with the attiny85 or maybe only 32u4 and SAMD based boards ?

my library? I am about as new as it gets and know only what youtube tutorials can tell me

Yes, your library

Have you seen a Youtube video showing the Keyboard library being used with an attiny ?

no I haven't I have no idea what it is and as such didn't know it was important until now

Have you seen any YouTube videos showing the Keyboard library being used with any Arduino ?

only videos on how to set it up which the word library wasn't used as for the coding it's a simple language so I picked it up from a website

thanks so much helibob I have seen you on many posts and you helped a ton, I spent hours trying to find the solution and it was right there. keep it up

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