Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.
Showing posts with label easy. Show all posts
Showing posts with label easy. Show all posts

2012/08/21

Easy Does It!

As previously blogged, my Stapes Easy button has been turned into a switch and connected to a Teensy. The last issue was getting the code worked out. I now have that code worked out.

And released to Github.

// ========= ========= ========= =========
void setup() {
  // make pin 10 an input and turn on the 
  // pullup resistor so it goes high unless
  // connected to ground:
  pinMode(10, INPUT_PULLUP);
  delay(2000);
  Keyboard.begin() ;
  }

// ========= ========= ========= =========
void loop() {
  if ( digitalRead( 10 ) == LOW ) {
    Keyboard.press( KEY_SCROLL_LOCK ) ;
    Keyboard.releaseAll() ;
    delay(300); 
    Keyboard.press( KEY_SCROLL_LOCK ) ;
    Keyboard.releaseAll() ;
    delay(600); // Delay of 6/10 second to keep from repeating.
    } 
  delay(10);
  }

This was my first serious use of Github for Windows, too. Far easier to handle than the previous stuff I did.

2012/08/20

Easy Like Sunday Morning

Remember my intention to reimplement the Button?

I have my Easy Button torn down, with the speaker out and the circuit bent. You press the button and there is definitely signal going through. I scratched away at the green and soldered in. It works.

On the other side, I have my Teensy, and man, is it teensy. I'm now 93% sure that the micro-B USB cable I've been carrying arround is charge-only, because I couldn't get it to update the code. The code it has on it right now simply kicks out "Hello World" every 5 seconds. The next step, obviously, is to get the Teensy and the easy together, to code it up so that when I hit the button, it kicks out two scroll-lock characters, and to put that code up on Github.

And, to get a nice long micro-B cable.