summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-03-26 01:13:07 +0300
committerYuval Adam <yuval@y3xz.com>2016-03-26 01:13:07 +0300
commit7054853f1e70ef489cbbd19bb25c38f94c49ab06 (patch)
tree9f264b7189d1faf6339da9291826b9e5ab1302a8
parent052159ccde6d8467d4a788ca379101762adeabf8 (diff)
Update README and add keyboard specific README
-rw-r--r--README.md3
-rw-r--r--keyboard/README.md26
2 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5c1da83..32712a2 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,9 @@
Various code for the [Digispark](http://digistump.com/wiki/digispark)
+ - [Blink](blink) - a simple blinking LED example
+ - [Keyboard](keyboard) - a basic USB device that flips the LED based on USB interrupts
+
## Prerequisites
- avr-gcc
diff --git a/keyboard/README.md b/keyboard/README.md
new file mode 100644
index 0000000..cee2f6a
--- /dev/null
+++ b/keyboard/README.md
@@ -0,0 +1,26 @@
+# Keyboard
+
+Neat and simple example of how the digispark can become a USB device and react to interrupts. Heavily based on http://codeandlife.com/2012/01/29/avr-attiny-usb-tutorial-part-3/
+
+## Usage
+
+Build the program and flash it as usual to the digispark.
+
+```bash
+$ make clean && make
+$ micronucleus keyboard.hex
+```
+
+After the program loads, you should see a new USB device:
+
+```bash
+$ lsusb
+Bus 111 Device 222: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
+```
+
+You can now flip the LED by calling the test program, requires root privilege or proper udev rules:
+
+```bash
+$ ./usbtest on
+$ ./usbtest off
+```