Yes, it solved the problem! Thanks so much for all your help.
For anyone else it may help, the schematics that I found were
here, and the code I ended up with was:
/*
*
* Trial sketch for handling button presses (converting to serial output)
*
*/
int button4 = LOW;
int button5 = LOW;
int button6 = LOW;
void setup()
{
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(6, INPUT);
Serial.begin(9600);
}
void loop()
{
button4 = LOW;
button5 = LOW;
button6 = LOW;
button4 = digitalRead(4);
button5 = digitalRead(5);
button6 = digitalRead(6);
if (button4 == HIGH) {Serial.print("4");}
if (button5 == HIGH) {Serial.print("5");}
if (button6 == HIGH) {Serial.print("6");}
delay(300);
}
Note: When I tested it, I didn't have some of the code shown above, since I only had one button.
Now I can move on to my next step: using Perl to run commands on the Arduino - but that's for another thread!