-
Boards are in and soldered!
05/20/2016 at 04:47 • 0 commentsThe one with the wires soldered directly to the board stays here, meanwhile the other will be sent along to my collaborator. Together we'll finish filling out the keycode map, and tune this to be a light, easy-to-understand, easy-to-mod Sun keyboard platform.
static byte keyStack[6]; //TODO handle stack overflow byte addToKeyStack( char key ){ for( int i = 0; i < 6; i++ ){ if( keyStack[i] == 0 ){ keyStack[i] = key; return 1; } } return 0; } //TODO handle mismatched character byte dropFromKeyStack( char key ){ for( int i = 0; i < 6; i++ ){ if( keyStack[i] == key ){ keyStack[i] = 0; return 1; } } return 0; } //TODO add keyboard beeper test code //TODO add keyboard beeper code to respond to exceptions void setup(){ SerialUSB.begin( 9600 ); while( !SerialUSB ); Serial1.begin( 1200 ); } void loop(){ while( Serial1.available() > 0 ){ byte in = Serial1.read(); static byte mod = 0; SerialUSB.println( in ); switch( in ){ case 76: mod |= MODIFIERKEY_CTRL; break; case 204: mod &= ~MODIFIERKEY_CTRL; break; case 102: addToKeyStack( KEY_C ); break; case 230: dropFromKeyStack( KEY_C ); break; } Keyboard.set_modifier( mod ); Keyboard.set_key1( keyStack[0] ); Keyboard.set_key2( keyStack[1] ); Keyboard.set_key3( keyStack[2] ); Keyboard.set_key4( keyStack[3] ); Keyboard.set_key5( keyStack[4] ); Keyboard.set_key6( keyStack[5] ); Keyboard.send_now(); } }
-
Schematic and Board Files
04/25/2016 at 19:23 • 0 commentsDecided to just keep it as a Teensy backpack/shield/wing/whatever teensy calls their addon boards. Sending these off to Oshpark, once they come back and I validate them I'll post the Eagle files
-
It lives!
04/25/2016 at 18:10 • 0 commentsGot the keyboard communicating over USB, right now it's spitting out just raw keycodes. Now comes the tedious task of mapping these keycodes to standard USB keys...