Input wanted

I have ordered and am still waitin for my arduino to come in, and I am new to programming so ignore my ignorance... But I am piecing together some code to spin a motor thru an l293 motor driver with a slight off pulse and serial printing the rpms with an optical sensor. Heres the code. Right now I am just trying to learn, so the code and idea may be out there.

int pin1 = 3;
int pin2 = 4;
int pin3 = 5;
int mc1 = 6;
int mc2 = 7;
int mc3 = 8;
int mc4 = 9;
int mce = 10;

int ledPin = 13;                // IR LED connected to digital pin 13
int statusPin = 12;             // LED connected to digital pin 12
volatile byte rpmcount;
volatile int status;
unsigned int rpm;
unsigned long timeold;

void rpm_fun()
   //Each rotation, this interrupt function is run twice, so take that into consideration for
   //calculating RPM
   //Update count

   //Toggle status LED
   if (status == LOW) {
     status = HIGH;
   } else {
     status = LOW;
   digitalWrite(statusPin, status);
void setup(){
   //Interrupt 0 is digital pin 2, so that is where the IR detector is connected
   //Triggers on FALLING (change from HIGH to LOW)
   attachInterrupt(0, rpm_fun, FALLING);
   //Turn on IR LED
   pinMode(ledPin, OUTPUT);
   digitalWrite(ledPin, HIGH);
   //Use statusPin to flash along with interrupts
   pinMode(statusPin, OUTPUT);

   rpmcount = 0;
   rpm = 0;
   timeold = 0;
   status = LOW;
  digitalWrite(mce, HIGH);

void loop() { 
 if(pin1,HIGH) {
else {
 if(pin2,HIGH) {
 else {
  if(pin3,HIGH) {
  else {
 //Update RPM every second
   //Don't process interrupts during calculations
   //use two markers to count
   rpm = 30*1000/(millis() - timeold)*rpmcount;
   timeold = millis();
   rpmcount = 0;

   //Write it out to serial port

   //Restart the interrupt processing
   attachInterrupt(0, rpm_fun, FALLING);

if(pin1,HIGH) {

Is perfectly valid C, but will always be true.

Did you intend a "digitalRead" in there?

int pin1 = 3;

"pin1" of what?