Skip to content

anthonygclark/techkeys

anthony
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 18 commits ahead, 1 commit behind master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

techkeys

image

Various things for the atmega16u2 based techkeys business card

These source come from this geekhack thread

  • The techkeys_source is from the creator of the card.
  • The KeyCard-* directory contains a completely different implementation (see post #34 of the thread for usage). This contains an AVR studio project which is untested. (I build via avr-gcc)

My goal:

  • Seperate most of the HID protocol to create a simple GUI configurator
  • Learn something about atmega16u2
  • Get a simple version of firmata working

Makefiles

There is a Makefile in each project directory. Here is the process:

$ make
[CC ]  obj/includes/u_hid_kb.o
[CC ]  obj/includes/u_des_kb.o
[CC ]  obj/main.o
main.c: In function 'main':
<built-in>: warning: function declared 'noreturn' has a 'return' statement
[CC ]  obj/kb.o
[ELF]  bin/KeyCard.elf
[HEX]  bin/KeyCard.hex

$ make flash 
Flashing...
[sudo] password for aclark: 
[+] Waiting for DFU mode (connect device and jump the pads!)    
[+] Erasing...    
[+] Uploading...

Manual flash

Generating the .hex file is usually as simple as converting the output binary to hex with avr-objcopy

<compilation here>
$ arv-objcopy -O ihex a.out MYHEX.hex

To program the board in linux, you must plug it in, and JUMP the two pins next to the USB port via something metal, then:

$ sudo dfu-programmer atmega16u2 erase
$ sudo dfu-programmer atmega16u2 flash MYHEX.hex --debug-level=5

About

Various things for the atmega16u2 based techkeys business card

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published