Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 11:16:05 am
ya i know. but a whole new board will probably be the easiest.
2  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 10:36:24 am
i did think about getting a new board. i may do that if the pin interupt thing dont work.
thanks alot for all your help.
3  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 10:19:01 am
pin change interrupts?
what does that mean?

what do you think about trying to write my own sketch?
4  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 10:02:47 am
so any ideas
5  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 09:06:13 am
ya the sketch didnt have a wake up function to wake the camera up after longer intervals so was goin to make pin 2 the wake up pin.
6  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 09:01:14 am
i loaded the sketch and all buttons work. cept the start button.
so i changed the sketches buttons allocations, so changed the start and up around.
same story. what used to be the start buttons works now to increase the values,
but it still wont start when you press the new start button

hope that makes sense
7  Using Arduino / Project Guidance / Re: analog input issuses on: December 28, 2012, 08:50:24 am
hey so iv figured out that the problem is not hardware. its in the sketch. iv stared at it for hours and cant figure out what the problem is. can some one take a look?
8  Using Arduino / Project Guidance / Re: analog input issuses on: December 23, 2012, 11:20:25 am
its the code i posted at the beginning of the thread
9  Using Arduino / Project Guidance / Re: analog input issuses on: December 23, 2012, 11:13:24 am
hey guys thanks for the advice i did the serialwrite thing to check if its picking up the inputs. and when i run the simple sketch it picks up all the buttons .
but when i put the end cct together it will not pick up the start stop button. but picks up all the others?
any ideas?
10  Using Arduino / Project Guidance / Re: analog input issuses on: December 12, 2012, 06:57:44 am
ok. all the digital pin are being used. and the origanal 5 that were the switches are damaged. this is y im using analog.
11  Using Arduino / Project Guidance / Re: analog input issuses on: December 11, 2012, 11:38:28 pm
the cct worked.
problems came after i put the 9v battery in the wrong side.
now i just cant get the analogs to work.
12  Using Arduino / Project Guidance / Re: analog input issuses on: December 11, 2012, 03:12:10 pm
thanks ill try that.
13  Using Arduino / Project Guidance / Re: analog input issuses on: December 11, 2012, 03:03:03 pm
sadly i did not keep the link.
guess i should have.
14  Using Arduino / Project Guidance / Re: analog input issuses on: December 11, 2012, 02:55:01 pm
not sure y its like that.
its a code that i found on the net.
im new so only know the very basics.
if you know a better way im all ears.
15  Using Arduino / Project Guidance / Re: analog input issuses on: December 11, 2012, 02:36:09 pm
second half


//function to check the state of the up button and increment interval accordingly.
void checkUp(){
  upReading = digitalRead(upPin);
  if (upReading == HIGH && prevUpReading == LOW && millis() - pressUpTime > debounceDelay){
    activityTime = millis();
    if (changeNumPics){
      if (numPics >= 9950){  //allows variable to wrap around.
        numPics = 0;
      }
      else{
        numPics += 50;
        numPicsChanged = millis();
      }
    }
    else{
      if (interval >= 999){
        interval = 0;
      }
      else{
        interval += 1;
      }
    }
    pressUpTime = millis();
  }
  prevUpReading = upReading;
}

//function to check the state of the down button and increment interval accordingly.
void checkDown(){
  downReading = digitalRead(downPin);
  if (downReading == HIGH && prevDownReading == LOW && millis() - pressDownTime > debounceDelay){
    activityTime = millis();
    if (changeNumPics){
      if (numPics <= 0){  //allows variable to wrap around.
        numPics = 9950;
      }
      else{
        numPics -= 50;
        numPicsChanged = millis();
      }
    }
    else{
      if (interval <= 0){
        interval = 999;
      }
      else{
        interval -= 1;
      }
    }
    pressDownTime = millis();
  }
  prevDownReading = downReading;
}


//function to display a 3 digit number on 7-segment displays.
void displayDEC(int i){
  for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
   digitalWrite(clockPin, LOW);
   digitalWrite(serialOnesPin, bitMask & ~digits[i%10] ? HIGH : LOW);
   digitalWrite(serialTensPin, bitMask & ~digits[(i/10%10)] ? HIGH : LOW);
   digitalWrite(serialHundsPin, bitMask & ~digits[i/100] ? HIGH : LOW);
   digitalWrite(clockPin, HIGH);
  }
}

//function to display "inf" on 3 7-segment displays.
void displayINF(){
  for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
    digitalWrite(clockPin, LOW);
    digitalWrite(serialOnesPin, bitMask & ~inf[2] ? HIGH : LOW);
    digitalWrite(serialTensPin, bitMask & ~inf[1] ? HIGH : LOW);
    digitalWrite(serialHundsPin, bitMask & ~inf[0] ? HIGH : LOW);
    digitalWrite(clockPin, HIGH);
  }
}

void displayPIC(){
  for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
    digitalWrite(clockPin, LOW);
    digitalWrite(serialOnesPin, bitMask & ~pic[2] ? HIGH : LOW);
    digitalWrite(serialTensPin, bitMask & ~pic[1] ? HIGH : LOW);
    digitalWrite(serialHundsPin, bitMask & ~pic[0] ? HIGH : LOW);
    digitalWrite(clockPin, HIGH);
  }
}
void displayINT(){
  for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
    digitalWrite(clockPin, LOW);
    digitalWrite(serialOnesPin, bitMask & ~intvl[2] ? HIGH : LOW);
    digitalWrite(serialTensPin, bitMask & ~intvl[1] ? HIGH : LOW);
    digitalWrite(serialHundsPin, bitMask & ~intvl[0] ? HIGH : LOW);
    digitalWrite(clockPin, HIGH);
  }
}
void displayOFF(){
  for (byte bitMask = 128; bitMask > 0; bitMask >>= 1){
    digitalWrite(clockPin, LOW);
    digitalWrite(serialOnesPin, HIGH);
    digitalWrite(serialTensPin, HIGH);
    digitalWrite(serialHundsPin, HIGH);
    digitalWrite(clockPin, HIGH);
  }
}
  
///////////////////////////////////////////[
Pages: [1] 2