Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
EthoIRL committed Sep 17, 2024
1 parent 3dd3728 commit d262a4f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@ Run the following commands on your Raspberry Pi

If one of these commands didn't work you can follow this external but still relevant [guide](https://www.isticktoit.net/?p=1383) by Tobi.

## Building the [Example](https://github.com/StrateimTech/hid-api-rs/blob/master/src/example/bin-generic.rs)
## Building an [Example](https://github.com/StrateimTech/hid-api-rs/blob/master/src/example/bin-generic.rs)
```
git clone https://github.com/StrateimTech/hid-api-rs
cd ./hid-api-rs
```
Architectures
- 64bit Armv8 - ``aarch64-unknown-linux-gnu``
- 32bit Armv7 - ``armv7-unknown-linux-gnueabihf``
```
cargo build --bin hid_api_example --target armv7-unknown-linux-gnueabihf
```
Once built transfer to pi using preferred method, before running make sure to use elevated permissions since its accessing /dev/ directory.
_(``chmod +x hid_api_example``)_

## Requirements
- Microcomputer / spare computer that supports USB OTG (Raspberry Pi 4 Model B or 5)
- 64bit & 32bit are both supported internally

## Examples
## Full [Examples](https://github.com/StrateimTech/hid-api-rs/tree/master/src/example)
- ``hid_api_example``, Both keyboard & mouse example code, with state injection.
- ``hid_api_example_mouse``, Mouse only, shows current state of mouse every 500 millis.
- ``hid_api_example_keyboard``, Keyboard only, prints ``hi`` when h is pressed.
Expand Down

0 comments on commit d262a4f

Please sign in to comment.