Help with Programming a ATTiny88 with HID

Hi, I'm trying to programme a ATTiny88 to make a wireless macro keyboard.
The keyboard.h or button.h lines in the code lead to error messages when I try to compile the code for uploading.
"Compilation error: Button.h: No such file or directory".
Can anyone recommend a way to get keyboard.h library onto ATtiny88?

I’ve used some ATTinys, but not that one. The summary datasheet has no mention of USB support.

The Arduino keyboard reference says: “The keyboard functions enable 32u4 or SAMD micro based boards to send keystrokes to an attached computer through their micro’s native USB port”.

So I’m not sure you can do it, but someone else might know how.

Welcome

Adding to above by Dave_Lowther, the error indicates that you did not install (or incorrectly installed) the Button library.

Indeed as per @Dave_Lowther, the ATTiny is not listed in the data-sheet among the supported MCU families for the Arduino HID library. Those that are listed all have built-in hardware support for USB. It therefore does seem unlikely that Arduino HID library would work on the ATTiny, although I could be wrong. However, there is also VUSB:

https://www.obdev.at/products/vusb/index.html

Examples can be found under Example Projects at the top. An Arduino friendly implementation can be found here:

https://github.com/todd-herbert/unoHID

Bear in mind that this is designed specifically for the UNO and uses fixed pins, however, it just uses standard GPIO pins to create a virtual USB bus. These pins are configured in:

/vusb/driver/usbconfig.h

So you could possibly tweak it to use whatever pins you want to use on the ATTiny88. For experimentation purposes, its probably best to download and put the library into your project directory and include the library using quotes:

#include "unoHID.h"

That way, if you edit the usbconfig.h file, this is not going to affect any global installation (present of future) in your Arduino library directory. All this is hypothetical and assumes that program code and all libraries will fit into the available 8kb program memory and run with 512 bytes of runtime memory.

Hi @boodog34.

Please provide a detailed description of the specific hardware you are using.

Is it the "MH-ET LIVE Tiny88" board (AKA "MH-Tiny")?

Or is it some other ATtiny88-based board?

How are you implementing the "wireless" part? The keyboard library makes the Arduino appear as a USB keyboard to the computer, if you are not using a USB interface then it would not be appropriate for this project.

Exactly as the picture but with USB C instead of micro


Rf24 modules for the wireless link.
Pro Micro for receiver connected with usb to computer.
Attint88 for the transmitter.

Then you don't need to get the Keyboard library "onto ATtiny88". As @david_2018 explained, you only need to use that library in the sketch program that runs on the Pro Micro.