It's 2:30AM and I've had entirely too much coffee.
I got an Uno and I'm having a blast with it. It works on Linux... with Emacs + make. Hallalujah!
I have a (guitar pedal related) project I'd like to implement, but I have to learn how microcontrollers work first. It's loosely described here: Programmable fx looper design
My project will require 16 push buttons. So I've been reading all I can find on the topic (shift registers, debouncing, etc.).
Here is some code I came up with. A 7 segment display is incremented once, when -- and only when -- the button transitions from released to pressed. I don't really have a specific question. I'd just like know if I'm headed in the right direction.
/*Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
 Increment a 7 segment display once per button press.            Â
                                       Â
 Written for Arduino Uno Rev 3.                       Â
                                       Â
 Uno pins 0-6 are segments a-g respectively.                Â
 Pin 8 is the button input.                         Â
                                       Â
 7 segment display is common cathode.                    Â
 Button down is 0v, up is 5v;                        Â
*/
/******************************************Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
 NOTE: Unhook pin 0 and 1 before uploading                 Â
*********************************************/
const int but = 8;
const byte segMap[] = {
  0x3F,   /* 0 */
  0x06,   /* 1 */
  0x5B,   /* 2 */
  0x4F,   /* 3 */
  0x66,   /* 4 */
  0x6D,   /* 5 */
  0x7D,   /* 6 */
  0x07,   /* 7 */
  0x7F,   /* 8 */
  0x6F,   /* 9 */
  0x77,   /* A */
  0x7C,   /* B */
  0x39,   /* C */
  0x5E,   /* D */
  0x79,   /* E */
  0x71,   /* F */
};
int butPressed();
void increment();
void setup() {
  DDRD = 0x7f;        /* set pin 0-6 output */
  pinMode(but, INPUT);
  PORTD = segMap[0];     /* initialize display to 0 */
}
void loop() {
  if (butPressed())
    increment();
}
/*Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
 Increment the display once per call.                    Â
 Start at 0 (initialized in setup()). After F is displayed, start over.   Â
*/
void increment() {
  static int n = 1;
  PORTD = segMap[n];
  n = ++n % 16;
}
/*Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
 Return 1 only if the button has transitioned from released to pressed.   Â
 Return 0 otherwise.                            Â
*/
int butPressed() {
  static int oldVal = 1;
  int val = 0, ret = 0;
  for (int i=0; i!=3; ++i) {
    val = digitalRead(but);
    delay(10);
  }
  ret = (oldVal && !val);
  oldVal = val;
  return ret;
}